2.8 Plan Mode
Course: Claude Code - Essentials Section: Core Workflows Video Length: 2-5 minutes Presenter: Daniel Treasure
Opening Hook
Before you leap into refactoring a large codebase or tackling a complex feature, wouldn't it be nice to think it through without making mistakes? Plan Mode is Claude's read-only analysis mode. You can ask Claude to explore, analyze, and suggest changes—without actually making them. In this video, we'll show how Plan Mode becomes your strategic planning partner.
Key Talking Points
- What Is Plan Mode
- Plan Mode is read-only: Claude analyzes but doesn't edit files or run commands
- Toggled with Shift+Tab (in VS Code) or enabled via CLI flags
- Perfect for exploring before committing to large changes
-
Show on screen: Toggle Plan Mode on and demonstrate that no Edit tool calls appear
-
Safe Exploration and Analysis
- Ask Claude complex questions about architecture or refactoring without fear of changes
- Example: "What would need to change to migrate from callbacks to async/await?"
- Claude proposes a strategy, but doesn't implement it
-
Show: Ask a large refactoring question; Claude provides a plan without touching code
-
Identifying Risks and Dependencies
- Ask: "What's the impact of changing this data structure?"
- Claude traces dependencies and potential breaking points
- Helps you understand scope before beginning work
-
Show: Claude traces a refactoring and lists all affected files
-
Code Review and Auditing
- Use Plan Mode to review security, architecture, or patterns
- Ask: "Audit this authentication code for security issues"
- Claude identifies problems without making changes
-
Show: Claude analyzes code and lists issues found
-
Planning Complex Features
- Ask: "How would you approach building a real-time notification system?"
- Claude outlines a strategy: what components to build, in what order, what to consider
- You make the decisions; Claude provides the analysis
- Show: Claude generates a feature plan you can review before execution
Demo Plan
Demo Project: Continue with the same project from 2.1-2.7
Setup:
- Terminal with Claude Code session ready
- Have a complex refactoring or feature in mind (e.g., "refactor this module to use a design pattern" or "add caching to this function")
- Know how to toggle Plan Mode (Shift+Tab in VS Code, or start with --permission-mode plan in CLI)
On-Camera Sequence (2-3 minutes):
- Toggle Plan Mode On
- In VS Code: press Shift+Tab to enter Plan Mode
- Or in CLI: show the setting or flag
- Show the interface change (e.g., "Plan Mode: ON")
-
~15 seconds
-
Ask a Large Refactoring Question
How would you refactor this module to follow the Observer pattern? - Claude analyzes the code
- Provides a step-by-step plan
- Shows what files would change and how
- No actual changes are made
-
~45 seconds
-
Ask About Dependencies
If I change the User model to add a middle_name field, what breaks? - Claude traces dependencies
- Lists all affected files
- Explains the ripple effect
-
~30 seconds
-
Audit or Review Code
Review this authentication code for security issues - Claude analyzes without changing anything
- Lists potential vulnerabilities or improvements
-
~30 seconds
-
Exit Plan Mode and Execute
- Toggle Plan Mode off (Shift+Tab again)
- Ask Claude to implement the plan that was discussed
- Show the actual changes being made (now with approval, etc.)
- ~20 seconds
Code Examples & Commands
Asking in Plan Mode:
How would you refactor this code?
What's the impact of changing this API endpoint?
Audit this code for security issues.
What would need to change to add this feature?
Explain the dependencies in this module.
What's the best approach to implement X?
Toggling Plan Mode:
In VS Code:
- Press Shift+Tab to toggle
In Terminal/CLI:
claude --permission-mode plan
During a session: - Ask Claude to enter Plan Mode - (Exact command depends on terminal interface)
Example Plan Mode response:
(Plan Mode) Refactoring this module would involve:
1. Create a new interfaces file to define contracts
2. Update the existing functions to implement the interface
3. Add tests for the new behavior
4. Update the calling code (found in auth.js and routes.js)
This is safe to attempt. Should I proceed?
Gotchas & Tips
-
Plan Mode Isn't Passive – You still ask Claude to do analysis. It's not "watching" mode; it's "thinking mode."
-
Toggle Back for Execution – Once you approve the plan, toggle Plan Mode off to actually make changes.
-
No Command Execution in Plan Mode – Claude can't run tests, build, or execute bash commands in Plan Mode. Use it for code analysis only.
-
Great for Risk Assessment – Plan Mode shines when you want to understand risk before committing. "What could go wrong?" is a perfect Plan Mode question.
-
Works with @-Mentions – You can scope Plan Mode analysis to specific files or directories with
@filename. -
Plan Mode Documentation – In future sections, we'll show how Plan Mode integrates with permissions and settings.
Lead-out
You've now mastered the Core Workflows: exploring, editing, committing, debugging, testing, documenting, working with images, and planning. These are the fundamental patterns you'll use every day with Claude Code. In the next section, we'll explore how to customize Claude Code to fit your workflow, with custom commands, CLAUDE.md files, and more advanced features.
Reference Material
- Plan Mode Guide: https://code.claude.com/docs/en/permissions (Plan mode section)
- Common Workflows - Plan Mode: https://code.claude.com/docs/en/common-workflows
- Permission Modes Reference: https://code.claude.com/docs/en/permissions
Relevant Articles & Posts
- Advanced Workflows: Joe Njenga's "17 Best Claude Code Workflows" (Medium)
- Production Strategy: Lukasz Fryc's "15 Tips from Running 6 Projects" (DEV Community) – includes planning practices
- Official Guide: Best Practices - Claude Code Docs (https://code.claude.com/docs/en/best-practices)
Additional Notes
- Emphasize: Plan Mode is your "thinking space"—explore without risk
- Show real, meaningful use cases (not trivial examples)
- Highlight the toggle (Shift+Tab) as the key interaction
- Note that Plan Mode is part of the larger permission system (coming in later sections)
- Mention: power users often start with Plan Mode, then switch to execution mode once they're confident
- Call out: the shift from "making changes" to "planning changes" is a maturity marker in Claude Code workflows