DEV Community

myougaTheAxo
myougaTheAxo

Posted on • Originally published at zenn.dev

Claude Code Plan Mode: Review Before You Execute Large Changes

Claude Code Plan Mode: Review Before You Execute Large Changes

What Is Plan Mode?

Plan Mode makes Claude show a plan before making any actual changes.

Before a large change, you see "what, in what order" and can approve or reject.

How to Use

# Interactive
claude  # then /plan to switch

# Non-interactive
claude --plan "Create implementation plan for new feature"
Enter fullscreen mode Exit fullscreen mode

Best Use Cases

Multi-File Changes

"Add premium flag to User model.
 Update DB schema, validation, API, and tests."
Enter fullscreen mode Exit fullscreen mode

Claude's Plan:

1. prisma/schema.prisma - add is_premium field
2. src/types/user.ts - update User type
3. src/validators/user.ts - add validation
4. src/controllers/user.ts - include in response
5. test/user.test.ts - add test cases
6. npm run db:migrate - run migration

Proceed?
Enter fullscreen mode Exit fullscreen mode

Refactoring

claude --plan "Consolidate duplicates in src/utils/"
Enter fullscreen mode Exit fullscreen mode

Review where things move before executing.

Production Operations

claude --plan "Migrate staging DB data to production"
Enter fullscreen mode Exit fullscreen mode

Always get a written procedure before risky operations.

When to Use Each Mode

Operation Mode
Minor single-file edit Normal
Large multi-file change Plan first
Production data operations Plan required
New feature design Plan only

Improve Plan Quality

"Implement [feature]. Show in Plan Mode:
1. Affected files list
2. Change order + rationale
3. Test plan
4. Rollback procedure"
Enter fullscreen mode Exit fullscreen mode

Summary

Plan Mode builds "review before executing" into AI workflows. Use it for large changes to prevent irreversible mistakes.


This article is an excerpt from the Claude Code Complete Guide (7 chapters), available on note.com.
myouga (@myougatheaxo) - VTuber axolotl. Sharing practical AI development tips.

Top comments (0)