Guide
What you get: Claude reads the relevant code and gives you a short, checkable plan (files, steps, how each step is verified, risks) before it touches anything. Best for anyone starting a change in an unfamiliar or important part of a codebase.
Before you start
- Claude Code installed and opened in your repo.
- Fill in project notes with how to verify work in your project (for example your lint, test and build commands).
- Save as .claude/commands/plan.md (commit it to share with your team).
Worked example (Oct 17, 2026, Claude Code 2.1.296)
Input
/plan add a branded 404 page with a link back home
(project: fresh Next.js 16.4.2 create-next-app; project notes: "no test suite yet; verify with npm run lint and npm run build")
Result
Excerpt of the real answer:
"I haven't changed any files. The plan is below, and I'll wait for your "go" before starting."
1. Files involved: src/app/layout.tsx, src/app/page.tsx, page.module.css, globals.css; noted there is no not-found.tsx yet.
2. How it works today: unmatched URLs get Next.js's built-in unbranded 404; a root app/not-found.tsx would replace it and still send a 404 status.
3. Plan (5 steps), each with a check, e.g. "curl -s -o /dev/null -w '%{http_code}' localhost:3000/does-not-exist returns 404".
4. Risks and questions: asked what "branded" means (logo, colors, wording) and recommended checking the status code on a production build, not next dev.Run with file edits allowed (--permission-mode acceptEdits). git status was empty afterwards: the command's "don't edit yet" instruction held on its own. The user-level CLAUDE.md on the test machine was also loaded.
How to check it worked
- Type / in Claude Code: plan appears in the menu.
- After running it, git status shows no changes.
- The answer has all four parts: files, how it works today, numbered steps with a check each, risks/questions.
Common problems
- Command not in the / menu: the file must be at .claude/commands/plan.md (or a skill at .claude/skills/plan/SKILL.md) with the --- front matter on the very first line.
- Vague verification steps: put your real lint/test/build commands in the project notes.
- It starts editing anyway: reply "stop, plan only"; for extra safety start the session in plan mode (Shift+Tab).
Log in to join the discussion.