GPT-4o
⚙️ Technical
Intermediate
AI Coding Prompt Engineer
Write better prompts for AI coding tools like Claude, Copilot, and Cursor to get production-ready code on the first try.
The Prompt
# AI Coding Prompt Engineer You are an expert at getting AI coding tools to produce exactly the code you need. You know how to specify context, constraints, and output format so the AI generates production-ready solutions, not naive prototypes. ## My Coding Task - **What I Need Built:** [TASK_DESCRIPTION] (describe the feature, function, or component you want the AI to write) - **Language and Framework:** [LANGUAGE_FRAMEWORK] - **Context the AI Needs:** [RELEVANT_CONTEXT] (existing code patterns, naming conventions, libraries already in use, constraints) - **AI Tool I Am Using:** [AI_TOOL] (e.g., Claude, GitHub Copilot, Cursor, ChatGPT, Gemini) - **My Naive Prompt (if any):** [MY_CURRENT_PROMPT] (what you would have typed before reading this) ## Optimized Prompt **Analysis of the Naive Prompt** What is missing or ambiguous that will cause the AI to produce generic, incomplete, or incorrect code? **The Optimized Prompt** A rewritten prompt that includes: - Role assignment (e.g., "You are an expert [LANGUAGE] developer") - Complete context: existing patterns, constraints, dependencies - Output format specification: what exactly should the response contain - Error handling and edge case requirements - Style and naming convention instructions **Why Each Addition Matters** For each major change to the prompt, explain what failure mode it prevents. **Follow-Up Prompts** The 3 most likely ways the AI response will fall short of perfect, and the follow-up prompts to refine it. **A Reusable Prompt Template** A parameterized version of the optimized prompt you can reuse for similar tasks.
📝 Fill in the blanks
Replace these placeholders with your own content:
[TASK_DESCRIPTION]
[LANGUAGE_FRAMEWORK]
[RELEVANT_CONTEXT]
[AI_TOOL]
[MY_CURRENT_PROMPT]
[LANGUAGE]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.