Claude Code 101 系列教程 · 第 6 课
2026-05-20
Claude Code 101 系列教程 · 第 6 课 · 来自 Claude 官方频道
如果你只从 Claude Code 记住一件事,那就是这个工作流:Explore → Plan → Code → Commit。
大多数人的错误是直接让 Claude 写代码——这意味着后续需要更多的纠正。
最快的方式是进入 Plan Mode。在 Plan Mode 中,Claude 不能编辑文件,只能读取文件做研究。
按 Shift + Tab 直到输入框下方显示 Plan Mode。
I need to add WebP conversion to our image upload pipeline.
Figure out where in the pipeline it should happen,
whether we need new dependencies, and how to approach it.
Claude 会:
Review 计划! 如果不满足要求,可以让 Claude 修改或补充。这是在代码编写之前纠错的最佳时机。
当计划看起来不错,选择 Approve 接受计划。
Claude 会将计划中的所有待办项转换为可勾选的列表项,然后逐步执行。
你也可以不在 Plan Mode 中使用 Explore——只需直接让 Claude 探索你的代码库即可。
决定 Claude 是 Auto Accept 文件编辑还是每次都要许可。
Claude 会尽力排错,但有时你也需要介入纠正。
Plan Mode 的好处:计划完成后,Claude 拥有完整的上下文——它知道每一步是如何推导的,这有助于后续决策。
在写计划时,明确写出成功的标准——Claude 需要知道什么才算”做对了”。
减少反复沟通的最好方式是给 Claude 配备合适的工具:
Claude 甚至可以帮你写测试。但要确保测试是你和团队的真相来源,避免假阳性。
测试通过、你满意后,就到了推送代码的时候。
Explore → Plan → Code → Commit → Explore → Plan → ...
本教程基于 Claude 官方视频 The Explore → Plan → Code → Commit Workflow 整理,属于 Claude Code 101 系列第 6 课。