multi-agent

multi-agent is a skill for Claude Code, Codex 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 CodeCodex

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

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,871 stars · on GitHub

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/fengshao1227/ccg-workflow/multi-agent
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00024 $0.02473
Sonnet 5 $0.00010 $0.00989
Haiku 4.5 $0.00005 $0.00495

Measured yesterday against content hash 117b4d12cd14, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 yesterday.

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. yesterday 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,871 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. 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

code-review-workflow

Review a change in a fixed order — context, correctness, security, then style — and write feedback that is actionable and ranked by severity. Use when the user asks for a code review, wants a pull request or diff reviewed before merge, asks whether a change is safe to ship, or when the task involves reviewing a patch…

personamanagmentlayer/pcl · 88 tokens

refactoring-workflow

Improve the structure of existing code without changing its behaviour, in small verified steps under a green test suite. Use when the user asks to refactor, clean up, restructure or simplify code, wants to reduce duplication or coupling, is preparing a codebase for a feature it cannot currently accommodate, or when…

personamanagmentlayer/pcl · 83 tokens

airflow-expert

Expert-level Apache Airflow orchestration, DAGs, operators, sensors, XComs, task dependencies, and scheduling. Use when the user mentions orchestration, DAGs, workflow, scheduling, or data pipeline, or when the task involves DAG Fundamentals, Task Dependencies and Branching, Dynamic Task Generation, or Operators and…

personamanagmentlayer/pcl · 72 tokens

git-expert

Expert-level Git version control with advanced workflows, branching strategies, and best practices for team collaboration. Use when the user mentions version control, collaboration, or workflow, or when the task involves Essential Git Commands, Advanced Git Techniques, Branching Strategies, or Conflict Resolution.

personamanagmentlayer/pcl · 57 tokens

absolute-simplify

Use when the user wants to simplify, clean up, refactor, tidy, or refine code — their staged/unstaged git changes or a target file/path. Reduces complexity, flattens nesting, removes redundancy and dead code, scores each change by value (holding low-value churn), then runs tests to prove nothing broke. Invoke on…

maddhruv/absolute · 178 tokens

absolute-ui

Build polished, intentional UIs with concrete CSS/Tailwind values — typography, color, layout, spacing, dark mode, accessibility, animations, components. Encodes specific, opinionated rules with exact values, not vague advice. Covers buttons, cards, forms, tables, navigation, dashboards, landing pages, onboarding, and…

maddhruv/absolute · 121 tokens