Home › Agent workflows › /plan slash command (Claude Code)

/plan slash command (Claude Code)

A Claude Code /plan command that researches the codebase and writes an implementation plan before any code changes.

Claude Code (CLAUDE.md)Agent workflows

How to use

Save this as .claude/commands/plan.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.

.claude/commands/plan.mdDownload  
---
description: Research the codebase and produce an implementation plan; no edits
allowed-tools: Read, Grep, Glob, Bash(git log:*), Bash(git ls-files:*)
argument-hint: <feature or task description>
---

You are planning, not implementing. Do not edit, create, or delete files in this command.

## Task
Plan this work: $ARGUMENTS

## Steps
1. Restate the goal in one or two sentences and list assumptions. If something essential is ambiguous, list the questions at the top.
2. Explore: find the entry points, related modules, existing patterns to follow, and tests (Grep/Glob). Read the key files rather than guessing.
3. Identify constraints: public APIs, database schema, config, performance, security.
4. Write the plan:
   - **Approach** (a short paragraph, plus one alternative you rejected and why)
   - **Steps**: numbered, each small enough to verify on its own, naming the files to touch
   - **Tests**: what to add or change, per step
   - **Risks**: migrations, breaking changes, unknowns
   - **Definition of done**: commands that must pass
5. Estimate size (S/M/L) and point out anything that should be split into a separate PR.

End by asking me to approve the plan or adjust it before implementation.

More: all Agent workflows rules · all Claude Code (CLAUDE.md) rules

Related rules

Code review Copilot instructions

Copilot instructions focused on pull request review: what to flag, severity labels, and how to word comments.

GitHub CopilotAgent workflows

Code review prompt file (Copilot)

A Copilot prompt file (/review-changes) that reviews the current changes and reports issues by severity without editing.

GitHub CopilotAgent workflows

Code reviewer subagent (Claude Code)

A Claude Code subagent definition that reviews the current diff for bugs, security, and tests, reporting by severity.

Claude Code (CLAUDE.md)Agent workflows

/commit slash command (Claude Code)

A Claude Code /commit slash command that reviews staged changes and writes a Conventional Commits message.

Claude Code (CLAUDE.md)Agent workflows

Context management for long agent sessions CLAUDE.md

CLAUDE.md practices for keeping Claude Code effective in long sessions: lean memory, notes files, subagents, and resets.

Claude Code (CLAUDE.md)Agent workflows

Git commits & PRs AGENTS.md

AGENTS.md rules for how agents commit: Conventional Commits, atomic changes, safe git commands, and PR descriptions.

AGENTS.mdAgent workflows

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.