Planning & Thinking
Use extended thinking mode and planning prompts to have Claude reason deeply before coding — ideal for complex architecture decisions and multi-step tasks.
Why Planning Matters
For complex tasks — refactoring a module, designing an API, or implementing a multi-file feature — you don't want Claude to start coding immediately. You want it to think first, code second. Planning mode lets Claude reason through the problem before writing a single line.
Extended Thinking
Claude Code supports extended thinking — a mode where Claude takes extra time to reason through complex problems before responding. You can trigger this with specific keywords in your prompt:
# Trigger levels of thinking:
> think about how to restructure the auth module
> think hard about the best database schema for this feature
> ultrathink about the migration strategy from REST to GraphQL
Thinking Levels
| Keyword | Thinking Budget | Best For |
|---|---|---|
think | Standard | Moderate complexity tasks |
think hard | Extended | Complex logic, multi-file changes |
ultrathink | Maximum | Architecture decisions, complex algorithms |
When extended thinking is active, Claude takes longer to respond but produces significantly better plans and implementations for complex tasks.
Planning Before Coding
For any non-trivial task, ask Claude to plan first:
# Ask for a plan, not code
> Plan how you would add real-time notifications to this app. Don't write any code yet.
# Claude responds with:
# 1. Analysis of current architecture
# 2. Technology choices (WebSockets vs SSE)
# 3. Files that need to change
# 4. Step-by-step implementation order
# 5. Potential challenges and solutions
Review the plan, suggest modifications, and only then tell Claude to proceed with implementation.
The Plan → Implement → Verify Loop
The most effective workflow with Claude Code follows three phases:
Phase 1: Plan
> I need to add user roles (admin, editor, viewer) to the app.
> Think hard about this and create a detailed plan. Don't write code yet.
Phase 2: Implement
> The plan looks good. Go ahead and implement it step by step.
Phase 3: Verify
> Now run the tests and verify everything works.
> Check for any TypeScript errors with npm run build.
When to Use Planning Mode
- Multi-file features — Changes that span 3+ files benefit from upfront planning
- Architecture decisions — Choosing between approaches (REST vs GraphQL, SQL vs NoSQL)
- Refactoring — Restructuring existing code without breaking functionality
- Complex debugging — Tracing issues through multiple layers of the stack
Tips for Better Plans
- State constraints — "Must be backward compatible" or "Can't add new dependencies"
- Mention existing patterns — "Follow the same pattern as the users module"
- Ask for alternatives — "Give me 2-3 different approaches with trade-offs"
- Set scope boundaries — "Only modify the backend, don't touch the frontend"
What's Next
In the next episode, we'll cover Slash Commands — built-in shortcuts like /compact, /clear, /cost, and custom slash commands for your own workflows.