我测试的需求是一个 TypeScript 番茄钟 CLI 工具,要求有倒计时、提示音、自定义时长、本地记录和统计功能。Claude 输出的计划包含 6 个源文件、3 个测试文件、1 个运行时依赖。
不用 Plan Mode 的时候,Claude Code 拿到需求就开始写。简单项目没问题,但稍微复杂一点的项目(多个文件、模块间有依赖),写到一半发现架构不对是常事。
Step 1: Enter Plan Mode
Open your terminal and start Claude Code. Paste in your project requirements, then press Shift+Tab. The status in the bottom left changes to “plan”.
Claude won’t write code yet. Instead, it outputs an implementation plan: project structure, module breakdown, dependencies, data format, and design decisions.
For this test, I used a TypeScript Pomodoro CLI tool requiring countdown display, system sounds, custom durations, local session recording, and weekly stats. Claude’s plan included 6 source files, 3 test files, and 1 runtime dependency.
Note: Plan Mode is a Claude Code CLI feature, not available in the claude.ai web interface.
Step 2: Review and adjust the plan
Don’t approve the plan immediately. Read through it and push back on anything that doesn’t look right.
For example, if files are split too granularly, say so. If you don’t want a particular dependency, tell Claude. It will revise the plan.
The key: keep each plan step to 2-3 sentences. Too vague and the implementation drifts. Too detailed and Claude copies the plan verbatim instead of thinking about the best approach.
Note: For large projects, plan in phases. Planning 20 files at once loses detail. Better to do 3-4 phases of 5-6 files each.
Step 3: Implement code following the plan
Once the plan looks good, press Shift+Tab again to exit Plan Mode. Claude starts implementing step by step.
In testing, Claude followed a TDD workflow: write tests first, verify they fail, implement the code, verify tests pass. Each completed module gets an automatic commit.
Final results:
- 6 atomic commits
- 11 tests all passing (storage 4, timer 4, stats 3)
- Type-check clean
- Automatic branch push and PR creation
Total time: 8 minutes 22 seconds.
Step 4: Run and verify
After implementation, test with short durations:
npx tsx src/index.ts --work 0.1 --break 0.1
A full work+break cycle completes in 6 seconds. Countdown works, notification sound plays.
npx tsx src/index.ts stats
Weekly stats display correctly.
The complete Pomodoro CLI source code is on GitHub: zhengxuyu/pomodoro-cli
To use it: clone the repo, run npm install && npx tsx src/index.ts.
Why use Plan Mode?
Without Plan Mode, Claude Code starts writing as soon as it gets requirements. Fine for simple projects, but anything with multiple files and module dependencies risks mid-project rewrites when the architecture turns out wrong.
Plan Mode’s value is simple: you see what Claude intends to build before it starts. Changing a plan is much cheaper than changing code.
For simple tasks (one file, one function), skip Plan Mode and just code directly.
⬆️ Upgrade path
| Tool | Price | Value |
|---|
| Claude Pro | $20/mo | Unlimited conversations + larger context window |
| Claude Max | $100/mo | Highest priority + more Opus usage |