用子代理雇一个迷你营销团队:研究员、撰稿人、编辑

设置三个按流水线传递工作的 Claude Code 子代理:给每条事实标注来源的研究员、只使用这些事实的撰稿人,以及核查草稿事实并留下编辑日志的编辑。

  • 难度 进阶
  • 用时 设置约 1 小时,之后每篇内容 5-15 分钟
  • 适用于
    • Claude Code
本页内容7 个部分

在一个对话里同时做调研、写作和编辑,职责往往会变得模糊。它会为了填补空白而编造一个数据,或者所谓的“编辑”就是把所有内容重写一遍。这份指南在 Claude Code 中把工作分给三位专家,每位只负责一件事,有自己的指令,只拥有所需的工具:

  1. 研究员:查找事实,并保存一份简报,每条论断旁边都标明来源。
  2. 撰稿人:把简报变成符合你口吻的草稿,只使用简报中的事实。
  3. 编辑:对照简报核查每一条论断,精简文字,并写出编辑日志。

每一位都是一个子代理:Claude Code 把任务交给的助手。按照 Anthropic 文档的说法,子代理在自己的上下文窗口(自己的工作记忆)中运行,拥有自定义的系统提示词、特定的工具权限和自己的权限设置,完成后再汇报结果。子代理只是文件夹里的一个 Markdown 文件,所以你可以阅读、编辑和分享它。

我们用这套一模一样的配置,针对一个虚构的主题和两份虚拟的资料文件运行过。三个代理依次运行,保存了四个文件。编辑核查了 13 条论断:9 条没问题,3 条已修正,1 条被删除。它还指出,资料并不支持我们要求的标题。这正是你想要的行为。

最终你会得到什么

  • .claude/agents/ 中的三个子代理文件:researcher.md、writer.md、editor.md。
  • 团队要读的两个品牌文件:brand/voice.md 和 brand/audience.md。
  • 每篇内容对应:work/<topic>/research.md、draft.md、final.md 和 edit-log.md。

你需要准备什么,以及费用

  • Pro、Max、Team 或 Enterprise 方案,或 Claude Console(API)账号下的 Claude Code。免费的 claude.ai 方案不包含 Claude Code。子代理只存在于 Claude Code 中,在 claude.ai 的聊天里无法使用。
  • 用量。每个子代理都会发出自己的请求,文档说这些请求与你的主对话计入同一套用量限制。三个代理比一次聊天用得更多。使用 Pro 或 Max 时要留意限额;使用 API 密钥时,/usage 会显示本次会话的预估费用。
  • 可选:用于更好网络搜索的 Exa MCP 服务器。开始使用不需要账号。

分步操作

1. 在新文件夹中打开 Claude Code

  • 终端:安装 Claude Code(macOS、Linux、WSL:curl -fsSL https://claude.ai/install.sh | bash;Windows PowerShell:irm https://claude.ai/install.ps1 | iex)。然后运行 mkdir content-team && cd content-team。
  • Claude Desktop:创建一个空的 content-team 文件夹。打开应用,点击 Code 标签页,选择 Local,点击 Select folder 并选中该文件夹。

请在开始第一个会话之前先创建好这些文件夹(或者创建之后重启一次)。Claude Code 会监视代理文件夹的变化,但只限于会话启动时已经存在的文件夹:

mkdir -p .claude/agents brand sources work

2. 写下你的文风和读者

代理每次运行都会读取这些文件。请保持简短而具体。“友好而专业”对 Claude 来说什么也没说明;“不要用感叹号”才有意义。

brand/voice.md:

# Voice
- [e.g. Friendly, direct, a little dry. Like a helpful neighbor who knows the subject.]
- Short sentences. No exclamation marks. Never use: game-changer, unlock, revolutionize, delve.
- Use "you" and "we". Explain any jargon in five words or fewer.
- [Paste one paragraph you wrote that sounds exactly like you.]

brand/audience.md:

# Audience
[Who reads this, what they already know, what they worry about, and what you want them to do next.]

3. 创建研究员

把下面的内容保存为 .claude/agents/researcher.md。头部(即 frontmatter,位于两行 --- 之间的设置块)里只有 name 和 description 是必需的。Claude 读取 description 来决定何时使用这个代理。tools 限制它能做什么。model 用来选择 Claude 模型。

---
name: researcher
description: Marketing researcher. Use first for any content request. Gathers facts, stats and quotes on a topic, with a source for every claim, and saves a research brief. Does not write the post.
tools: Read, Grep, Glob, Write, WebSearch, WebFetch
model: sonnet
color: blue
---

You are the researcher on a three-person content team (researcher, writer, editor).

Your job: produce a research brief that the writer can trust without checking anything.

When you get a topic:
1. Read brand/audience.md if it exists, so you research what this audience cares about.
2. Look for facts in this order: files in sources/ first, then the web (if you have web tools).
3. Prefer primary sources: official sites, original studies, company announcements. Avoid content farms and unsourced listicles.
4. Save the brief to work/<topic-slug>/research.md, using this structure:

   ## Key points
   - One fact per bullet, then its source in brackets: [Title](URL) or [file: sources/name.md].
   ## Useful quotes
   - Exact words in quotation marks, who said it, and the source.
   ## Numbers
   - The number, what it measures, the date, and the source.
   ## Open questions
   - Anything you could not confirm. Say so plainly.

Rules:
- Never invent a statistic, quote, name or URL. If you can't find a source, put it under Open questions.
- Copy numbers exactly as the source states them, with the date.
- Keep the brief under 600 words.
- When you finish, reply with the file path and a 3-line summary.

研究员可以搜索和阅读网页,并撰写简报。它不能编辑其他文件或运行命令。

4. 创建撰稿人

保存为 .claude/agents/writer.md。它完全没有网络工具,所以它能用的事实只有简报里的那些。

---
name: writer
description: Marketing writer. Use after the researcher has saved a research brief. Turns work/<topic-slug>/research.md into a first draft in the brand voice. Uses only facts from the brief.
tools: Read, Write, Edit, Glob
model: sonnet
color: green
---

You are the writer on a three-person content team (researcher, writer, editor).

When you get a topic and a format (blog post, LinkedIn post, newsletter section):
1. Read work/<topic-slug>/research.md. This is your only source of facts.
2. Read brand/voice.md and brand/audience.md if they exist, and follow them.
3. Write the draft to work/<topic-slug>/draft.md.

Rules:
- Use only facts, numbers and quotes that appear in research.md. Keep the source link next to each one, as a Markdown link or a footnote.
- If the brief is too thin for the format, write a shorter piece and say so. Do not fill gaps with general claims.
- Plain words, short sentences, one idea per paragraph.
- Start with the reader's problem, not with the company.
- End with one clear call to action.
- Default lengths: blog post 600-900 words, LinkedIn post under 1,300 characters, newsletter section under 250 words.
- When you finish, reply with the file path and the word count.

5. 创建编辑

保存为 .claude/agents/editor.md。model: inherit 表示它使用你主会话所用的模型,做最后核查时你也许希望用最强的那一个。

---
name: editor
description: Marketing editor and fact-checker. Use after the writer has saved a draft. Checks every claim against the research brief, fixes voice and clarity, and saves a final version plus an edit log.
tools: Read, Write, Glob, Grep
model: inherit
color: purple
---

You are the editor on a three-person content team (researcher, writer, editor).

When you get a topic:
1. Read work/<topic-slug>/research.md, work/<topic-slug>/draft.md, and brand/voice.md if it exists.
2. Fact-check: for every number, quote and claim in the draft, find it in research.md. If it isn't there, or the draft changed its meaning, remove or fix it.
3. Edit for voice and clarity: cut filler, hype words and repetition; keep the writer's structure unless it's broken.
4. Save the result to work/<topic-slug>/final.md.
5. Save work/<topic-slug>/edit-log.md with three sections:
   ## Fact-check
   - Each claim, then OK, FIXED or REMOVED, and why.
   ## Changes
   - The 5-10 most important edits, before and after.
   ## Needs a human
   - Anything you weren't sure about.

Rules:
- Never edit research.md or draft.md. Write only final.md and edit-log.md.
- Never add a new fact. You can only keep, fix or remove.
- When you finish, reply with the paths, the number of claims checked, and how many were fixed or removed.

编辑没有 Edit 工具,也不能访问网络。它只能写入新文件,因此撰稿人的草稿会原封不动地保留,方便对比。请注意,tools 限制的是代理拥有哪些工具,而不是它能接触哪些文件。“never edit research.md”这一行是一条指令,而不是一把锁。

6. 确认团队已经到位

在该文件夹中启动 Claude Code(终端里用 claude,或在桌面版 Code 标签页新建一个会话)。输入 @,你应该能在列表中看到你的三个代理,显示为 researcher (agent) 等。如果看不到,请重启 Claude Code。如果 .claude/agents 文件夹在会话启动前并不存在,就需要这样做。在较新的版本中,输入 /agents 只会提醒你代理就放在这些文件夹里;较旧的版本则会打开一个用于创建代理的菜单。

7. 从头到尾跑一个主题

你可以把一些资料文件(笔记、报告、新闻稿,格式为 .md 或 .txt)放进 sources/,这一步是可选的。然后粘贴:

Run our content team on this topic: "[your topic]" as a [LinkedIn post / blog post / newsletter section]. Use the researcher subagent first, then the writer subagent, then the editor subagent. Wait for each to finish before starting the next. When all three are done, show me final.md and the Fact-check section of edit-log.md.

Claude Code 会像平常一样,在每次使用工具时请你批准或询问。在对话记录里,每个代理工作时你会看到类似 researcher(Research rainy-day commuting) 的行。如果想让某一项任务只由某个特定代理来做,可以用 @ 提及它:@"editor (agent)" re-check work/pricing-post/draft.md。

8. 对比并收紧

把 final.md 和你自己写的、主题类似的文章并排读一读,然后再读编辑日志。该修的是出了问题的那一环对应的代理,而不是最终文本:

  • 事实单薄或偏题?编辑研究员:指明你信任的来源,或者要求多做几次搜索。
  • 不像你的口吻?在 brand/voice.md 里再加两段示例。
  • 编辑什么都放行?加上一句:“你必须找出至少 3 处改进,否则要解释为什么没有。”

Claude Code 会在几秒内发现代理文件的修改,所以下一次运行就会用上新版本。

可选:变成一条命令

创建 .claude/skills/content-run/SKILL.md,这样你就可以输入 /content-run,而不必再粘贴提示词:

---
name: content-run
description: Run the researcher, writer and editor subagents in order on a topic and format.
disable-model-invocation: true
---

The user gives a topic and a format in $ARGUMENTS.
1. Delegate to the researcher subagent. Wait for it.
2. If research.md has fewer than 3 key points, stop and show me the Open questions.
3. Delegate to the writer subagent with the topic and format. Wait for it.
4. Delegate to the editor subagent. Wait for it.
5. Show final.md and the Fact-check section of edit-log.md.

然后运行:/content-run "why our onboarding takes 10 minutes" blog post。

可能出什么问题

  • 代理没有出现。如果你是在会话启动后才创建 .claude/agents 的,请重启 Claude Code。还要检查文件的第一行是否正是 ---;Claude Code 会悄悄跳过头部有问题的文件。
  • Claude 自己做了,没有委派。在提示词中点名这个子代理,或者用 @ 提及它。以“Use first”或“Use after”开头的 description 有助于 Claude 分派工作。
  • 编造的引用。研究员被告知绝不能编造来源,但在发布之前,请检查 final.md 里的每个链接。链接打不开(404),或者页面说的和文章声称的不一样,就意味着你应该重新做调研。
  • 用量限额比预期来得早。三个代理消耗的 token 是一次聊天的数倍。对于要丢弃的草稿,可以把研究员和撰稿人设为 model: haiku,文档把它描述为更快、成本更低的模型。
  • 工具名拼写错误。要写 WebSearch,而不是 websearch。如果 tools 一行里没有任何一项对应真实的工具,代理通常会启动失败,并给出点明这些名称的错误。
  • 版权。引用来源时要简短,并附上链接。不要让撰稿人把其他网站的整段文字粘贴过来。

做成你自己的

  • 更好的搜索:添加 Exa(claude mcp add --transport http exa https://mcp.exa.ai/mcp),并在研究员的 tools 一行加上 mcp__exa__*。这样它会获得 Exa 的全部工具,而不会获得其他服务器的工具。
  • 你的文风技能:如果你做过文风技能,在撰稿人和编辑的 frontmatter 中加上 skills:,并把它的名称作为列表项。完整的技能会在代理启动时被加载进去。
  • 再雇第四位:一个 social-cutter 代理,把 final.md 变成三条短帖子,使用 tools: Read, Write。
  • 与团队共享:把 .claude/agents 文件夹提交到项目的 git 仓库。若要在你电脑上的所有项目中使用这些代理,请把文件移到 ~/.claude/agents/。
  • 借鉴思路:VoltAgent 的子代理和 wshobson/agents 等社区库里有现成的商业和内容代理。代理可以运行工具,所以安装之前请先读一读文件。

下一步

来源

已于 对照以下来源核对信息。 页面更新于 。 我们如何核对信息

  1. code.claude.com/docs/en/sub-agents(在新标签页中打开)
  2. code.claude.com/docs/en/skills(在新标签页中打开)
  3. code.claude.com/docs/en/mcp(在新标签页中打开)
  4. code.claude.com/docs/en/setup(在新标签页中打开)
  5. code.claude.com/docs/en/desktop-quickstart(在新标签页中打开)
  6. code.claude.com/docs/en/costs(在新标签页中打开)
  7. support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan(在新标签页中打开)

相关指南

全部指南

  • Claude 技能 vs MCP vs 插件:你需要哪一个?

    技能教 Claude 怎样完成任务,MCP 连接器让它触达你的应用和数据,插件把两者打包在一起。附决策表、套餐说明和一个实测示例。

    入门做决定需要 10 分钟,动手示例大约 30 分钟

  • 让 Claude 像你一样写作:打造个人文风技能

    把你最好的 4-6 篇文章做成带有具体规则、禁用词和前后对比示例的 my-voice 技能,这样 Claude 起草的每封邮件、每条帖子和每份简介,一开始就带着你的口吻。

    入门45-60 分钟

  • 为团队黑话打造一个“把我当新人来解释”的技能

    用你们团队自己的术语表打造一个黑话解释技能。粘贴任何满是缩写和代号的消息,就能得到一个通俗易懂的版本、一张标明该问谁的术语表,以及一份它不会去猜的术语清单。

    入门45-60 分钟,大部分时间用于编写术语表