Ask for the steps and the files it intends to touch, numbered, with nothing written yet. A plan is cheap to correct and a half-finished implementation is not. Most bad sessions come from an agent starting on the wrong thing confidently rather than from the code itself being wrong.
The prompt
Do not write code yet. Give me a numbered plan: the steps in order, which files each step touches, and what could break. I will approve or change it before you start.
| When to use it | Anything larger than a one-file change. Always for work touching data, login or payments. |
|---|---|
| Why it is worded that way | The expensive mistake is direction, not syntax. Correcting a five-line plan costs a sentence; correcting four files of work costs the work plus the untangling. Naming the files in advance is the part people leave out, and it is the part that reveals the agent was about to rewrite something you did not want touched. |
Read the file list before the steps
The steps tend to sound reasonable regardless. The file list is where you see the problem — an unfamiliar name, or five files when you expected two. That is the signal to ask why before approving.
Approve in writing, briefly
"Do steps 1 and 2, stop, show me." Approving a plan wholesale invites a large diff. Approving it in pieces keeps every review small enough that you actually do it.
When to skip planning
A genuinely small change in a file you know. Insisting on a plan for a two-line fix is process for its own sake, and process that does not earn its place gets abandoned entirely — including the parts that did.
The Operator Prompt Pack
This is one of 60 prompts, from the phase "Plan before any code is written". The pack has the rest, each with the same reasoning underneath, plus the research they are built on and a house-rules file you paste in once.
Tools this applies to
| Tool | What it does | Price |
|---|---|---|
| Claude Code | An AI agent in your terminal that reads your files, edits them, runs commands and deploys. | ~€17–20/mo |
| Cursor | A code editor with AI. The step between browser builder and terminal. | ~$20/mo |
Every tool has its own page with what it costs and who should skip it. Some links are affiliate links.
More prompts like this
The prompt that makes an agent read before it writes
How do you get an AI coding agent to understand a codebase before it changes anything?
The prompt that stops an AI agent touching everything
How do you stop an AI coding agent from refactoring or changing files you did not ask it to?