multi-agent

multi-agent is a skill for Claude Code from fengshao1227/ccg-workflow. It costs 49 tokens per session (4,946 once invoked), scanned A, original, MIT.

A process for coordinating multiple coding agents by splitting work among scouts, workers, reviewers, and repair agents. Each agent has a defined role and task.

In plain words
What is it for?
It is for exploring a codebase, assigning parallel tasks, reviewing changes, handling fixes, and combining the work into one final commit.
Why use it?
Large changes can be divided into independent pieces while keeping ownership, review, dependencies, and completion status clear.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Part of the ccg plugin — 58 skills, 12 commands, 7 agents shipped together

Good fit It is for exploring a codebase, assigning parallel tasks, reviewing changes, handling fixes, and combining the work into one final commit.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fengshao1227/ccg-workflow/multi-agent
About the project

CCG is a command-line workflow engine that coordinates Claude, Codex, Gemini, and other models as specialized collaborators on coding tasks. It is used to analyze requests, choose a strategy, delegate work to model-specific roles, and combine their results. The catalogue entries provide the skills, commands, agents, and plugin that implement this workflow.

fengshao1227/ccg-workflow · 5,943 stars · on GitHub · ccg.fengshao1227.com

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.

Any agent
npx skills add fengshao1227/ccg-workflow --skill multi-agent
Clone the repo
git clone --depth 1 https://github.com/fengshao1227/ccg-workflow

Made for: Claude Code.

Or install ccg, the plugin that ships this one along with the rest of its 58 skills, 12 commands, 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for multi-agent

README.md
[![agentmods](https://agentmods.dev/badge/skills/fengshao1227/ccg-workflow/multi-agent/github.svg)](https://agentmods.dev/skills/fengshao1227/ccg-workflow/multi-agent)
Your own site
<a href="https://agentmods.dev/skills/fengshao1227/ccg-workflow/multi-agent"><img src="https://agentmods.dev/badge/skills/fengshao1227/ccg-workflow/multi-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for multi-agent

Your own site · 80×15
<a href="https://agentmods.dev/skills/fengshao1227/ccg-workflow/multi-agent"><img src="https://agentmods.dev/badge/skills/fengshao1227/ccg-workflow/multi-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,946 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium analysis-evasion · line 1
    Suspicious Unicode normalization or mixed-script content
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
How audits are shown
Origin original No closer match found 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.1 $0.00049 $0.04946
Opus 5.5 $0.00020 $0.01978
Sonnet 5.5 $0.00010 $0.00989
Haiku 4.5 $0.00005 $0.00495

Measured 1mo ago against content hash 117b4d12cd14, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

multi-agent scanned grade A with 1 finding 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 1mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

| 走卒 (Drone) | 无人蚁 Drone | 天罗走卒 | 简单 bash 命令,零 LLM 成本 | Bash(仅此一个) | 无(execSync) |
Origin

Copies of this mod

2 near-identical copies found in the catalogue:

templates/skills/orchestration/multi-agent/SKILL.md · 534 lines

How it starts

The opening of the file, as written. The whole thing — 534 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🕸 天罗秘典 · 多 Agent 协同(蚁群仿生版)

参考蚁群仿生架构:侦察→工作→审查→修复→完成,信息素间接通信,自适应并发。


蚁群生命周期

所有多 Agent 协同任务遵循统一生命周期:

目标 → 侦察(Scout) → 任务池 → 工蚁(Worker)并行执行 → 兵蚁(Soldier)审查 → 修复(如需) → 完成
         │                           │
         │  信息素衰减(过时信息自动失效)  │  子任务自动产生
         └───────────────────────────┘

阶段定义

阶段 角色 动作 产出
🔍 侦察 Scout 探索代码库,标记关键文件和依赖 任务池 + 依赖图
⚒️ 工作 Worker 并行执行任务,可产生子任务 代码变更 + 进度信息素
🛡️ 审查 Soldier 审查所有变更,发现问题 修复任务 / 通过
🔧 修复 Worker 执行审查产生的修复任务 修复后的代码
✅ 完成 Lead 汇总报告,统一 commit 最终交付

Codex 原生协同协议(强化)

在 Codex CLI 中,TeamCreate/Task 抽象统一映射到以下原生动作:

协同意图 Codex 动作 约束
创建团队/子任务 spawn_agent 明确角色、文件所有权、完成定义
下发任务/追问 send_input 单条消息只包含一个目标动作
等待完成 wait 优先长等待,避免忙轮询
长耗时命令 awaiter agent 测试/构建/监控必须用 awaiter
代码探索 explorer agent 探索结果视为权威,不重复检索
执行改动 worker agent 明确“只改分配文件”
收尾回收 close_agent 任务结束必须关闭子 Agent

执行顺序(不可跳步)

1. 拆解任务 + 文件锁定矩阵
2. spawn explorer/worker/awaiter
3. 并行执行 + wait 收敛
4. reviewer 审查 + 必要修复
5. 汇总结果 + close_agent 全量回收

何时启用多 Agent

TeamCreate vs Task(subagent) 决策树

收到任务 → 评估规模
  │
  ├─ 涉及 ≥3 个独立文件/模块? → TeamCreate
  ├─ 需要 ≥2 个并行工作流?   → TeamCreate
  ├─ 总步骤 >10 步?          → TeamCreate
  ├─ 用户明确要求并行/团队?   → TeamCreate
  │
  ├─ 单一探索/搜索任务?       → explorer agent
  ├─ 单文件独立操作?          → worker agent
  └─ 简单查询/单步操作?       → 直接执行

铁律:当犹豫时,优先 TeamCreate。多 Agent 并行效率远高于串行 subagent。

满足任意 1 条即启用 TeamCreate:

条件 说明 示例
多文件独立变更 ≥3 个无交叉依赖的文件 6 个新秘典各自独立
可并行子任务 ≥2 个无数据依赖的工作流 前端+后端+文档
复杂度高 单 Agent 需 >10 步 全栈重构
时间紧迫 劫钟催命,需加速 紧急修复多服务

角色体系(蚁群映射)

角色 蚁群映射 道语 职责 工具权限 模型建议
主修 (Lead) 蚁后 Queen 天罗主修 任务分解、调度、汇总 spawn_agent/send_input/wait/close_agent 当前模型
斥候 (Scout) 侦察蚁 Scout 天罗斥候 只读探索,标记关键文件 explorer + Read/Grep/Glob(只读) haiku(快速低成本)
道侣 (Worker) 工蚁 Worker 天罗道侣 执行任务,可产生子任务 worker + Read/Write/Edit/Bash sonnet/当前模型
护法 (Soldier) 兵蚁 Soldier 天罗护法 审查质量,发现问题 worker(审查模式) + Read/Grep/Glob(只读) sonnet
走卒 (Drone) 无人蚁 Drone 天罗走卒 简单 bash 命令,零 LLM 成本 Bash(仅此一个) 无(execSync)

Read the full file on GitHub · 534 lines

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. 1mo ago First seen · 534 lines · 49 tokens per session scan A 117b4d12cd14

Subscribe to this mod's changes

multi-agent is a skill published in the GitHub repository fengshao1227/ccg-workflow (5,943 stars, last pushed 2d ago), licensed MIT. It adds 49 tokens to every session and 4,946 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories