AI Coding
AI Coding Prompts
Copy-ready prompt templates for every stage of the AI coding workflow — planning, context setup, task execution, and the critique loop. Works with Claude Code, Cursor, Lovable, Bolt, and any other AI coding tool.
The single most important rule
One task per prompt, always. The most common AI coding mistake is giving the AI too much to do at once. Split every feature into the smallest independently verifiable step — then prompt for that step only. Every prompt below is written with this in mind.
Step 1 — Planning Prompts
Run these before writing any code
Clarify first — no code yet
Force the AI to ask questions before generating anything. Prevents misunderstood requirements.
I want to build [describe your idea in 2–3 sentences]. Before writing any code, ask me up to 5 clarifying questions — the answers will shape the architecture. Focus on: what the core user action is, what integrations are required, and what the MVP boundary is. Do not write any code yet.
Technical specification generator
Turns your idea into a phased spec with data model and tech stack.
Generate a technical specification for: [your idea]. Include: 1. Data model (tables/collections, key fields, relationships) 2. Tech stack recommendation (framework, database, auth, hosting) 3. Phased MVP plan — Phase 1 (core only), Phase 2 (polish), Phase 3 (growth features) 4. The 3 riskiest technical decisions I need to make upfront Format each phase as a numbered task list so I can hand tasks to an AI agent one at a time.
Step 2 — Context File Prompts
Create AGENTS.md so every session starts with full context
Generate AGENTS.md from spec
Creates the AI context file from your spec. Run once, reference every session.
Based on the spec above, generate an AGENTS.md file for this project. Include: - Project description (what we are building, who it is for) - Tech stack (exact versions where known) - File structure (key directories and what lives in each) - Coding conventions (naming, patterns, what to avoid) - MVP scope boundary (what is in scope for this build, what is explicitly out) - Current phase and next task Format as markdown. This file will be loaded at the start of every future session.
Update AGENTS.md after a task
Keep the context file accurate after each completed step.
I just completed: [describe what was built]. Update AGENTS.md to reflect: - What was built and where the files live - Any new dependencies added - Any patterns established that future tasks should follow - The next task in the queue Return only the updated AGENTS.md — no explanation needed.
Step 3 — Execution Prompts
One task at a time — scope these tightly
Single-task execution (standard)
The core execution prompt. Use this for every task in the queue.
[Read AGENTS.md for full project context] Task: [one specific thing to build or fix] Constraints: - Only change files relevant to this task - Match the existing patterns in the codebase - Do not refactor anything outside the task scope - Commit point: this task should be a single clean git commit When done, confirm what was changed and what the next task in the queue is.
Bug fix with targeted diff
Fixes a specific issue without rewriting surrounding code.
The bug: [describe what is happening vs what should happen] Relevant file: [filename] Relevant function / component: [name] Fix only this specific issue. Return a targeted diff — not a full file rewrite. If you need more context to fix it, tell me what file or function to share next.
Refine with a diff, not a rewrite
When output is close but not right — correct it without discarding working code.
The output is close but needs these changes: 1. [specific change 1] 2. [specific change 2] Return a targeted diff only. Do not rewrite the entire file. Preserve everything else exactly as it is.
Step 4 — Critique Loop Prompts
Run after every completed task before moving on
Post-task critique loop
The quality gate after every step. Catches issues before they compound.
Review what was just built and answer each question: 1. Correctness: does it do exactly what was asked? Any edge cases missing? 2. Integration: does it fit the existing patterns without breaking anything? 3. Security: any obvious vulnerabilities (SQL injection, exposed secrets, missing auth)? 4. Tests: is the happy path covered? Flag if the critical path has no test coverage. 5. Docs: does AGENTS.md still accurately reflect what was just built? For each concern found: give a 1-line fix, not a full rewrite.
Loop detection — stop and revert
Use this when the AI produces the same broken output twice.
Stop. You have produced the same broken output twice. I am reverting to the last clean commit. Before I re-prompt: tell me in one paragraph why this approach is not working and what the smallest possible re-scope is that would make this task achievable. Do not attempt the task again until I confirm the new scope.
Prompting by tool
Each AI coding tool has a different strengths. Adapt your prompting style to the tool you're using.
Claude Code
Best for: Architectural changes, reasoning-heavy tasks, large refactors
Start every session by reading AGENTS.md. Use "think step by step before changing anything" for complex tasks. Claude Code excels when given the full picture — share the file tree, not just the function.
Build with Claude Code →Cursor
Best for: Incremental edits, file-scoped changes, quick iterations
Use @file references to scope each prompt tightly. Short, specific prompts outperform long ones. Tab completion works better than chat for small edits.
Build with Cursor →Lovable
Best for: Full-stack apps from natural language, no-code founders
One long natural language description works better than step-by-step prompts. Describe the full product upfront. Use the "edit" mode for targeted changes once the scaffold exists.
Build with Lovable →Bolt
Best for: Fast prototypes, UI-first builds, hackathon speed
Describe the end state, not the steps. "Build a dashboard that shows X, Y, Z" beats "first create a sidebar, then add…". Great for getting something on screen fast.
Build with Bolt →GitHub Copilot
Best for: Line-by-line completion, familiar IDE workflow
Write a comment describing what you want, then let Copilot complete it. Works best for boilerplate and known patterns. Use Copilot Chat for refactoring explanations.
Build with GitHub Copilot →Windsurf
Best for: Agentic multi-file edits, larger feature tasks
Windsurf's Cascade mode handles multi-file changes better than most tools. Give it a feature description and let it plan before executing.
Build with Windsurf →FAQ
How do I write a good AI coding prompt?
A good prompt has four parts: context (the project, stack, and what already exists), task (one specific thing to build), constraints (what patterns to use and what to avoid), and output format (code only, or code with explanation). The more specific the constraints, the less the AI hallucinates.
What is the Architect Prompt method?
The Architect Prompt is a four-step workflow: Clarify (ask questions before writing code), Architect (generate a phased technical spec), Context File (create AGENTS.md for future sessions), and Execute (one task at a time with a critique loop after each step). Every idea on CodingIdeas.ai ships with a pre-filled Architect Prompt.
What is the difference between prompting Claude Code vs Cursor vs Lovable?
Claude Code is best for reasoning-heavy tasks — give it the full picture and let it think before acting. Cursor works best with short, scoped prompts using @file references. Lovable responds better to one long natural language product description than step-by-step instructions.
Why should I use AGENTS.md?
Without a context file, the AI re-learns your project from scratch every session — wasting tokens and producing inconsistent output. AGENTS.md (also called CLAUDE.md or .cursorrules depending on the tool) captures your stack, conventions, and current build phase so every session starts with full context.
Get a pre-filled prompt for any idea
Every idea on CodingIdeas.ai includes a complete Architect Prompt — pre-filled with the idea's tech stack, MVP scope, and execution steps. Pick an idea, copy the prompt, paste it into your AI tool.