🤝

多智能体协作编排框架

Claude Agent Team Workflows 0.1.0 · v1.0.0
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
AI 增强 安全 B 级 作者 sieyer 公开目录收录
970 下载 0 安装 3.5k 收藏 13 浏览

简介

Claude Code的多智能体协作框架,通过1主脑+4专家角色的标准分工,支持顺序、并行、迭代等4种工作流模式,实现软件开发、内容创作、数据分析等复杂任务的并行化分解与协同完成。

原始描述

Universal multi-agent workflow orchestration using Claude Code Agent Teams. Use when user asks to run a team workflow, create an agent team, or coordinate pa...

通过你的 Agent 添加

安装目录:claude-agent-team-workflows-0-1-0/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/claude-agent-team-workflows-0-1-0/
Codex CLI~/.codex/skills/claude-agent-team-workflows-0-1-0/
DeepSeek Harness~/.agents/skills/claude-agent-team-workflows-0-1-0/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Agent Team Workflows 是 Claude Code 的实验性多智能体编排框架,核心架构为 1 Lead(主脑)+ 4 Teammates(专家角色):

  • Lead:任务分配、上下文传递、质量把关、最终输出合成
  • architect(架构师):规划者,负责问题框架、任务分解、蓝图制定
  • developer(开发者):构建者,负责产出核心交付物(代码、文档、数据、方案等)
  • tester(测试者):验证者,对照验收标准进行测试和正确性评估
  • reviewer(审阅者):批判者,评估质量、风险、一致性,提出改进建议

四大工作流模式

模式 适用场景
sequential 线性依赖任务,如功能开发、报告撰写
parallel-merge 多视角独立探索后合并,如战略分析、研究
iterative-review 创作者与批判者迭代打磨,如内容编辑、设计优化(默认最多2轮)
fan-out-fan-in 大任务拆分并行处理,如多模块开发、大数据集处理

六步协调协议

  1. 确认范围(目标、领域、模式、约束、输入、验收标准)
  2. 构建工作流实例规范(填写统一模板)
  3. 创建团队(使用特定ID实例化4个队友)
  4. 创建带依赖的任务(明确输入输出、验收标准)
  5. 启动队友并传递丰富上下文(角色卡+任务+输入+输出契约+约束)
  6. 协调交接与最终合成(验证、传递、修订、交付)

显著优点

  • 领域通用性强:通过"角色卡(Role Cards)"机制,同一架构可映射到软件、内容、数据、战略、研究等任意领域
  • 并行效率提升:适合可并行化的复杂任务,fan-out-fan-in 模式可显著加速大型工作
  • 质量保障机制:专职验证者和批判者角色,配合迭代审查模式,减少单点失误
  • 结构清晰可控:严格的6步协议和Lead纪律规则,避免多智能体协作常见的上下文混乱和责任模糊
  • 成本透明:明确标注各模式约4-5倍单智能体成本,提供决策依据

潜在局限与风险

  • 实验性功能依赖:需手动启用 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS 环境变量,稳定性未经验证
  • 成本显著增加:团队模式成本为单智能体的3-5倍,简单任务反而低效
  • 上下文传递负担:Teammates无共享历史,Lead必须手动转发所有相关工件,遗漏即导致失败
  • 启动门槛较高:需完整填写工作流实例规范、创建多个带依赖的任务、准备详细的角色卡和契约,前置工作量大
  • 迭代次数限制:默认最多2轮迭代审查,更多需用户批准,可能中断流畅性
  • 无内置失败恢复:队友卡住、输出不合格、停止响应等情况需Lead手动干预,框架仅提供应对指南而非自动处理

适合人群

  • 复杂任务处理者:工作跨度3+个工件/文件,存在明确流水线依赖
  • 多视角需求场景:需要独立专家从不同角度评估(如战略分析需市场、财务、风险多维度)
  • 质量敏感型工作:内容发布、代码合并、研究报告等需要专门验证和审查环节
  • 具备Claude Code环境的技术用户:需能编辑settings.json并管理实验性功能

常规风险

  • 实验性功能不稳定性:可能存在未记录的bug或行为变更
  • 成本失控风险:未按"一人能完成的简单任务不用团队"原则使用,导致费用浪费
  • 上下文丢失导致输出偏差:Lead未完整传递前置工件,队友基于不完整信息工作
  • 权限边界模糊:Lead需用户批准高风险的不可逆操作、外部发布、生产部署,但规则依赖人工判断

技能正文


name: agent-team-workflows description: "Universal multi-agent workflow orchestration using Claude Code Agent Teams. Use when user asks to run a team workflow, create an agent team, or coordinate parallel work across multiple teammates — for any domain (software, content, data, strategy, research, etc.)."

Agent Team Workflows

Universal orchestration framework for 5-agent teams (1 Lead + 4 Teammates) across any domain.

Prerequisites

Agent Teams must be enabled. Add to ~/.claude/settings.json:

{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  }
}

Generic Roles

Teammate IDs are fixed. Their function is remapped per domain via Role Cards.

Slot ID Generic Function Core Responsibility
Lead (session) Orchestrator Assign tasks, relay context, quality gate, synthesize final output
Slot A architect Planner Frame problem, decompose tasks, produce plan/spec/blueprint
Slot B developer Builder Produce primary artifact (code, draft, dataset, model, proposal)
Slot C tester Validator Check against acceptance criteria, test, evaluate correctness
Slot D reviewer Critic Assess quality, risk, consistency, compliance, suggest improvements

Role Cards (Domain Remapping)

Each domain preset provides Role Cards that specialize the generic functions:

Domain Planner Builder Validator Critic
Software Dev Architect Developer Tester Code Reviewer
Content Creation Producer Writer Fact-Checker Editor
Data Analysis Analyst Lead Data Engineer Statistician Peer Reviewer
Business Strategy Strategist Business Analyst Financial Modeler Risk Advisor
Research Research Lead Researcher Methodology Auditor Peer Reviewer

Full role cards with artifact contracts → reference/domain-presets.md

Pipeline Patterns

4 canonical control-flow patterns. Domain meaning comes from Role Cards, not the pattern itself.

1. sequential — Step-by-Step Pipeline

Planner → Builder → Validator → Critic → Lead Synthesis

Use when: Work is linear and each step depends on the previous output. Examples: Feature dev, content creation, report writing.

2. parallel-merge — Parallel Exploration + Merge

Planner → (Builder ∥ Validator ∥ Critic) → Lead Merge → Validator Gate → Lead Synthesis

Use when: Multiple perspectives can work independently, then combine. Examples: Research, strategy analysis, multi-angle evaluation.

3. iterative-review — Build-Critique Loop

Planner → Builder ↔ Critic (max N rounds) → Validator → Lead Synthesis

Use when: Quality requires iteration between creator and reviewer. Examples: Content editing, design refinement, proposal drafting. Guard: Default max 2 rounds. More requires user approval.

4. fan-out-fan-in — Map-Reduce

Planner → fan-out tasks to all 4 teammates → Lead fan-in merge → Critic Gate → Lead Synthesis

Use when: Large work can be split into independent chunks processed in parallel. Examples: Multi-module features, large dataset processing, codebase audit.

Pattern deep dives with sample task graphs → reference/patterns.md

Coordination Protocol

Strict 6-step protocol, domain-agnostic.

Step 1: Confirm Scope

Before spawning any team, confirm with user:

  1. Objective — specific deliverable
  2. Domain — select preset or define custom Role Cards
  3. Pattern — which pipeline pattern fits
  4. Constraints — tools, tech stack, tone, compliance, budget
  5. Inputs — source material, existing assets, context files
  6. Definition of Done — checkbox acceptance criteria the user agrees to

Step 2: Build Workflow Instance Spec

Fill in the universal template:

WORKFLOW INSTANCE SPEC
─────────────────────
Objective:      [deliverable]
Pattern:        [sequential | parallel-merge | iterative-review | fan-out-fan-in]
Domain:         [preset name or "custom"]

ROLE CARDS
  Planner (architect):  [domain title] — [specific responsibility]
  Builder (developer):  [domain title] — [specific responsibility]
  Validator (tester):   [domain title] — [specific responsibility]
  Critic (reviewer):    [domain title] — [specific responsibility]

ARTIFACTS (per step)
  Step 1 → [artifact name]: [format/content description]
  Step 2 → [artifact name]: [format/content description]
  Step 3 → [artifact name]: [format/content description]
  Step 4 → [artifact name]: [format/content description]

CONSTRAINTS:    [tools, rules, limits]
INPUTS:         [files, data, references]
DEFINITION OF DONE:
  □ [criterion 1]
  □ [criterion 2]
  □ [criterion 3]

Step 3: Create Team

Create a team of 4 teammates:
- architect: [Planner role card — context and responsibility]
- developer: [Builder role card — context and responsibility]
- tester:    [Validator role card — context and responsibility]
- reviewer:  [Critic role card — context and responsibility]

Step 4: Create Tasks with Dependencies

Create tasks following the selected pattern's pipeline order. Each task MUST have:

  • Clear description referencing role card
  • Required input artifact (from previous step or original inputs)
  • Required output artifact (format + content)
  • Acceptance criteria
  • Dependency on predecessor task

Step 5: Spawn Teammates with Rich Context

Each teammate MUST receive in their spawn prompt:

  1. Role Card — their domain title + specific responsibilities
  2. Assigned task — what to produce
  3. Input artifact — output from previous step (Lead must relay this)
  4. Output artifact contract — exact format and content expected
  5. Constraints — domain rules, style guides, compliance
  6. Handoff instruction — "Message the lead with [artifact] when done"

Universal spawn template:

Spawn a [ID] teammate with the prompt:
"You are the [Domain Title] ([Generic Function]).

YOUR TASK: [task description]

INPUT: [paste or reference previous step's output]

PRODUCE: [artifact name]
Format: [expected format]
Must include: [required sections/elements]

CONSTRAINTS:
- [rule 1]
- [rule 2]

When done, message the lead with your complete [artifact name].
If you encounter blockers, message the lead immediately."

Step 6: Coordinate Handoffs

When a teammate completes their step:

  1. Lead receives output via message
  2. Lead validates output against acceptance criteria
  3. Lead passes artifact + relevant context to next teammate via message
  4. If output is insufficient → send specific feedback, ask to revise

Step 7: Synthesize & Deliver

After all steps complete:

  1. Collect all artifacts
  2. Verify all Definition of Done criteria are met
  3. Summarize what was done (traceability: each criterion → which step satisfied it)
  4. List remaining TODOs or known issues
  5. Present final deliverable to user

Lead Discipline Rules

  1. Delegate only — Lead does NOT produce primary artifacts. Use delegate mode (Shift+Tab).
  2. Relay all context — Teammates have no shared history. Lead MUST forward relevant artifacts between steps.
  3. Direct messages — Use direct messages, not broadcast (saves 4× tokens). Broadcast only for parallel-merge sync points.
  4. Right-size tasks — 5-6 tasks per teammate max. Split large work.
  5. Gate high-risk actions — Require user approval for: irreversible changes, external publication, legal/compliance, high-cost operations, production deployments.
  6. Wait for teammates — Never proceed or implement yourself. Wait for teammate completion before next step.

Handling Failures

Situation Action
Teammate stuck Message with additional context, hints, or simplified sub-task
Bad output Send specific feedback citing acceptance criteria, ask to revise
Teammate stops Spawn replacement with same context + summary of work already done
Conflict between teammates Lead mediates, makes final decision, messages both with resolution
Task too large Lead splits into subtasks, reassigns across teammates
Iterative loop exceeds max Ask user whether to approve more rounds or finalize current state

Cost Guidelines

Pattern Est. Cost Worth It When
sequential ~4-5× single Work spans 3+ artifacts/files with clear pipeline
parallel-merge ~4× single 3+ independent perspectives needed
iterative-review ~3-4× single Quality requires creator-critic dialogue
fan-out-fan-in ~5× single Large work divisible into independent chunks

Rule of thumb: If one agent can finish in one session, don't use a team. Teams shine when work is parallelizable or benefits from multiple specialized perspectives.

Domain Presets (Quick Reference)

Preset Recommended Pattern Key Artifacts
software-dev sequential / fan-out-fan-in Design doc, source code, test suite, review report
content-creation iterative-review Content brief, draft, fact-check report, final edit
data-analysis fan-out-fan-in Analysis plan, datasets/transforms, statistical evaluation, findings report
business-strategy parallel-merge Strategy framework, market analysis, financial model, risk assessment
research parallel-merge Research plan, literature review, methodology audit, synthesis paper

Full presets with role cards, artifacts, and worked examples → reference/domain-presets.md Ready-to-use prompt templates → reference/prompt-templates.md Pattern deep dives → reference/patterns.md

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

multi-agentclaude-codeworkflow-orchestrationparallel-processingcollaborative-aisoftware-developmentcontent-creationdata-analysis

同类 Skill