Claude Code prompt for planning
A plan is worth reading when it commits to something. The useless version describes the code you already have; the useful one names the files it will change, the order, the choice each step forces, and the thing it might break.
The difference between a plan you can approve and one you can only read is whether it commits to anything.
- The prompt, ready to copy.
- Why each line is there.
- Plan mode, how to approve, and the interview version.
- What good output looks like.
- The common failure.
- Make it a one-word command.
Checked against Anthropic's Claude Code documentation on November 25, 2026. By the Omniscio team. Updated .
The prompt
I want to add per-workspace rate limits. Before you write any code, read the request path and write me a plan.
The plan should give me: the files you would touch and in what order, the decision each one forces, what could break for existing callers, and what you need from me that you cannot find in the repo.
Point at the limiter the API already uses and say whether the same shape works here or not.
Plan only. Make no edits.Replace the two example pieces — the change you want and the existing pattern to compare against — with your own, and keep the rest as it is. Paste it into a session in plan mode if the change is large enough that a stray edit would cost you.
Why each line is there
"Before you write any code"
This is the plan-mode contract in a sentence. Plan mode tells Claude to research and propose changes without making them, and edits stay blocked until you approve. Saying it in the prompt as well means the same instruction works in a session that is not in plan mode.
"read the request path"
A plan built from a guess about your code is worse than no plan. Anthropic lists pointing at a reference among the patterns a working prompt shares, and in a plan the reference is what keeps the steps concrete instead of general.
"the files you would touch and in what order"
The file list is the part of a plan you can check against your own knowledge, and it is cheap to produce. The order matters more than it looks: it is the sequence you will actually build in, and a plan whose steps cannot be built in the order given is a plan that will stall on step two.
"the decision each one forces"
This is the line that makes a plan worth approving. Every file in a real change forces a choice — a new column or a new table, a flag or a separate endpoint, an error or a retry — and the choices are what you are being asked to agree to. A plan without them is a schedule: it commits to an order but not to the choices inside it, so the first surprise mid-build is a decision nobody made on purpose.
"what could break for existing callers"
A plan that only describes the new behaviour has skipped the hard part. Naming the risk in the prompt makes the plan say which callers see a difference, which defaults change, and what the rollback would be — the three questions that decide whether a change is safe to schedule.
"what you need from me that you cannot find in the repo"
Some of what Claude needs was never in the repository: which environment the integration tests expect, whether the limit is per minute or per day for a reason, who has to be told. Anthropic's guidance is to write down what Claude cannot find by reading the repo, and the cheapest moment to collect it is before the work starts rather than halfway through.
"Point at the limiter the API already uses and say whether the same shape works here or not"
A reference plus a question about it. The reference gives the plan a concrete pattern to follow, and the question forces a judgement rather than a copy: the existing limiter may be in-memory, or per-process, or wrong for a shared store, and saying which is more useful than either option alone.
"Plan only. Make no edits."
The last line, so it is the final instruction Claude reads. In plan mode this is belt and braces; outside plan mode it is the whole constraint.
Plan mode, and how to approve
Plan mode is the version of this prompt that cannot be ignored. Enter it with Shift+Tab until the status bar reads plan mode, prefix a single prompt with /plan, or start the session with claude --permission-mode plan.
When the plan is ready, Claude presents it and asks how to proceed. There are three choices: approve and start in auto mode, approve and review each edit individually, or keep planning and say what to change. The first option's label changes with the session — it reads Yes, auto-accept edits when auto mode is not available to you, and names bypass permissions if that is how the session started. Approving exits plan mode and switches to the permission mode that option describes.
The caveat again, because it is the one case where the mode does not hold: in an interactive terminal session where bypass permissions is available, Anthropic says not to rely on plan mode's blocks, because a file edit or shell command attempted during planning can run without prompting. If the change is genuinely dangerous, keep the session out of bypass permissions while you plan.
Two details are worth knowing before you are in the moment. Ctrl+G opens the proposed plan in your editor, so you can fix a step directly instead of describing it in chat. And Shift+Tab means different things at different moments: while planning it leaves the mode without approving anything, and at the approval prompt it approves the plan — so if you meant to leave, press Esc first.
When you do not know what you want yet
A plan cannot be better than the goal it serves, and goals are often soft at the start. Anthropic's suggestion for that case is to ask Claude to interview you rather than to write anything. Its own version of the prompt is I want to add rate limiting to the public API but haven't thought it through yet. Interview me until you could write the spec, then write it to SPEC.md.
This version adds two instructions, and both are ours rather than Anthropic's: one decision per question, so each answer is a single choice, and the preferred answer named with each, so a decision you are unsure about arrives with a recommendation attached.
I want to add per-workspace rate limits but haven't thought it through. Interview
me until you could write the spec, then write it to SPEC.md. Ask about one
decision at a time, and say which answer you would pick and why.The interview comes back as multiple-choice questions about the parts you have not pinned down, and it keeps going until the answers add up to a spec. Once SPEC.md exists, Anthropic's advice is to start a fresh session to build from it, so the build begins with a clean context and a written definition of done.
If the change is a whole feature rather than a task, the everyday tasks guide walks the jobs on either side of this one — understanding the code, then building the change.
What good output looks like
- An ordered list of steps, each naming files. Not "update the middleware" but the file, and the change to it.
- A decision per step, stated. "Reuse the existing bucket table with a new key rather than adding a column" is a decision you can disagree with.
- A risk section about existing callers. Who sees a different result, and what the default becomes.
- Open questions addressed to you. Two or three, specific enough to answer in one line each.
- No implementation in it. A shape, a signature or a table name is fine; a diff means the build has started.
Six lines that pass all five, for the rate-limit example:
1. src/api/limiter.ts — add a workspace key to the existing bucket lookup.
Decision: extend the current table rather than add one.
2. src/api/middleware.ts — read the key from the session, not the header.
Decision: header first would let a caller pick their own bucket.
3. config/limits.json — one default per plan, overridable per workspace.
Decision: a hard-coded default would need a deploy to change.
Risk: two callers behind one shared workspace key now share a bucket.
Need from you: is the limit per minute or per day, and who owns the default?The common failure
The plan is a tour of the codebase. It explains what the limiter does today, where the middleware sits, and how requests flow — all correct, all already known to you, and none of it a decision about what to change. You finish reading it no better able to say yes or no than before you asked.
It comes from a prompt that asked for understanding rather than a proposal. The four fields in the prompt on this page exist to prevent it: files and order make it a proposal, the decision per step makes it arguable, the risk section makes it honest, and the open questions make it a two-way conversation.
The other failure is the plan that starts without saying so. A tool call that edits a file in the middle of a planning session is the reason to use plan mode rather than a prompt: the prompt asks, and the mode blocks — except in the bypass-permissions case above, which is why a change you cannot easily undo wants the mode and a session without bypass permissions.
Make it a one-word command
If your team plans changes in a fixed shape — a design doc with sections, a ticket template, a list of questions that always comes up — put that shape in a skill. It is one file, .claude/skills/plan/SKILL.md, and the folder name becomes the command:
---
name: plan
description: Plans a change before any code. Use when the request is large enough
that you want the decisions and the risk before anything is edited.
---
Read the code first. Then write a plan containing: the files you would touch and
in what order, the decision each one forces, what could break for existing
callers, and what you need from me that you cannot find in the repo. Make no edits.Its body loads only when it is used, so a long template costs almost nothing on the tasks that do not need it.
The reusable forms have worked examples on this site: skills examples and CLAUDE.md examples. Put the facts every session needs in CLAUDE.md — the build commands, the architecture that is not obvious from the tree — and the procedure in the skill.
Where a plan turns into a prompt for one specific job, the rest of this set takes over: refactoring, code review, tests.
How this page was written
Everything here about what plan mode does, how a plan is approved or edited, and what Anthropic suggests when the goal is still vague was read from Anthropic's Claude Code documentation on November 25, 2026, and checked against the wording in the Sources below.
Both prompts on this page are ours: examples written for this site, following the patterns Anthropic documents. Neither is a prompt Anthropic publishes, and the feature in the first one is a placeholder. Where the second one starts from Anthropic's own interview prompt, it says so and names both of the lines that were added.
Sources
- Anthropic's Permission modes, for what plan mode does, how to enter and leave it, and the approval choices, read November 25, 2026.
- Anthropic's Best practices for Claude Code, for writing down what Claude cannot find in the repo and for the interview-then-spec prompt, read November 25, 2026.
- Anthropic's Prompt library, for pointing at a reference and for letting Claude find the files, read November 25, 2026.
- Anthropic's Extend Claude with skills, for where a skill lives and when its body loads, read November 25, 2026.
- Google's autocomplete suggestions for "claude code prompt for planning" and "claude code planning prompt", read November 25, 2026, for the queries this page answers.
Common questions
What is a good Claude Code prompt for planning?
One that asks for the files and their order, the decision each one forces, what could break for existing callers, and what the plan needs from you. Run it in plan mode so nothing is edited while the plan is written. The prompt at the top of this page is an example you can copy.
Should I use plan mode or just ask for a plan in a prompt?
Plan mode, when the change is large enough that an unintended edit would cost you. Edits stay blocked until you approve the plan, so the instruction is enforced rather than requested — and a prompt that says plan only is a request the model can drift from.
What is the difference between a plan and a spec?
A spec says what the thing should do; a plan says how the change will get there. That distinction is ours, not a documented term of art. What Anthropic does say is that if you do not yet know what you want, have Claude interview you until it could write the spec, write the spec, and then start a fresh session to build from it.
How do I approve or change a plan?
When the plan is ready, Claude presents it and asks how to proceed: approve and start in auto mode, approve and review each edit, or keep planning and say what to change. Ctrl+G opens the plan in your editor so you can edit it directly before Claude proceeds.
What if the plan has a step I disagree with?
Say so at the approval prompt rather than after the build. The middle option exists for exactly this: approve the plan and review each edit, so the disagreement becomes a decision at one file instead of a rewrite at the end.
Plan in one session. Ship from many.
A planning prompt runs inside one Claude Code session. Omniscio is the level above: a desktop app for running Claude Code and other coding agents side by side, with one list of sessions and one inbox, so an agent only interrupts you when a decision needs you.
The features page lists what is in it today, pricing covers the plans, and you can download it for Windows, macOS or Linux.