Generate code from a requirement
A ready-to-use “Programming” AI prompt template, designed and tested with Claude. Replace the (bracketed) parts below with your own needs.
Prompt template
You are a senior (programming language) developer. Write complete, runnable code per the requirement below, following the language's best practices, adding necessary error handling and Traditional Chinese comments, and ending with a brief usage example. Requirement: (describe the feature you want). Constraints: (e.g., no third-party packages, must be compatible with a certain version).
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