agent-team
Launch a coordinated agent team with a shared task list and cross-talk between teammates. Also use when DECIDING whether a team is warranted at all - the skill's decision graph answers "should I use a team for this?". Launch one ONLY when 2+ agents must challenge each other or coordinate a shared lifecycle: teams cost cross-talk overhead on top of token spend, so reach for them last. NOT for independent parallel work (dispatch plain parallel subagents instead), not for a quick structured verdict (use one subagent), and not for scripted repeatable orchestration (write a script).
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- agent-team
- description
- Launch a coordinated agent team with a shared task list and cross-talk between teammates. Also use when DECIDING whether a team is warranted at all - the skill's decision graph answers "should I use a team for this?". Launch one ONLY when 2+ agents must challenge each other or coordinate a shared lifecycle: teams cost cross-talk overhead on top of token spend, so reach for them last. NOT for independent parallel work (dispatch plain parallel subagents instead), not for a quick structured verdict (use one subagent), and not for scripted repeatable orchestration (write a script).
- argument-hint
- [--scenario <name>] [--teammates N] [--no-critic] [--advisor] <task-description>
02 资源文件 4
- 参考文档advisor-prompt.md2.6 KB
- 参考文档brief-report-template.md904 B
- 参考文档scenarios.md4.7 KB
- 参考文档teammate-prompt.md6.0 KB
03 SKILL.md 正文
agent-team
Launch coordinated agent teams for tasks that need persistent cross-talk, shared state, and teammate lifecycle management.
Trigger: /agent-team <task-description>
Arguments
$ARGUMENTS- free-text task description. If omitted, ask the user.--scenario <name>- use a pre-built template from scenarios.md. Skips Phase 2 (team design), still requires user approval before launching. Valid:feature-implementation,failure-investigation,documentation-assembly,multi-system-analysis.--teammates N- override the default teammate count.--advisor- add a read-only strategic advisor teammate as a peer reviewer (see Phase 3, Step 2.5). Off by default.--no-critic- skip the critic quality gate. Read-only or exploratory tasks only.--fast- skip plan approval. Urgent tasks only.
Model policy
Choose only from models and effort values exposed by the live spawn tool. Do not copy a model ID from this skill. Use the default or cheaper available profile for mechanical search, formatting, and deterministic command execution. Use a stronger available review profile for security boundaries, architecture, cross-cutting synthesis, and the independent final review. Start with the smallest team because each teammate adds context and coordination work.
Worktree isolation for parallel implementers
Give each parallel implementer that edits files its own git worktree by default. claude --worktree <name> (or -w <name>) creates the worktree under .claude/worktrees/<name>/ and isolates its edits from the main checkout. One checkout with strictly disjoint files is the documented exception, guarded by the concurrent-checkout-guard hook; reach for it only when the workers provably never touch the same file.
Before using a host-specific worktree flag or cleanup behavior, inspect the live tool schema or current official documentation. If isolation is unavailable, assign disjoint files or run writers sequentially. Do not infer live host support from this prose.
When to use
digraph when_to_use {
"Complex task needing\nmultiple workers?" [shape=diamond];
"Workers need to\ncommunicate findings?" [shape=diamond];
"Tasks fully\nindependent?" [shape=diamond];
"Single agent or subagent" [shape=box];
"Parallel subagents\n(no team)" [shape=box];
"agent-team" [shape=box style=filled fillcolor=lightgreen];
"Complex task needing\nmultiple workers?" -> "Single agent or subagent" [label="no"];
"Complex task needing\nmultiple workers?" -> "Workers need to\ncommunicate findings?" [label="yes"];
"Workers need to\ncommunicate findings?" -> "Tasks fully\nindependent?" [label="no"];
"Workers need to\ncommunicate findings?" -> "agent-team" [label="yes"];
"Tasks fully\nindependent?" -> "Parallel subagents\n(no team)" [label="yes"];
"Tasks fully\nindependent?" -> "agent-team" [label="no - shared state\nor synthesis needed"];
}
Use an agent team when:
- Teammates must share findings with each other, not just report up to the parent.
- One teammate's output feeds another's input (synthesis).
- The work is extended (roughly 5-30 minutes per teammate) with context accumulation.
- A shared task list needs to track progress across the group.
Do not use a team when:
- The tasks are fully independent. Dispatch parallel subagents instead.
- You want a quick structured verdict (30 seconds to 2 minutes). Use one subagent.
- The change is a single file. Teammate overhead exceeds the benefit.
- Two teammates would edit the same file. That produces overwrite conflicts, not collaboration.
Workflow
Phase 1: Understand the task
- Parse
$ARGUMENTSfor what the team should accomplish. - If it is unclear, ask the user.
- Identify the files, systems, and scope involved.
- If
--scenariowas given, load the template from scenarios.md and skip to Phase 3.
Phase 2: Design the team
- Determine the minimum number of teammates. Prefer fewer, more focused teammates.
- For each teammate define:
- Name - descriptive, lowercase-with-hyphens, unique in the session.
- Role - one sentence.
- Scope - the specific files or areas it owns, with NO overlap between teammates.
- Skills/Agents - which pre-made agents or skills it should use.
- Assign a mechanical or review profile by the observable risk in Model policy.
- Present the proposal to the user:
## Proposed Team: <team-name>
| Teammate | Profile | Role | Scope | Skills/Agents |
|-------------|---------|------|-------|---------------|
| researcher | mechanical | ... | ... | read-only exploration |
| implementer | default | ... | ... | ... |
| critic | strong review | ... | fixed aggregate diff (read-only) | /plan-review |
Estimated cost: ~Nx a single session (N = teammate count; see Cost below)
- Wait for user approval. Do not proceed until approved.
Phase 3: Create and launch
Step 1 - how teams form. There is no team-creation call.
A team forms implicitly the moment you spawn the first teammate; it is auto-named per session and cleaned up automatically on session exit.
The one durable invariant: spawn every teammate with a unique name.
The unique name is what makes it an addressable teammate you can message and what puts it in the shared task list.
Spawn teammates via the session's current spawn mechanism (the Agent tool with a name, or the equivalent in your harness), and consult the live Agent / SendMessage tool schema and https://code.claude.com/docs/en/agent-teams for the exact form.
Do not hard-code a tool-call recipe here; it changes between releases. team_name is deprecated and ignored.
Step 2 - create tasks with the task tool for each unit of work.
Step 2.5 - spawn the advisor (only if --advisor was given): spawn a teammate named
advisor using advisor-prompt.md with every [FILL] placeholder
filled. Launch independent workers without polling for a readiness message. Route the
first consultation after the host reports the advisor ready.
Step 3 - compose teammate prompts. For every worker and critic:
- Read teammate-prompt.md.
- Fill in every
[FILL]placeholder with that teammate's scope, skills, and file ownership. - Append the teammate's task description after the directives block.
Step 4 - spawn workers. Spawn each worker with a unique name and its filled prompt
plus task description. Spawn a critic only when the change is risky or the user requested
one. Apply Model policy by role.
Brief and report. For every teammate, write a brief to
.superpowers/sdd/<task>/brief.md before it starts. Require a bounded report.md before
it stops or is interrupted. Use brief-report-template.md.
Reports contain conclusions, evidence pointers, and focused command results. They do not
paste whole source files, transcripts, or long logs.
Name one integration owner and one validation owner. Workers run only focused checks for their scope. The validation owner runs or reuses the content-bound full gate for the fixed integrated source. No other teammate repeats that gate.
Step 5 - manage the lifecycle:
- Assign tasks from host completion or availability events. Do not poll idle agents.
- Aggregate results and present them to the user.
- Escalate decisions to the user. Teammates do not contact the user directly.
- Watch for handoff signals (teammate-prompt.md Section 5).
- When a teammate signals a context relay: spawn the child, pass the handoff summary, confirm.
- Shut teammates down when their work is finished.
Advisor coordination (only when --advisor is active):
- Forward only milestones that change another worker's scope or a cross-cutting decision.
- Relay the advisor's guidance back to the relevant worker.
- If a worker is stuck after two failed attempts, escalate to the advisor.
- Before Phase 4, send one bounded
PRE-REVIEW:message with the fixed diff fingerprint. - During an advisor relay handoff, pause milestone forwarding until the replacement advisor signals READY.
Phase 4: Quality gate
Run this phase for security, trust-boundary, architecture, or cross-cutting changes. It may also be requested by the user. For routine work, the lead performs a focused self-review.
- The critic reviews one fixed aggregate diff made by the other teammates, checking:
- Factual accuracy: claims match the actual files and data.
- Stale references: files, functions, or numbers that do not exist.
- Consistency: no contradictions between teammate outputs.
- Completeness: every assigned task is actually done.
- Scope compliance: no unauthorized file changes.
- If
--advisoris active, send the advisor any cross-cutting or borderline findings for arbitration before reporting. - Present the critic's findings (plus advisor arbitration if any) to the user.
- Save findings to the task report. If issues were found, assign targeted fixes. Re-run the independent review only after material diff changes or for a named unresolved risk.
- Final report to the user:
- What was done, with file paths.
- What decisions were made, and why.
- What files changed.
- Any open items or concerns.
Agents and skills teammates should reuse
Teammates reuse what exists rather than building from scratch. Adapt this list to whatever the project actually has installed:
| Agent/Skill | Use for |
|---|---|
| A read-only explore agent | Codebase exploration without edit risk |
| A plan-reviewer agent | Adversarial plan or spec review |
| A self-critic agent | Adversarial review of the team's own output |
| A consistency-checker agent | Cross-checking docs against code |
/writing-plans |
Turning an approved design into an implementation plan |
/validate |
Pre-commit validation |
/code-review |
Multi-agent review of the diff |
Cost
Each teammate adds its own model context and message relay cost. Use the minimum set of independent scopes and one aggregate reviewer. Record actual usage when cost matters.
Known limitations
Host limits change. Inspect the live tool schema or current official documentation before claiming a feature exists. Two repository-level caveats remain:
- File conflicts. Two teammates editing the same file causes overwrites. Assign explicit file ownership in Phase 2.
- Context exhaustion. Large directories fill context fast. Teammates must follow the context relay protocol in teammate-prompt.md Section 5.
Controls
Keyboard controls for selecting a teammate, viewing its session, messaging it, and toggling the shared task list change between releases. See the controls reference at https://code.claude.com/docs/en/agent-teams for the current keys.
Use the live controls for status, interruption, and cleanup. Do not describe a requested operation as completed until the host emits its completion result.
04 同仓库更多 Skills
verify-loam
Prove a Loam change in a real rendered project: copier-render this checkout, then drive headless and interactive Claude Code sessions, stubbed Codex runs and copier updates in the render and capture hook, memory, deny-rule, update and check evidence. Use before shipping any seed, hook, settings or copier.yml change.
hypothesis-tree
Persistent hypothesis tree for multi-step, multi-session investigations. Use when a "why does X fail" question branches into sub-hypotheses that must survive across sessions, or when falsifiable claims need tracking with dated, linked evidence. Maintains one markdown file with add, update, review, and prune subcommands, each gated on verifying the cited evidence file exists and supports the claim. NOT for a single-session bug hunt, a one-command question, or general note-taking.
fable-prompting
Which Claude Fable 5.2 guide sections you can act on from a session, and which Claude Code already injects. Use before writing a Fable session prompt or brief.
catchup
Read-only session bootstrap briefing of git state, commits, handoff, tasks and red flags. Use when resuming work, starting a fresh session, or unsure of project state.
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
wizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.