multi_agent_collaboration

A coordination guide for splitting a large task among multiple AI agents, where each agent handles a different specialist role. The agents can work in parallel when their tasks are independent or in sequence when one needs another's result.

In plain words
What is it for?
Use it to identify available agents, assign research, analysis, writing, or other specialist tasks, run independent tasks at the same time, and pass earlier results into later tasks.
Why use it?
It helps divide complex work clearly and combine the results without assigning overlapping or dependent tasks incorrectly.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mateaix/mateclaw/multi_agent_collaboration
Any agent
npx skills add mateaix/mateclaw --skill multi_agent_collaboration
Clone the repo
git clone --depth 1 https://github.com/mateaix/mateclaw

Made for: Claude Code, Codex.

Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 884 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00037 $0.00884
Opus 5 $0.00018 $0.00442
Sonnet 5 $0.00007 $0.00177
Haiku 4.5 $0.00004 $0.00088

Measured 3d ago against content hash 6a70783ddc2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

multi_agent_collaboration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

92% identical to chat_with_agent — 113 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

mateclaw-server/src/main/resources/skills/multi_agent_collaboration/SKILL.md · 105 lines

What it actually says

多 Agent 协作

何时使用

当任务明显需要多个专业 Agent 共同完成,或用户明确要求多 Agent 协作时使用。

应该使用

  • 任务可拆分为多个专业子域,每个子域有对应 Agent
  • 多个独立子任务可以并行执行(节省时间)
  • 需要来自不同 Agent 的结果进行综合分析
  • 用户明确要求"让 A 和 B 一起做"

不应使用

  • 一个 Agent 可以完成,无需分工
  • 只是简单咨询,用 chat_with_agent 即可
  • 刚收到某 Agent 的消息,不要立刻回调它(防死循环)

两种协作模式

模式一:串行(有依赖关系)

B 的任务需要 A 的结果时使用:

# 第一阶段:A 完成
result_a = delegateToAgent(
  agentName="research-agent",
  task="[来自 Agent coordinator 的请求] 收集最新 AI 大模型基准测试数据,返回原始数据表格。"
)

# 第二阶段:B 基于 A 的结果处理
result_b = delegateToAgent(
  agentName="data-analyst",
  task="[来自 Agent coordinator 的请求] 基于以下数据生成分析报告和可视化建议:\n\n" + result_a
)

模式二:并行(互相独立)

多个子任务之间没有依赖时使用,最多同时 3 个:

results = delegateParallel(
  tasksJson="[
    {\"agentName\": \"research-agent\", \"task\": \"[来自 Agent coordinator 的请求] 搜索竞品 A 的最新功能更新\"},
    {\"agentName\": \"data-analyst\",   \"task\": \"[来自 Agent coordinator 的请求] 分析我们产品上月用户留存数据\"},
    {\"agentName\": \"writer-agent\",   \"task\": \"[来自 Agent coordinator 的请求] 起草本次竞品分析报告的大纲\"}
  ]"
)

所有任务完成后一次性返回全部结果,再由当前 Agent 整合。

完整工作流程

第一步:查询可用 Agent

listAvailableAgents()

根据各 Agent 的描述分配任务。

第二步:判断串行 or 并行

判断条件 模式
子任务 B 依赖子任务 A 的结果 串行
子任务互相独立,可同时进行 并行
混合(部分有依赖) 先并行无依赖任务,再串行有依赖任务

第三步:分配并执行

使用对应模式(见上)。

第四步:整合结果

由当前 Agent(编排者)负责整合所有 Agent 的返回结果,形成最终回复。不要把整合工作再委托给某个子 Agent。

关键规则

  • 任务说明中加 [来自 Agent <名称> 的请求] 帮助目标 Agent 识别来源
  • 并行任务数量不超过 3 个;超过时按优先级分批
  • 不让两个 Agent 互相调用对方(会形成死循环)
  • 整合由编排者负责,不再向下委托
  • 如需上下文连贯,在 task 中附带前一阶段的关键结论

与 chat_with_agent 的区别

技能 场景
chat_with_agent 一对一,咨询或单任务委托
multi_agent_collaboration 一对多,多 Agent 分工、并行或串行编排
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 105 lines · 37 tokens per session scan A 6a70783ddc2b

Subscribe to this mod's changes

multi_agent_collaboration is a skill published in the GitHub repository mateaix/mateclaw (1,061 stars, last pushed 2d ago), licensed Apache-2.0. It adds 37 tokens to every session and 884 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to chat_with_agent, differing in 113 lines, and is treated as a copy.

Related

Other skills, from other repositories

make-skill

Use this skill when sedimenting a session into a reusable workspace skill. Triggers when the user wants to turn the current conversation, workflow, or troubleshooting path into a SKILL.md. Phrases like 'turn this into a skill', 'remember how I did X', 'save this workflow', 'make a skill from this', and any /make-skill…

agentscope-ai/QwenPaw · 85 tokens

make-skill

用于把当前会话沉淀为可复用的 workspace skill。当用户希望把当前对话、工作流或排错路径写成 SKILL.md 时触发。触发表达包括「把这个变成 skill」「记住我是怎么做 X 的」「保存这个工作流」「make a skill from this」以及任何 /make-skill 调用。.

agentscope-ai/QwenPaw · 84 tokens

terraform-skill

Use when working with Terraform or OpenTofu - creating modules, writing tests (native test framework, Terratest), setting up CI/CD pipelines, reviewing configurations, choosing between testing approaches, debugging state issues, implementing security scanning (trivy, checkov), or making infrastructure-as-code…

agentscope-ai/QwenPaw · 62 tokens

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of "Word doc", "word document", ".docx", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when…

agentscope-ai/QwenPaw · 168 tokens

docx

当用户需要创建、读取、编辑或处理 Word 文档(.docx)时,使用此技能。触发场景包括提到“Word 文档”、“.docx”,或要求生成带目录、标题、页码、信头等格式的专业文档;也包括提取或重组 .docx 内容、插入或替换图片、在 Word 文件中查找替换、处理修订或批注,以及将内容整理为正式 Word 文档。如果用户要求生成“报告”“备忘录”“信函”“模板”等 Word / .docx 交付物,也应使用此技能。不要用于 PDF、电子表格、Google Docs,或与文档生成无关的一般编程任务。.

agentscope-ai/QwenPaw · 161 tokens

multi_agent_collaboration

Use this skill when another agent's expertise or context is needed, or when the user explicitly asks to involve another agent. First list agents, then use qwenpaw agents chat for two-way communication with replies.

agentscope-ai/QwenPaw · 47 tokens