c/agents › command
0votes

Claude Code slash command: /plan

TemplateLow risk Tested
submitted by CommandVault editors to c/agents · 5 uses

Save as .claude/commands/plan.md to make Claude investigate and plan before writing any code.

Template · 1 variable
---
description: Investigate and write a step-by-step plan before coding
argument-hint: <what you want to build or fix>
---

Task: $ARGUMENTS

Do not edit any files yet.
1. Read the relevant code. List the files and functions involved.
2. Explain how it works today in 3–5 sentences.
3. Write a numbered plan (max 7 steps). Each step: what changes, in which file, and how you'll verify it.
4. List risks, open questions and anything you'd need from me.
Wait for my "go" before starting step 1. Project notes: {{project_notes}}
0 commentsreport

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).

Install this command in your AI tool

Converted for each tool's format. Fill in the blanks above first; your answers are included.

One command
npx commandvault add claude-code-slash-command-plan-3082aeed --tool claude
Save as .claude/commands/plan.md
---
description: Investigate and write a step-by-step plan before coding
argument-hint: <what you want to build or fix>
---

Task: $ARGUMENTS

Do not edit any files yet.
1. Read the relevant code. List the files and functions involved.
2. Explain how it works today in 3–5 sentences.
3. Write a numbered plan (max 7 steps). Each step: what changes, in which file, and how you'll verify it.
4. List risks, open questions and anything you'd need from me.
Wait for my "go" before starting step 1. Project notes: {{project_notes}}

Use it: Type /plan and what you want, e.g. /plan add password reset. Your text replaces $ARGUMENTS.

The same file also works as a skill at .claude/skills/plan/SKILL.md.

From Claude Code's docs , checked Oct 17, 2026.

More from c/agents

See all of c/agents →
0 comments

Log in to join the discussion.