⚠️ 源单薄性声明 本条目的视角以 Anthropic 官方 best-practices 和 Boris Cherny 个人 tip 为主——都是 Claude Code 创造者视角。没有外部作者的独立比较(比如 Cursor/Windsurf 用户对 Plan Mode 的看法)。 已讲清楚:Plan Mode 是什么、怎么进、官方推荐的 4 阶段工作流 还没听到:什么场景 Plan Mode 反而拖慢、非 Claude Code 用户的类似做法
一句话
**Plan Mode = 让 Claude 只读不写的”先看后动”模式。**起手按 Shift+Tab 两次进 Plan Mode,先让它出方案、迭代到满意,再切回来让它实现。
为什么起手要 Plan Mode
来源:best-practices-page.md 的 “Explore first, then plan, then code” 段 + Boris tip 6。
核心问题:Claude 默认会直接动手——如果你的需求它理解偏了,它就把错的东西实现了一遍。你发现时已经晚了。
Boris tip 6 的原话(how-boris-uses-cc.md):
“Most sessions start in Plan mode (
shift+tabtwice). Boris iterates on the plan with Claude until it’s solid, then switches to auto-accept mode.”
路径:Plan mode → Refine plan → Auto-accept edits → Claude 1-shots it
官方 best-practices-page.md 的 Plan Mode 段说法一致:
“Letting Claude jump straight to coding can produce code that solves the wrong problem. Use Plan Mode to separate exploration from execution.”
四阶段工作流(官方版)
best-practices-page.md 给的标准流程:
Phase 1 · Explore(Plan Mode 内)
read /src/auth and understand how we handle sessions and login.
also look at how we manage environment variables for secrets.
让 Claude 读懂相关代码——它只读,不改。
Phase 2 · Plan(Plan Mode 内)
I want to add Google OAuth. What files need to change?
What's the session flow? Create a plan.
让 Claude 出详细计划。关键技巧:按 Ctrl+G 把 plan 在你的文本编辑器里打开,直接改它——比在对话里反复说更快。
Phase 3 · Implement(切回 Normal Mode)
implement the OAuth flow from your plan. write tests for the
callback handler, run the test suite and fix any failures.
Plan 定好了 → Shift+Tab 切回 Normal 或 acceptEdits mode → Claude 按 plan 实现。
Phase 4 · Commit
commit with a descriptive message and open a PR
五种权限模式全景(permission-modes.md)
Plan Mode 只是其中之一:
| Mode | 什么不用问直接做 | 适合场景 |
|---|---|---|
default | 只有 Read | 刚起步、敏感任务 |
acceptEdits | Read + 文件编辑 + 常用文件系统命令 | 你在盯着看的迭代 |
plan | 只有 Read | 动手前探索代码库 |
auto | 全部,带后台安全检查 | 长任务、减少弹窗 |
dontAsk | 只有 pre-approved 的工具 | 锁死的 CI / 脚本 |
bypassPermissions | 全部(保护路径除外) | 隔离容器/VM only |
切换
- session 内:
Shift+Tab循环default → acceptEdits → plan - 启动时:
claude --permission-mode plan - 设为默认:
settings.json里
{
"permissions": {
"defaultMode": "acceptEdits"
}
}什么时候不用 Plan Mode
best-practices-page.md 明说:
“Plan Mode is useful, but also adds overhead. For tasks where the scope is clear and the fix is small (like fixing a typo, adding a log line, or renaming a variable) ask Claude to do it directly. Planning is most useful when you’re uncertain about the approach, when the change modifies multiple files, or when you’re unfamiliar with the code being modified. If you could describe the diff in one sentence, skip the plan.”
用 Plan Mode 的判断公式:
- 改一个地方 + 你能用一句话描述 diff → 不用 Plan
- 多文件 + 方法不确定 + 你不熟这块代码 → 一定用 Plan
陈彬视角
这是最容易被新手忽略的一个动作。新手拿到 Claude Code 第一反应是”有需求就讲,让它做”——跳过 Plan 直接干。结果经常是:跑完一轮才发现”不是这个意思”,要么 /rewind(见 Checkpointing 与 rewind),要么手动回滚。Plan Mode 慢 2 分钟,省后面 30 分钟返工(Boris 原话)。
另一个反直觉的点:Plan Mode 不只用在大事上。中等任务(改几个文件但思路不确定)也值得 plan 一下——不是怕做错,是怕”做了但方向对半”。对半的事最难回滚。
关联
- 紧邻:案例_Boris 怎么用 Claude Code(tip 6 原出处)
- 互补:Checkpointing 与 rewind(动手后发现错,用 rewind)
- 前置:Claude Code 入门
needs_sources(明确待补)
- 非 Anthropic 系作者的 Plan Mode 批评或变体
- Plan Mode 反而拖慢的反面案例