1065 words Slides Slide Issue
Slide Issue: "Shift + Tab toggle" Is VS Code-Specific

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

  1. What Is Plan Mode
  2. Plan Mode is read-only: Claude analyzes but doesn't edit files or run commands
  3. Toggled with Shift+Tab (in VS Code) or enabled via CLI flags
  4. Perfect for exploring before committing to large changes
  5. Show on screen: Toggle Plan Mode on and demonstrate that no Edit tool calls appear

  6. Safe Exploration and Analysis

  7. Ask Claude complex questions about architecture or refactoring without fear of changes
  8. Example: "What would need to change to migrate from callbacks to async/await?"
  9. Claude proposes a strategy, but doesn't implement it
  10. Show: Ask a large refactoring question; Claude provides a plan without touching code

  11. Identifying Risks and Dependencies

  12. Ask: "What's the impact of changing this data structure?"
  13. Claude traces dependencies and potential breaking points
  14. Helps you understand scope before beginning work
  15. Show: Claude traces a refactoring and lists all affected files

  16. Code Review and Auditing

  17. Use Plan Mode to review security, architecture, or patterns
  18. Ask: "Audit this authentication code for security issues"
  19. Claude identifies problems without making changes
  20. Show: Claude analyzes code and lists issues found

  21. Planning Complex Features

  22. Ask: "How would you approach building a real-time notification system?"
  23. Claude outlines a strategy: what components to build, in what order, what to consider
  24. You make the decisions; Claude provides the analysis
  25. 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):

  1. Toggle Plan Mode On
  2. In VS Code: press Shift+Tab to enter Plan Mode
  3. Or in CLI: show the setting or flag
  4. Show the interface change (e.g., "Plan Mode: ON")
  5. ~15 seconds

  6. Ask a Large Refactoring Question How would you refactor this module to follow the Observer pattern?

  7. Claude analyzes the code
  8. Provides a step-by-step plan
  9. Shows what files would change and how
  10. No actual changes are made
  11. ~45 seconds

  12. Ask About Dependencies If I change the User model to add a middle_name field, what breaks?

  13. Claude traces dependencies
  14. Lists all affected files
  15. Explains the ripple effect
  16. ~30 seconds

  17. Audit or Review Code Review this authentication code for security issues

  18. Claude analyzes without changing anything
  19. Lists potential vulnerabilities or improvements
  20. ~30 seconds

  21. Exit Plan Mode and Execute

  22. Toggle Plan Mode off (Shift+Tab again)
  23. Ask Claude to implement the plan that was discussed
  24. Show the actual changes being made (now with approval, etc.)
  25. ~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

  1. Plan Mode Isn't Passive – You still ask Claude to do analysis. It's not "watching" mode; it's "thinking mode."

  2. Toggle Back for Execution – Once you approve the plan, toggle Plan Mode off to actually make changes.

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

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

  5. Works with @-Mentions – You can scope Plan Mode analysis to specific files or directories with @filename.

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