claude-code·Published 2026.06.01·Views 2
Claude Code /plan: Get a Plan Before AI Touches Your Code
Claude Code's /plan is a mode that hands you a plan before executing. We cover how to enter and approve it, common pitfalls, real cases, and advanced tips
What's the scariest thing about letting AI write code for you? It's fixing things you never asked it to touch. You ask for a one-line change and it ends up modifying ten files. Claude Code's /plan is the seatbelt that prevents this accident. It's a command that says, "Don't touch anything yet — explain in words how you plan to do it first."
What /plan is
It's a mode that stops execution and builds a plan first. Instead of jumping straight in, Claude shows you a plan saying "here's what I'll do," and only executes once you approve.
The mechanism is simple. Once you enter plan mode (a state where code is only analyzed and edits are locked), Claude only "reads" and locks "writes." It examines the code and produces a plan, but won't change a single character until you say "OK." It's just like reviewing the blueprints before construction begins.
How to use it (by difficulty)
How to enter and exit plan mode
Let's tackle the most confusing part first. There are two ways to enter plan mode.
- By command: Type
/planin the input box and hit Enter — it switches straight to plan mode. - By shortcut: During a conversation, press
Shift+Tab(hold Shift and press Tab) to cycle through modes. Each press shows the current mode (e.g.,plan mode on) near the input box at the bottom of the screen. Press again to return to normal execution mode.
Since you can switch modes by just tapping Shift+Tab without typing a command, this method is faster once you get used to it.
What the screen looks like after running the command
When you assign a task with /plan, Claude doesn't fix the code right away — it outputs a numbered plan. Something like "1. Read this file → 2. Add a function here → 3. Run the tests." At the end of the plan, a prompt asking for approval usually appears. Here you do one of two things.
- If you like it: approve (usually Enter, or select "yes" from the shown options) → only then does Claude actually start fixing the code.
- If something needs changing: don't approve, just say something like "skip step 3" → Claude redraws the plan.
The key is that nothing happens until you say OK. So you can pick the plan apart with peace of mind.
Basics — entering plan mode
/plan
Stops execution and enters plan mode. Every task you assign afterward gets handed back "as a plan first."
Applied — alongside a task
/plan fix the login bug
It presents a step-by-step plan before fixing. You enter the mode and assign the task in one go.
Advanced — large-scale design
/plan replace the payment module with Toss Payments
The bigger the scope, the riskier it is to dive straight in. For these, it's safer to execute after going through planning and review.
★ Common pitfall — approving without reading the plan
This is the mistake beginners make most. In a rush, they hit Enter the moment the plan appears, without reading it. Then the whole point of using /plan disappears. It becomes the same as just giving the order with no plan at all.
The real value of /plan lies in catching that one line while reading the plan that makes you go "wait, why is it touching this file?" For example, if you said "fix the login bug" but the plan includes a step to modify payment-related files, that's a signal to stop before approving.
Build just one habit: read the plan to the end, even for 5 seconds, then approve. Five seconds of reading saves you five minutes (or more).
A real case
Before touching important payment code, I got just the plan first with /plan. Reading the plan, I noticed it was missing exception handling for payment failures (code that defines how to respond when an error occurs). So instead of approving, I requested an addition — "also add exception handling for the payment failure case" — and then ran it. Had I run it without checking the plan, it could have led to a payment incident. Reading the plan once let me prevent the accident in advance.
Use it like this too
- The plan → implement → review three-step combo: Get the design approved and executed with
/plan, and when done, review with/code-review(the code-inspection command). It's the basic pipeline for safely finishing a big feature. - Save the plan as a document: Say "save this plan as
plan.md" to keep it as a file you can share with the team or reuse later. - Compare multiple options: Ask "plan out option A (the quick way) and option B (the proper way) separately" to compare two designs side by side before choosing.
- Edit the plan itself: Before approving, refining the plan like "skip step 3, and use an in-memory cache instead of Redis" greatly improves accuracy. The plan isn't fixed — it's open to negotiation.
- Bigger jobs go to /ultraplan: For large-scale designs spanning the whole codebase, you can plan in the cloud and review in the browser with
/ultraplan.
Try it yourself
Open any project and type this.
/plan add dark mode to this project
If Claude lays out only a plan instead of fixing the code right away, you've succeeded. Then, while reading the plan, pick one part you don't like and request "change this step like so." Watching the plan get redrawn gives you the feeling of "ah, I'm holding the wheel until I approve."
How others use it (web cases)
- When adding GitHub SSO next to existing Google OAuth, Claude analyzed the existing patterns and presented a complete implementation plan first. — Claude Code, Real Workflows: Plan Mode & Specs (Medium)
- With the principle that "code can't be written until the plan is reviewed and approved," they saved tokens and raised quality. — How I Use Claude Code (Boris Tane)
- Think before you write code — a workflow that locks in the design first with plan mode. — Claude Code Plan Mode (Dale Seo)
Wrap-up
The more important the task, the more it's plan first. Enter with /plan or Shift+Tab, and when the plan appears, read it to the end and approve — just make this sequence second nature. Remember just one pitfall: approving without reading the plan makes using plan pointless. Pick up the habit of five seconds of reading to save five minutes, starting today.
Based on: Claude Code v2.1.154 (2026.05)
Comments
Comments 0
Checking sign-in status…
Loading comments…