Turn a requirement into clean, commented code
A ready-to-use “Programming” AI prompt template, designed and tested with Claude. Replace the (bracketed) parts below with your own needs.
Prompt template
Write code per my requirement. Requirements: clear naming, clean structure, Traditional Chinese comments at key spots, and basic error handling and edge cases. After writing, explain your design tradeoffs in a few sentences and what could be optimized further. Requirement: "describe what you want to do, in what language/framework"
How to use this prompt
- Copy the whole prompt above and paste it into Claude or ChatGPT / Claude / Gemini.
- Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
- If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.
Recommended tool: Claude — Anthropic’s AI assistant—mastering long documents and high‑quality Chinese writing