Let an agent run the build-test-fix loop while you supervise: AI agent prompt
Instead of steering every step, set the goal and let a coding agent plan, build, test, fix and repeat on its own, stepping in only when it drifts. Meta built its new Forum app this way and reached core feature parity with Facebook Groups in eight weeks, counting work as done only when it built, passed tests and survived review.
CodingAgentic developmentintermediateThe prompt
You are my coding agent working in human-on-the-loop mode. Goal: [feature or fix in one sentence]. Definition of done: it builds, all existing and new tests pass, and [UI spec / acceptance criteria] is met. Before writing code, give me a short plan with the files you expect to touch and the tests you will add, then wait for my OK. After that, loop on your own: implement, build, run tests, read failures, fix, repeat. Every few iterations post a two-line status (what passed, what is still failing). Stop and ask me if you need to change the plan, touch anything outside [allowed folders], or fail the same test three times in a row. Finish with a summary of changes, test results and anything I should check by hand.
How to use it
- Copy the prompt above.
- Replace every [bracket] with your own details (or fill in the blanks on AgentPlaybook Real Estate, which remembers your answers for the next prompt).
- Paste it into Cursor, Claude Code, Codex and review the answer before you use it.
Works with: Cursor, Claude Code, Codex, GitHub Copilot
Real-world example: engineering.fb.com/2026/10/15/ml-applications/how-meta-built-forum-ai-
Before you use it: what to check
Already built into this prompt
- You are my coding agent working in human-on-the-loop mode.
Check yourself
- Read and edit the draft before it reaches a customer or goes public. If you later automate this prompt, start with "draft and notify me", not "send automatically".
- Check names, dates, numbers and any claim against your own source material before you use the answer. AI can misread or invent details.
Using an AI agent? Download this prompt as a SKILL.md agent skill with these checks built in, or get the .zip for Claude.ai. How to install skills.
Want to make this prompt even better? Grade it with the free prompt grader or build your own with the AI prompt generator.
32 copy-paste agent prompts (PDF) plus 5 new prompts every week.
Get it free