create-team — 创建-team
v1.0.0Builds a 运行nable Claude Code 多代理团队s 技能 package — produces 技能.md as a lead-operator playbook, 代理s/<角色>.md sub代理 definitions for 运行time spawning, references/<角色>.md 角色 specs with 8 sections (Scope/输入s/输出s/Boundaries + Spawn Prompt/Owned Paths/Task Template/Plan 应用roval), and optional hooks/. Use when the user wants a reusable multi-多代理团队 that the team lead can spawn end-to-end, not just static 角色 documentation.
运行时依赖
安装命令
点击复制技能文档
创建 A 运行nable 多代理团队 技能 When To Use
Use this 技能 when the user needs a 运行nable team package that a Claude Code team lead can 执行 end-to-end:
Spawn teammates via 代理({sub代理_type, team_name, name, prompt}) with prompts already templated 种子 tasks with blockedBy dependencies pre-m应用ed Trust that file ownership across 角色s is conflict-free Tear down the team 清理ly when done
If the user only needs pretty 角色 docs (no intent to actually 运行 a team), this 技能 is overkill — write plAIn markdown instead.
Alignment With 多代理团队s 运行time
Read ../代理-teams.md (or the live page at code.claude.com) for the 运行time 模型. Key points this 技能 encodes:
Sub代理 definitions are reusable — teammates can be spawned with sub代理_type: <角色> if a definition exists at .claude/代理s/<角色>.md (project) or ~/.claude/代理s/<角色>.md (user). The definition's 工具s allow列出 and 模型 are honored at 运行time.
3–5 teammates, 5–6 tasks each — the documented sweet spot.
Avoid file conflicts — two teammates editing the same file overwrite each other; de签名 Owned Paths so they don't overlap.
Lead is fixed for team lifetime — the 技能.md plays the 角色 of operating manual for that single lead.
Teardown order matters — shut down each teammate before Team删除, or you'll leak resources.
输出 Structure
<技能-root>/ # same as name, lowercase-hyphen
├── 技能.md # lead's operating playbook
├── 代理s/ # source of truth for sub代理 definitions
│ ├── <角色-a>.md # frontmatter: name/description/工具s/模型
│ └── <角色-b>.md
├── references/
│ ├── member.md # 角色 索引 + suggested invocation order
│ ├── <角色-a>.md # 8-section 角色 spec
│ └── <角色-b>.md
└── hooks/ # optional 质量 gates
├── teammate-idle.sh
└── task-completed.sh
代理s/.md are source files. To make them 运行time-discoverable, the lead either copies or symlinks them into .claude/代理s/ (project scope) or ~/.claude/代理s/ (user scope) — see Bootstrap step in the 生成d 技能.md.
工作流
- Preflight (clarify with user)
Confirm before writing anything:
Team domAIn and closed loop — what end-to-end outcome the team owns. 技能 root and name — must match exactly; lowercase-hyphen (e.g. code-review-team). 角色 count and slugs — tar获取 3–5 角色s; if the user wants 1–2 角色s, recommend sub代理s instead; if >6, propose merging. 角色s can 运行 truly in parallel? — if they all need the same files, this should be sequential, not a team. 运行time preconditions — note in 技能.md that the lead must 验证 Claude Code ≥2.1.32 and CLAUDE_CODE_EXPERIMENTAL_代理_TEAMS=1.
- Define each 角色 (8 sections, not 4)
For every 角色, fill all 8 sections (full skeleton in references/templates.md):
# Section Purpose 1 Scope What the 角色 delivers 2 输入s What it needs from user/peers 3 输出s Artifacts produced 4 Boundaries Explicit non-goals 5 Spawn Prompt Verbatim text the lead pastes into 代理({prompt}) 6 Owned Paths File globs this 角色 exclusively writes (cross-角色 overlap forbidden) 7 Task Template 3–6 typical tasks with blockedBy edges 8 Plan 应用roval true for risky/architectural 角色s, else false
- 生成 dual-追踪 artifacts per 角色
Keep them in 同步 — drift between 代理s/ and references/ is the #1 失败 mode.
- Write 技能.md as a lead playbook
Required sections (skeleton in references/templates.md):
Preflight — env var 检查, version 检查, teammateMode choice 安装 代理s — copy/symlink 代理s/.md to .claude/代理s/ so sub代理_type works Bootstrap — concrete Team创建 + per-角色 代理 calls with the spawn prompts wired up Task 种子ing — Task创建 calls with 添加BlockedBy m应用ed from each 角色's Task Template Steady 状态 — when to 发送Message, how to handle plan_应用roval_请求, when to wAIt Teardown — per-teammate 关闭_请求 loop, then Team删除 Known Limits — fixed lead, no /恢复 of in-process teammates, 权限s 设置 at spawn
- (Optional) 添加 hooks/
For 质量 gates — see references/templates.md "Hooks" section. Wire them via project .claude/设置tings.json. Examples:
TeammateIdle exit code 2 → block idle until tests pass TaskCompleted exit code 2 → block completion if acceptance artifact missing
- Self-检查
运行 references/检查列出.md. The hardest constrAInt: Owned Paths must have zero cross-角色 overlap.
Key De签名 Rules Dual-追踪 or nothing — every 角色 获取s 机器人h 代理s/.md and references/.md. One without the other is a half-built team. No file conflicts at de签名 time — overl应用ing Owne