All posts

Mastering Claude Code (Part 6): Advanced Features — Planning Mode, Checkpoints, Plugins & CLI Mastery

claude-codeaiadvancedtutorial

We’ve covered a lot of ground in this series—from setup and fundamentals to workflow optimization and debugging. Now it’s time to unlock the advanced features that separate casual users from power users. These tools let you tackle truly complex projects, experiment safely, automate workflows at scale, and push Claude Code to do things you probably didn’t realize were possible.

Let’s dive into the toolkit that transforms Claude Code from a helpful assistant into your personal engineering team.

Planning Mode: Think Before You Code

Ever started implementing a massive refactor only to realize halfway through you painted yourself into a corner? Planning mode prevents this by adding a strategy phase before Claude writes any code.

What It Is

Planning mode activates a “pre-implementation” phase where Claude analyzes your request, maps out the approach, identifies potential issues, and asks clarifying questions—all before touching a single file. It’s like having an architect review blueprints before construction begins.

When to Use It

  • Multi-file refactors: Reorganizing code across multiple modules
  • Architecture decisions: Choosing patterns, database schema changes, or structural overhauls
  • High-risk changes: Rewrites that affect core functionality
  • Large features: Building something that touches many systems
  • Performance optimizations: Complex changes where the order matters

How to Activate and Use

Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) and type “planning mode” or use the shortcut Alt+P / Option+P to toggle it on before writing your prompt.

Alt+P

Once enabled, your prompt will trigger the planning phase first. Claude will:

  1. Analyze your request and current codebase
  2. Propose a step-by-step implementation strategy
  3. Highlight potential gotchas or dependencies
  4. Ask clarifying questions if needed
  5. Wait for your approval before proceeding

This five-minute planning session saves hours of debugging and rework. I use it for anything that makes me nervous.

Checkpoints: Undo Your Way to Better Code

Checkpoints are auto-saved snapshots of your conversation and code state. They’re like Git commits but for your entire workflow—and they’re invisible to you until you need them.

The Mental Model

Every few exchanges with Claude, a checkpoint is created automatically. Think of it as a “point in time” you can jump back to. Tried an approach? Hated it? Just rewind and try something different, keeping your conversation history and all the useful context.

Use Cases That Changed My Workflow

Safe Experimentation: “Claude, let’s try refactoring this with the Strategy pattern” → Claude implements it → You realize it’s overkill → Rewind to the checkpoint before that attempt → “Actually, let’s use composition instead” → Start fresh from that point.

Mistake Recovery: Accidentally asked Claude to delete something, or the code went off the rails? Rewind in seconds instead of manually rolling back changes.

A/B Testing Approaches: Run Claude through approach A, checkpoint appears → rewind → test approach B with fresh thinking. Compare implementations side-by-side.

How to Rewind

The easiest way: Press Escape twice (Esc Esc) or type /rewind and hit Enter.

Claude will show you available checkpoints with timestamps. Select the one you want, and you’ll be taken back to that point—conversation and code included.

Rewind Options

When you select a checkpoint, you get choices:

  • Code + Conversation: Rewind everything. Use this when you want to completely start over from that point.
  • Conversation Only: Keep your code changes, but rewind the chat. Useful if the code is good but the dialogue went sideways.
  • Code Only: Rewind code to that state but keep the conversation. I use this when implementing a variant of something we already discussed.

Checkpoints have saved me more times than I can count. They’re especially powerful for exploratory work where you’re not sure of the final path.

Plugins: Bundled Workflows for Common Tasks

Plugins are Claude Code’s way of packaging up collections of commands, agents, MCP integrations, and hooks into a single installable unit. They’re like specialized tools you bolt onto Claude Code for specific problem domains.

What’s in a Plugin?

A plugin bundles:

  • Custom commands: Domain-specific shortcuts (e.g., /review-pr for PR reviews)
  • Agents: Autonomous workflows that can run multi-step tasks
  • MCP connections: Pre-configured integrations (GitHub, Jira, Linear, etc.)
  • Hooks: Automatic triggers that run on file changes or events

Real-World Examples

PR Review Plugin: Install once, then use /review-pr to automatically analyze code changes, check for common issues, and generate review comments. No setup needed each time.

DevOps Automation: Commands like /deploy-staging, /check-logs, /rollback that orchestrate your entire deployment pipeline.

Documentation Generator: /generate-docs automatically creates docs from code, /sync-changelog keeps it updated, /validate-links checks for broken references.

How to Install

/plugin install pr-review

Or from the UI:

Ctrl+Shift+P → "Install Plugin" → search "pr-review" → Install

Once installed, the plugin’s commands are immediately available in your conversation.

When Plugins Beat Individual Features

Use a plugin when:

  • Complexity: The workflow involves multiple steps you’d otherwise describe repeatedly
  • Consistency: You want the same approach every time with zero thought
  • Integration: The plugin bundles several MCP sources into one flow
  • Sharing: You want to give your team the exact same workflow

I created my own internal plugins for common tasks—PR reviews, test failure analysis, and deployment checks. They’ve cut my time per task by 50%.

Extended Thinking: Deep Reasoning for Tricky Problems

Sometimes code just doesn’t make sense. Or you’re staring at a performance problem that needs careful analysis. Extended thinking mode activates Claude’s deeper reasoning—it thinks harder about the problem before responding.

Activating It

Press Alt+T (or Option+T on Mac) before writing your prompt, or toggle it with:

Ctrl+Shift+P → "Extended Thinking"

When It’s Worth the Extra Time

  • Complex debugging: Tracking down a subtle bug that crosses multiple systems
  • Architecture decisions: Weighing tradeoffs between approaches
  • Tricky algorithms: Optimizing something that’s currently O(n²) and needs to be better
  • Performance analysis: Understanding where time is actually being spent
  • Refactoring large codebases: Planning a major restructure

Extended thinking takes longer (maybe 2-3x slower) but produces dramatically better answers for genuinely hard problems. I don’t use it for every question, but when I do, it’s worth the wait.

CLI Mastery for Automation

Claude Code isn’t just a GUI app. The CLI is where the real power lives—perfect for CI/CD pipelines, scripts, and workflows that run without human interaction.

Headless Mode for CI/CD

Run Claude in headless mode to complete tasks automatically:

claude -p "Run the test suite and generate a report"

Your task runs to completion. No GUI, no waiting for input. Perfect for:

  • Running tests before deployment
  • Generating reports on a schedule
  • Analyzing logs after errors
  • Creating artifacts in pipelines

Piping: Text In, Analysis Out

cat error.log | claude -p "Analyze this error and suggest fixes"

Or from any command:

curl https://api.example.com/status | claude -p "Is this healthy? What's wrong?"

I use this constantly for log analysis, error interpretation, and quick code reviews.

JSON Output for Integration

claude -p --output-format json "List all exported functions in index.ts"

Claude returns structured JSON instead of text. Perfect for piping into other tools or parsing in scripts:

claude -p --output-format json "List functions" | jq '.functions[] | select(.isPublic)' | xargs

Session Scripting: Continuing Work

claude -r "my-project" "Continue the refactoring from yesterday"

This resumes the named session “my-project” with all its history and context. Chain multiple commands:

claude -r "my-project" "Write unit tests" && \
claude -r "my-project" "Run the tests and fix failures"

Sessions persist, so Claude has full context across multiple CLI invocations.

Series Wrap-Up: From Novice to Master

We’ve covered a lot. Here’s what you’ve learned across all six parts:

Quick Reference: When to Use What

TaskUse This
Quick question about codeCore /ask command
Multi-file refactorPlanning mode + Checkpoints
Finding a bugDebugging mode + Extended thinking
Trying different approachesCheckpoints + /rewind
Complex CI/CDCLI headless mode
Team workflowCustom plugins
Performance optimizationExtended thinking
Learning something newConversational approach (Part 4)

Where to Go From Here

If you haven’t read the earlier parts, start with Part 1. Each builds on the previous, and together they form a complete mental model of how to work with Claude Code.

The features we’ve covered here? They’re all tools. The real skill is knowing which tool fits which problem. That comes from experience—so pick a project and start using these features. Planning mode on day one, checkpoints by day two, plugins by week two.

Check out the app catalog to see what’s possible when you combine all these tools. Real projects, real complexity, built faster than I thought possible.

You’re now equipped to handle projects you’d have thought twice about tackling alone. Go build something great.


Keep learning: Have questions about any feature? Try exploring the Settings panel in Claude Code—there are options here that unlock even more power. And remember, the best way to learn is to use these tools on your actual projects, not on hypothetical examples.

More from the studio.

Back to blog