Chapter 2: Build Core Todo
Plan Mode & Auto Mode
Plan Mode & Auto Mode
Before we start building, there's a workflow habit that will save you hours of rework: always plan first, then build. Claude Code has two powerful modes designed for exactly this.
This is the single most important workflow pattern in this course. Plan first. Build second. Every time.
Plan Mode — Think Before You Build
Plan mode tells Claude Code to plan what it will do without actually doing it. No files are written. No commands are run. It just thinks, outlines, and waits for your approval.
To enter plan mode, use the /plan slash command:
Then type:
/plan Add a todo list component that displays todos with checkboxes and a delete button
Claude Code will respond with a structured plan:
- Which files it will create or modify
- What the approach will be
- What components or patterns it will use
- Any decisions it needs your input on
Think of plan mode like a code review before the code exists. You catch bad decisions early — before they're spread across 10 files.
Why Plan First?
Without planning, here's what often happens:
- You ask Claude Code to build a feature
- It writes 5 files with an approach you didn't expect
- You notice a problem halfway through
- You try to course-correct, but the original approach is baked into the code
- You end up starting over or doing messy fixes
With plan mode:
- You ask Claude Code to plan the feature
- It outlines its approach — files, patterns, dependencies
- You review and say "yes" or "actually, use X approach instead"
- Only then does it build, following the agreed plan
- The result matches what you wanted the first time
Plan mode uses a technique Anthropic calls chain of thought — asking Claude to think through a problem step by step before acting. Research shows this dramatically improves accuracy for complex tasks. When you type /plan, you're giving Claude Code space to reason about file structure, dependencies, and approach BEFORE writing any code. That's the scientific reason plan-first produces better results: Claude has literally thought it through.
Auto Mode — Let Claude Build
Once you've reviewed and approved a plan, you can let Claude Code execute efficiently with auto mode. Start Claude Code with the --auto flag:
In auto mode, Claude Code will:
- Read and write files without asking for permission on each one
- Run safe commands (like installing packages) without pausing
- Still stop for anything potentially destructive
Only use auto mode after you've planned. Auto mode without a plan is like giving someone your car keys without telling them where to go.
The Plan → Build Workflow
Here's the pattern we'll use for every feature in this course:
- Plan it —
/plan [describe what you want]— review the approach - Refine it — give feedback: "use localStorage instead of a database" or "split that into two components"
- Build it — approve the plan, let Claude Code execute (optionally with
--auto) - Verify it — check the result, test it, iterate if needed
Plan Mode in Practice
Let's try it right now with our todo app. In Claude Code, type:
/plan I want to build a todo app with Next.js. The data model should have: id, text, completed, category, priority, and dueDate. I want to start with just displaying a list and adding new todos.
Read what Claude Code proposes. Does it match your mental model? If not, tell it what to change. This is your chance to steer — it's much cheaper to change a plan than to change code.
Make this a habit. For every feature in this course, we'll start with /plan. By the end, you'll do it instinctively in your own projects. The best Claude Code users plan 20% of the time and build 80%. The worst ones build 100% and redo 50%.
Quick Reference
| Mode | When to use | How to use |
|---|---|---|
| Plan mode | Before building any feature | /plan [description] |
| Auto mode | After plan is approved, for execution | claude --auto '[task]' |
| Default mode | Learning, exploring, small edits | Just type normally |
From this point forward, every build section in this course will start with a plan step. Let's go build our data model — starting with /plan, of course.