Short answer: prompts for agents are closer to task briefs than to questions. The ones that work state the goal, the constraints, what “done” looks like and how to prove it. Below are six patterns we reuse, written so you can paste them into Claude or ChatGPT.
1. Plan first, then execute
plan-first.txt
Before changing anything, write a plan:
- the files you will touch and why,
- the order of the steps,
- how you will verify each step,
- what could go wrong.
Wait for my "go" before executing. If the plan changes while you work,
stop and tell me.
2. Definition of done with evidence
definition-of-done.txt
Goal: add pagination to GET /orders.
Done means:
- existing tests pass and new tests cover first, middle and last page;
- the OpenAPI spec is updated;
- you show me the test output, not a summary of it.
Do not mark the task complete without the evidence above.
3. Parallel fan-out with subagents
fan-out.txt
Investigate why p95 latency doubled since Monday. Use three subagents
in parallel:
1. deploys and config changes since Monday (Git and pipeline history),
2. database: slow queries and connection pool metrics,
3. dependencies: error rates and latency of external APIs.
Each returns at most 10 bullet findings with evidence links.
Then combine them into a ranked list of hypotheses.
4. Critic pass
critic.txt
Now act as a skeptical senior reviewer of the answer above.
List the three weakest claims, what evidence would confirm or refute
each one, and anything a production on-call engineer would worry about.
Then rewrite the answer fixing only what the critique justifies.
5. Ask before assuming
clarify.txt
Before you start, ask me up to 5 questions whose answers would change
your approach. Group them by importance. If something is not critical,
state the assumption you will use instead of asking.
6. Context file for a repository
CLAUDE.md
# Project context (CLAUDE.md / AGENTS.md)
## Stack
Python 3.12, FastAPI, PostgreSQL 16, Terraform on AWS (us-east-1).
## Commands
Tests: make test · Lint: make lint · Local stack: docker compose up
## Rules
- Never commit secrets; config comes from SSM Parameter Store.
- New endpoints need tests and an OpenAPI description.
- Ask before adding dependencies or changing infrastructure.
## Definition of done
Tests pass, lint passes, and the change is described in CHANGELOG.md.
Claude Code reads CLAUDE.md; Codex and several other tools read AGENTS.md. Keeping one file and linking the other avoids drift.
Long, generic system prompts (“you are a world-class engineer…”) add tokens and little else. Concrete constraints and a definition of done change behavior far more.