Skip to main content
commandsSource-backedReview first Safety Privacy

Plan Mode & Extended Thinking for Claude Code

Activate Claude's extended thinking mode with multi-level planning depth from 'think' to 'ultrathink' for comprehensive strategy creation before implementation

by JSONbored·added 2025-10-25·
HarnessClaude Code
Invocation:/plan-mode [task] [depth]
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://code.claude.com/docs/en/common-workflows, https://github.com/JSONbored/awesome-claude/blob/main/content/commands/plan-mode.mdx
Safety notes
Review generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project., Limit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output.
Privacy notes
Prompts, source files, logs, errors, dependency metadata, and generated reports may be sent to the configured AI model during command execution., Redact secrets, customer data, private repository details, and proprietary code before sharing command output outside the workspace.
Author
JSONbored
Claim status
unclaimed
Last verified
2025-10-25

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

78

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

CLI install

Copy-ready — paste the snippet to get started.

Install command

Provided

Config snippet

Not provided

Copy snippet

Provided

Prerequisites

None

Platforms

1 listed

Difficulty

100/100

Adoption plan

Balanced adoption plan

Current risk score 16/100. Use staged verification before broader rollout.

Risk 16

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (5/6 signals complete).

Risk 15

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

5/6 steps complete with no blocking gaps for this preset.

Risk 14

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Safety & privacy surface

Safety & privacy surface

2 safety and 2 privacy notes across 4 risk areas. Review closely: credentials & tokens, permissions & scopes, third-party handling.

4 areas
  • SafetyExecution & processesReview generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project.
  • SafetyPermissions & scopesLimit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output.
  • PrivacyThird-party handlingPrompts, source files, logs, errors, dependency metadata, and generated reports may be sent to the configured AI model during command execution.
  • PrivacyCredentials & tokensRedact secrets, customer data, private repository details, and proprietary code before sharing command output outside the workspace.

Safety notes

  • Review generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project.
  • Limit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output.

Privacy notes

  • Prompts, source files, logs, errors, dependency metadata, and generated reports may be sent to the configured AI model during command execution.
  • Redact secrets, customer data, private repository details, and proprietary code before sharing command output outside the workspace.

Schema details

Install type
cli
Reading time
9 min
Difficulty score
100
Troubleshooting
Yes
Breaking changes
No
Runtime and command metadata
Command syntax
/plan-mode [task] [depth]
Full copyable content
/plan-mode [task] [depth]

About this resource

The /plan-mode command activates Claude's extended thinking capabilities with progressive depth levels to create comprehensive strategies before jumping into implementation.

Features

  • Multi-Level Thinking: Progressive depth from 'think' < 'think hard' < 'think harder' < 'ultrathink'
  • 128K Token Output: Extended thinking mode supports up to 128,000 token outputs
  • 96.5% Accuracy: Achieves 96.5% accuracy on complex physics and coding problems
  • Self-Reflection: Claude evaluates alternatives before committing to solutions
  • Architecture Planning: Design system architecture before writing code
  • Thought Visibility: View Claude's reasoning process in real-time
  • Interrupt Capability: Press ESC to correct path during planning
  • Research-First: Forces research and planning before implementation

Usage

/plan-mode [task] [depth]

Depth Levels

  • --think - Basic extended thinking (~30s planning)
  • --think-hard - Medium depth analysis (~60-90s planning)
  • --think-harder - Deep analysis (~2-3min planning)
  • --ultrathink - Maximum depth analysis (~5-10min planning)

Planning Scope

  • --architecture - System architecture and design
  • --implementation - Step-by-step implementation strategy
  • --refactor - Refactoring approach and migration path
  • --debug - Debugging strategy and root cause analysis
  • --research - Research and analysis plan

Options

  • --show-thinking - Display Claude's thought process (default: true)
  • --no-implement - Plan only, do NOT implement
  • --approve-first - Require approval before proceeding to implementation

Examples

Basic Planning (think)

Command:

/plan-mode "Add user authentication" --think --architecture

Claude's Planning:

[Extended Thinking Mode: think]

Analyzing requirements...
- Need secure authentication
- Consider session management
- Evaluate auth methods

Evaluating approaches:
1. JWT tokens (stateless, scalable)
2. Session cookies (stateful, simple)
3. OAuth2 (third-party, complex)

Selected: JWT tokens
Reasoning: Stateless design scales better, mobile-friendly

Architecture Plan:

1. Database Schema:
   - users table (id, email, password_hash, created_at)
   - refresh_tokens table (user_id, token, expires_at)

2. API Endpoints:
   POST /api/auth/register
   POST /api/auth/login
   POST /api/auth/refresh
   POST /api/auth/logout

3. Middleware:
   - Authentication middleware (verify JWT)
   - Rate limiting (prevent brute force)

4. Security:
   - bcrypt for password hashing (cost: 12)
   - JWT expiry: 15min access, 7d refresh
   - HTTPS only

Ready to implement? (y/n)

Deep Planning (think harder)

Command:

/plan-mode "Migrate from REST to GraphQL" --think-harder --refactor

Claude's Deep Analysis:

[Extended Thinking Mode: think harder]

Analyzing current state...
- 45 REST endpoints across 8 resources
- Mixed response formats (some paginated, some not)
- Over-fetching in 12 endpoints
- Under-fetching requiring 3+ requests in 8 workflows

Evaluating migration strategies:

1. Big Bang Migration:
   Pros: Clean break, no dual maintenance
   Cons: High risk, long freeze
   Risk: HIGH

2. Gradual Migration (selected):
   Pros: Low risk, incremental value
   Cons: Dual maintenance period
   Risk: LOW

3. Parallel Systems:
   Pros: Safe rollback
   Cons: Infrastructure cost
   Risk: MEDIUM

Selected: Gradual Migration
Reasoning: Minimize risk, maintain velocity

Migration Plan (8-week timeline):

Week 1-2: Foundation
- Install Apollo Server
- Design GraphQL schema
- Setup type generation
- Create resolver boilerplate

Week 3-4: Core Resources (Priority: High)
- Migrate User queries/mutations
- Migrate Post queries/mutations
- Add DataLoader for N+1 prevention
- Write integration tests

Week 5-6: Secondary Resources
- Migrate Comments
- Migrate Tags
- Migrate Categories
- Performance benchmarking

Week 7: Optimization
- Query complexity limiting
- Persisted queries
- APQ (Automatic Persisted Queries)
- Caching strategy

Week 8: Cutover
- Feature flag rollout (10% → 50% → 100%)
- Monitor error rates
- Deprecate REST endpoints
- Documentation update

Dependencies:
- GraphQL code generator
- Apollo Server 4.x
- DataLoader
- GraphQL Tools

Risks & Mitigation:
1. Schema design issues
   → Weekly schema reviews
2. Performance regressions
   → Load testing before each phase
3. Breaking changes for clients
   → Maintain REST parallel for 3 months

Success Metrics:
- Reduce API calls by 40%
- Improve response times by 25%
- Client satisfaction > 8/10

Ready to proceed with Week 1-2? (y/n)

Maximum Depth (ultrathink)

Command:

/plan-mode "Design scalable microservices architecture" --ultrathink --architecture

Claude's Comprehensive Analysis:

[Extended Thinking Mode: ultrathink]
[This may take 5-10 minutes for thorough analysis]

Phase 1: Requirements Analysis

Current System:
- Monolithic architecture (250K LOC)
- PostgreSQL database (2TB)
- Peak load: 10K req/s
- Team: 20 developers
- Deployment: Weekly releases

Pain Points:
- Deployment requires full system downtime
- Database bottleneck at peak load
- Slow feature velocity (conflicting changes)
- Scaling inefficient (must scale entire monolith)

Goals:
- Zero-downtime deployments
- Independent service scaling
- Faster feature delivery
- Improved fault isolation

Phase 2: Service Decomposition Strategy

Boundary Identification:

1. User Service
   - Domain: Identity, authentication
   - Data: 5M users, 100MB
   - Load: 2K req/s
   - Team: 3 developers

2. Product Service
   - Domain: Catalog, inventory
   - Data: 1M products, 50GB
   - Load: 5K req/s
   - Team: 5 developers

3. Order Service
   - Domain: Transactions, fulfillment
   - Data: 10M orders, 500GB
   - Load: 1K req/s
   - Team: 4 developers

4. Payment Service
   - Domain: Transactions, invoice records
   - Data: 8M transactions, 200GB
   - Load: 800 req/s
   - Team: 3 developers

5. Notification Service
   - Domain: Email, SMS, push
   - Data: Events only
   - Load: 3K req/s
   - Team: 2 developers

Phase 3: Technology Stack

```yaml
Services:
  user-service:
    runtime: Node.js (Fast user queries)
    database: PostgreSQL (ACID for users)
    cache: Redis (Session storage)

  product-service:
    runtime: Node.js (Heavy read workload)
    database: PostgreSQL (Primary)
    cache: Redis (Product catalog)
    search: Elasticsearch (Full-text search)

  order-service:
    runtime: Node.js (Transaction handling)
    database: PostgreSQL (Strong consistency)
    message-queue: RabbitMQ (Order processing)

  payment-service:
    runtime: Node.js (PCI compliance)
    database: PostgreSQL (Financial data)
    encryption: At-rest and in-transit

  notification-service:
    runtime: Node.js (I/O heavy)
    queue: RabbitMQ (Async delivery)
    providers: SendGrid, Twilio, FCM

Phase 4: Communication Patterns

Synchronous (REST/GraphQL):

  • User → Product (Browse catalog)
  • Order → Payment (Process transaction)

Asynchronous (Event-Driven):

  • Order Created → Notification (Send confirmation)
  • Payment Success → Order (Update status)
  • Product Updated → Search (Index update)

Phase 5: Data Management

Database Per Service:

  • User Service: users DB
  • Product Service: products DB
  • Order Service: orders DB
  • Payment Service: payments DB

Shared Data Access Patterns:

  1. API calls (preferred)
  2. Event sourcing (eventual consistency)
  3. CQRS (read replicas)

Phase 6: Migration Strategy (12 months)

Quarter 1: Foundation

  • Week 1-4: Setup Kubernetes cluster
  • Week 5-8: Implement edge routing layer
  • Week 9-12: Extract User Service (lowest risk)

Quarter 2: Core Services

  • Week 13-18: Extract Product Service
  • Week 19-24: Extract Order Service

Quarter 3: Financial Systems

  • Week 25-32: Extract Payment Service (highest risk)
  • Week 33-36: Audit and compliance

Quarter 4: Supporting Services

  • Week 37-42: Extract Notification Service
  • Week 43-48: Decommission monolith
  • Week 49-52: Optimization and monitoring

Phase 7: Infrastructure

Kubernetes:
  nodes: 20 (auto-scaling 10-50)
  namespaces: dev, staging, production

Service Mesh (Istio):
  - Traffic management
  - Circuit breaking
  - Mutual TLS
  - Observability

Monitoring:
  - Prometheus (metrics)
  - Grafana (dashboards)
  - Jaeger (distributed tracing)
  - ELK Stack (logging)

CI/CD:
  - GitHub Actions
  - ArgoCD (GitOps)
  - Canary deployments

Phase 8: Risk Assessment

High Risk:

  1. Data consistency during migration Mitigation: Dual-write pattern, verify before cutover
  2. Service discovery failures Mitigation: Health checks, circuit breakers
  3. Distributed transaction complexity Mitigation: Saga pattern, compensating transactions

Medium Risk:

  1. Team skill gaps Mitigation: Training program, pair programming
  2. Infrastructure costs increase Mitigation: Right-sizing, spot instances

Low Risk:

  1. Monitoring gaps Mitigation: Observability-first design

Phase 9: Success Metrics

Technical:

  • Deployment frequency: 1/week → 10/day
  • Lead time: 2 weeks → 2 days
  • MTTR: 4 hours → 30 minutes
  • Service uptime: 99.5% → 99.95%

Business:

  • Feature velocity: +200%
  • Cost per transaction: -30%
  • Customer satisfaction: +15%

Phase 10: Go/No-Go Decision

Recommendation: PROCEED

Reasoning:

  • Clear business case (velocity + uptime)
  • Manageable risk with mitigation plan
  • Team buy-in confirmed
  • Budget approved

Next Steps:

  1. Form migration team (5 engineers)
  2. Setup Kubernetes cluster (Week 1)
  3. Begin User Service extraction (Week 5)

Estimated Total Cost: $450K (infrastructure + developer time) ROI Timeline: 18 months

Approve architecture plan? (y/n)


## Thinking Levels Comparison

| Level | Time | Depth | Use Case |
|-------|------|-------|----------|
| think | 30s | Surface analysis | Quick decisions, simple tasks |
| think hard | 60-90s | Multiple alternatives | Feature planning, moderate complexity |
| think harder | 2-3min | Deep analysis, risks | Refactoring, architecture changes |
| ultrathink | 5-10min | Comprehensive strategy | System design, migrations |

## When to Use Each Level

### --think (Quick Planning)
- Adding a new API endpoint
- Fixing a known bug
- Writing a simple feature
- Code refactoring (small scope)

### --think-hard (Moderate Planning)
- Designing a new feature
- Database schema changes
- Integration with third-party service
- Performance optimization

### --think-harder (Deep Planning)
- Large refactoring projects
- Migration strategies
- Architecture improvements
- Complex debugging

### --ultrathink (Maximum Planning)
- Microservices architecture
- System-wide migrations
- Technology stack changes
- Multi-month projects

## Best Practices

1. **Plan Before Code**: Use `/plan-mode` before implementing complex features
2. **Interrupt When Needed**: Press ESC if Claude's plan goes off track
3. **Approve Before Proceeding**: Use `--approve-first` for critical changes
4. **Match Depth to Complexity**: Don't use ultrathink for simple tasks
5. **Review Alternatives**: Extended thinking evaluates multiple approaches
6. **Document Plans**: Plans serve as architecture documentation
7. **Iterate on Feedback**: Refine plan based on team input

## Integration with Other Commands

### Plan → TDD Workflow
```bash
/plan-mode "Add payment processing" --think-hard --no-implement
# Review plan
/tdd-workflow "Implement payment processing per plan" --unit

Plan → Subagents

/plan-mode "Refactor auth system" --think-harder --no-implement
# Review plan
/subagent-create --architect --code-reviewer --test-engineer
# Implement with specialist subagents

Plan → Checkpoints

/plan-mode "Database migration" --ultrathink
# Create checkpoint before proceeding
# Implement migration
# Rewind if issues arise

Source citations

Add this badge to your README

Show that Plan Mode & Extended Thinking for Claude Code is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/commands/plan-mode.svg)](https://heyclau.de/entry/commands/plan-mode)

How it compares

Plan Mode & Extended Thinking for Claude Code side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

Next steps differ across entries — use the actions in the table below to copy install commands and source links per resource.

Field

Activate Claude's extended thinking mode with multi-level planning depth from 'think' to 'ultrathink' for comprehensive strategy creation before implementation

Open dossier

Use the built-in /context command to inspect Claude Code's context-window usage, plus a custom .claude/commands recipe for repeatable codebase-context analysis before refactors.

Open dossier

A user-created custom slash command that runs a red-green-refactor TDD loop in Claude Code: write failing tests first, implement until they pass, then refactor. Built with the documented custom-command frontmatter and $ARGUMENTS substitution, not a built-in feature.

Open dossier

A user-created custom slash command for Claude Code that turns a file or function into a test suite. You create .claude/commands/generate-tests.md and invoke it with /generate-tests; it is a prompt recipe, not a built-in command, and uses no CLI flags.

Open dossier
Next stepsDiffers
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceSource-backedSource-backedSource-backedSource-backed
Submitter
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
Brand
Categorycommandscommandscommandscommands
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorJSONboredJSONboredJSONboredJSONbored
Added2025-10-252025-10-252025-10-252025-09-16
Platforms
Claude Code
Claude Code
Claude Code
Claude Code
Source repo
Safety notesReview generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project. Limit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output.The custom /analyze-context command makes Claude read files across your repository; scope it with a path argument to limit how much is pulled into context. Analysis output reflects Claude's reading of the code in that session, not a deterministic static-analysis tool — verify any load-bearing metrics or recommendations against the actual source.The base recipe does not pre-approve Bash commands. Review the project's test scripts first, then approve the exact test command when Claude Code prompts or add a narrowly scoped command only after you trust it. Claude may create and edit test and source files as part of the loop (Read/Edit/Write). Run it in version control so changes are reviewable and reversible. If you extend the prompt with auto-commit or deploy steps, add explicit safety review; the base recipe does not commit or push.The recipe asks Claude to run the test suite, which executes project code and test commands locally; review the source and tests before running, especially in an unfamiliar repository. If you add an allowed-tools field (e.g. Bash(npm test:*)), Claude can run those tool calls without a per-use permission prompt while the command is active. Scope it narrowly. Project-level .claude/commands files are shared via git and run for anyone who trusts the workspace; treat a checked-in command as executable content and review it before trusting the repo.
Privacy notesPrompts, source files, logs, errors, dependency metadata, and generated reports may be sent to the configured AI model during command execution. Redact secrets, customer data, private repository details, and proprietary code before sharing command output outside the workspace.Both /context and a custom analysis command operate on whatever files and project memory are loaded in the session; no data leaves your machine beyond the normal Claude Code model request, but file contents you ask Claude to read become part of the conversation context sent to the model.The command body can read project files via @ references and !`command` injection if you add them; only reference files you are comfortable sending to the model as prompt context. The base recipe asks you to inspect project test scripts instead of injecting package.json automatically.Dynamic-injection lines (!`...`) and @file references send the output of shell commands and the contents of referenced files into the model context; avoid pointing them at files containing secrets, credentials, or other sensitive data.
Prerequisites— none listed— none listed— none listed— none listed
Install
/plan-mode [task] [depth]
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.