Claude Code's workflow docs are a menu.

Claude Code’s workflow docs are a menu.

Claude Code 的工作流文档是一份菜单。

Here is what a real solo founder orders. 这就是一位真正的独立创始人所“点”的菜单。

$ git worktree list ~/app a1b2c3d [main] ~/app-review e4f5g6h [review-branch] ~/app-content i7j8k9l [draft-post]

Three checkouts. One machine. Each one runs its own Claude Code session that cannot touch the others. That is a normal workday for me. I run a one person shop. Content and code, same desk, same hour. 三个工作树(checkout)。同一台机器。每一个都运行着独立的 Claude Code 会话,互不干扰。这就是我正常的工作日。我经营着一家一人公司,内容与代码,同一张桌子,同一个小时。

Anthropic’s common workflows page lists about a dozen recipes for everyday work, and the docs are strong. What they do not tell you is which recipes survive contact with a real workday and which ones stay theory. After running Claude Code as my whole operation, five workflows carry the load. Here is the honest split. Anthropic 的常用工作流页面列出了大约十几种日常工作方案,文档写得很棒。但他们没告诉你的是,哪些方案在真实的工作日中经得起考验,而哪些仅仅停留在理论层面。在将 Claude Code 作为我全部的操作工具后,有五个工作流承担了核心任务。以下是我的真实心得。

https://code.claude.com/docs/en/common-workflows

1. Worktrees changed how I work

1. 工作树(Worktrees)改变了我的工作方式

The problem worktrees solve is collision. You ask Claude to fix a bug. While it edits, you want to keep building a feature. Same repo, two streams of edits, and now your working tree is a fight nobody wins. A git worktree is a second checkout of the same repo on its own branch. Claude runs inside it and never sees the other windows. 工作树解决的问题是冲突。你让 Claude 修复一个 Bug,在它编辑的同时,你还想继续开发一个新功能。同一个仓库,两条编辑流,你的工作目录就会陷入一场谁也赢不了的混战。Git 工作树是同一个仓库在不同分支上的第二个检出。Claude 在其中运行,完全看不到其他窗口的内容。

claude --worktree feature-auth

Real scenario from this week. The post you are reading was drafted in one worktree while a separate Claude session reviewed an open pull request in another. Neither touched the other’s files. When the review finished I merged, came back to the draft, and never lost my place. If you take one workflow from the docs, take this one. The setup cost is close to nothing and parallel agents stop stepping on each other. 这是本周的一个真实场景:你正在读的这篇文章是在一个工作树中起草的,而另一个 Claude 会话同时在另一个工作树中审查一个打开的 Pull Request。两者互不干扰。审查结束后,我合并了代码,回到草稿,进度丝毫不受影响。如果你只能从文档中选一个工作流,就选这个。设置成本几乎为零,且并行代理再也不会互相干扰了。

2. Subagents protect the one resource you cannot buy more of

2. 子代理(Subagents)保护了你无法购买的资源

The model’s working memory is your budget. Every file Claude reads to answer a question spends it. Ask “how does our auth refresh work” in a large repo and Claude reads a pile of files to answer. Those files now sit in the window for the rest of the session, crowding out the work you care about. Delegate that to a subagent. 模型的工作记忆就是你的预算。Claude 为了回答问题所读取的每一个文件都在消耗它。在一个大型仓库中问“我们的认证刷新是如何工作的”,Claude 会读取一堆文件来回答。这些文件会留在窗口中,占据后续会话的空间,挤占你真正关心的工作。把这些任务委托给子代理吧。

use a subagent to investigate how our auth system handles token refresh

The subagent reads in its own window and reports back a summary. Your main session stays clean. I lean on this every time I research before I write. A scout goes out, does the reading, comes back with the findings, and my working session never fills up with raw source. How long a session stays sharp is the whole game, and a subagent is what keeps it sharp. 子代理在自己的窗口中读取并汇报摘要。你的主会话保持整洁。每次写作前的调研,我都会依赖这个功能。就像派出一个侦察兵,它去阅读、带回结论,而我的工作会话永远不会被原始代码填满。会话能保持多久的高效是关键,而子代理就是保持高效的秘诀。

3. Plan mode is the seatbelt before production

3. 计划模式(Plan mode)是生产环境前的安全带

I keep a live app with real users on the line. I do not let Claude edit it blind. Plan mode makes Claude read and propose before it touches disk. Nothing changes until I approve it. 我维护着一个有真实用户在线的应用程序。我不会让 Claude 在盲目的情况下进行编辑。计划模式让 Claude 在触碰磁盘前先进行阅读并提出方案。在我批准之前,什么都不会改变。

claude --permission-mode plan

Mid session you can press Shift+Tab to toggle it on. I treat it as the default for anything near production. Read first, plan, approve, then edit. Those few seconds of review have saved me from changes I did not want more than once. 在会话中,你可以按 Shift+Tab 随时切换开启。对于任何接近生产环境的操作,我都将其设为默认。先阅读、再计划、批准,最后编辑。这几秒钟的审查已经不止一次帮我避免了不必要的改动。

4. Resume and PR linking kill the re-explaining tax

4. 恢复会话与 PR 链接消除了“重新解释成本”

Real work spans more than one sitting. The expensive part of coming back is re-explaining what you were doing. Claude Code saves every conversation locally, so you do not have to. 真正的工作往往跨越多个时段。回归工作时最昂贵的成本就是重新解释你之前在做什么。Claude Code 会在本地保存每一次对话,所以你不需要手动记录。

claude --continue

That picks up the most recent session in the current directory. When I open a pull request with gh pr create, the session links to it, and claude --from-pr <number> drops me back into that exact session days later. For a knowledge vault I edit across a week, this is the difference between continuity and starting cold every morning. 这会接续当前目录下最近的一次会话。当我用 gh pr create 创建 Pull Request 时,会话会与之关联,几天后通过 claude --from-pr <number>,我能直接回到那个精确的会话中。对于我每周都要编辑的知识库来说,这就是“保持连贯性”与“每天早上从零开始”的区别。

5. The headless trap is the one I warn people about

5. 我要提醒大家注意“无头模式”陷阱

The docs show you can pipe Claude into scripts for CI and batch jobs. 文档显示你可以将 Claude 通过管道接入 CI 和批处理脚本中。

git log --oneline | claude -p "summarize these recent commits"

It is a real feature and it is useful. Here is the part the docs cannot tell you. On 15 June 2026 Anthropic split Agent SDK billing from the subscription. Headless claude -p runs now bill against the SDK, not against your Pro or Max seat. A nightly cron you set up months ago and forgot about can quietly change the shape of your bill. 这是一个真实且有用的功能。但文档没告诉你的是:2026 年 6 月 15 日,Anthropic 将 Agent SDK 的计费与订阅分开了。无头模式的 claude -p 运行现在是按 SDK 计费,而不是扣除你的 Pro 或 Max 会员额度。你几个月前设置并遗忘的定时任务(cron),可能会悄悄改变你的账单结构。

My move was to stop reaching for headless as a reflex. For recurring work I prep the data in a plain shell job and consume it inside an interactive session with subagents, which stays inside the subscription. Same outcome, predictable cost. If you automate Claude, know which side of that billing line your job runs on before you schedule it. 我的做法是停止将“无头模式”作为反射性选择。对于重复性工作,我会在普通的 Shell 任务中准备好数据,然后在带有子代理的交互式会话中使用它,这样就依然在订阅额度内。结果相同,成本可控。如果你要自动化 Claude,在安排任务前,请务必搞清楚你的任务属于哪种计费方式。

One habit that compounds quietly

一个悄悄产生复利的好习惯

Use @ to pull a file or directory straight into the session instead of waiting for Claude to find it. 使用 @ 直接将文件或目录拉入会话,而不是等待 Claude 自己去寻找。

Explain the logic in @src/utils/auth.js

And when text is the wrong tool, paste a screenshot. Drag an image into the window, or paste it with ctrl+v, and Claude reads it. My fastest bug reports are a screenshot of the error and one line of “what is causing this”. The picture carries the detail I would have spent five sentences describing. 当文字不是合适的工具时,粘贴截图。将图片拖入窗口,或用 Ctrl+V 粘贴,Claude 就能读取它。我最快的 Bug 报告方式就是一张错误截图加上一行“这是什么原因导致的”。图片承载的细节,如果用文字描述,我可能需要写上五句话。

The honest scorecard

诚实的评分表

WorkflowWhen it earns its slot
WorktreesThe moment you run more than one stream of work at once
SubagentsResearch or exploration in a repo big enough to flood the window
Plan modeAnything within reach of production
Resume and PR linkWork that crosses more than one sitting
Headless pipeCI and batch, with eyes open on billing
工作流适用场景
工作树当你同时进行多项工作流时
子代理在大型仓库中进行调研或探索,避免窗口信息过载时
计划模式任何触及生产环境的操作
恢复与 PR 链接跨越多个时段的工作
无头管道CI 和批处理,且需时刻关注计费时

Prompt recipes

提示词方案

Daily, but you learn these in a day. The prompt recipes in the first half of the docs are worth reading once. They are good habits and you absorb them fast. The five above are different. They change how much work fits in a day, not how you phrase a single ask. 这些方案每天都在用,但一天就能学会。文档前半部分的提示词方案值得一读,它们是很好的习惯,你很快就能吸收。但上面提到的五个工作流不同,它们改变的是你一天能完成的工作量,而不是你如何措辞一个请求。

One more is coming. Anthropic shipped dynamic workflows in research preview on 28 May 2026, where a script orchestrates subagents and only the final answer reaches the conversation. That is the next rung above everything here, and it deserves its own write up once it leaves preview. 还有一个新东西即将到来。Anthropic 在 2026 年 5 月 28 日发布了动态工作流的研究预览版,脚本可以编排子代理,只有最终答案才会进入对话。这是比上述所有内容更高一级的台阶,等它脱离预览版后,值得专门写一篇文章来介绍。

What workflow from your own setup earns its slot that a newcomer would skip? I want the one that is not in the docs. 在你自己的配置中,有哪些工作流是你觉得必不可少,但新手却容易忽略的?我想要那些文档里没提到的。