agentleFS
robconeryrobconery/kolea/.claude/skills/agent-teams/SKILL.md

agent-teams

Skill7 starsChanged 3 months agoMITView on GitHub

How to orchestrate Claude Code's experimental Agent Teams — spawning teammates as separate sessions, delegating work to them, and waiting for results instead of doing the work yourself in the main thread. Use whenever a task should run as parallel/independent workstreams: multi-file refactors, reviewing or auditing many modules at once, exploring competing approaches or hypotheses, research from several angles, or any "do A, B, and C in parallel" / "spin up a team" / "have agents work on this" request. Also use to recall the enable flag, teammate-mode config, coordination tools (SendMessage, task list), hooks, and the delegate-don't-implement orchestration pattern, and to avoid the anti-pattern of running everything sequentially in the lead session.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use codex-review and security-audit.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • juriwiensSkill

    codex-review

    Run code review via Codex CLI

    Also in 3 projects that use this

  • CloudflareSkill

    security-audit

    Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If asked to proceed and teammates aren't done: do not start doing their work — wait, or steer them.

    line 40
  2. Distinctive:

    Avoid deep dependency chains (idle time).

    line 112
  3. Distinctive:

    No nested teams; teammates can't spawn teammates.

    line 117

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Agent Teams orchestration

Claude Code's experimental Agent Teams coordinates multiple Claude Code sessions. The session that creates the team is the lead (you, here); teammates are separate sessions with their own full context windows that message each other directly and pull work off a shared task list.

This differs from subagents (the Agent tool): subagents run inside one session and only report back to their parent. Teammates are peers — they coordinate through a shared mailbox and task list, and self-claim work.

The one rule this skill exists to enforce

Delegate and wait. Do not implement the parallel work yourself in the lead session. When a task decomposes into independent streams, the lead's job is to spawn teammates, assign/seed tasks, monitor, and synthesize — not to write module A then module B then the tests sequentially. If you catch yourself doing the work, stop and delegate it.

  • ❌ Anti-pattern: "Write the auth module, then the API, then the tests" → lead does all three in order.
  • ✅ Pattern: spawn 3 teammates (auth / API / tests), assign clear tasks, then wait for all to finish before synthesizing.

If asked to proceed and teammates aren't done: do not start doing their work — wait, or steer them.

Preflight — is it enabled?

Agent Teams is off by default and needs Claude Code v2.1.32+. It requires CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 (env or settings.json env). If a request clearly wants a team but the feature may be off, check first and tell the user how to enable it rather than silently falling back to doing everything solo:

// ~/.claude/settings.json
{
  "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" },
  "teammateMode": "auto"   // "auto" | "in-process" | "tmux"
}

teammateMode: auto (split panes if in tmux, else in-process), in-process (cycle with Shift+Down), tmux (needs tmux/iTerm2; one pane per teammate). Per-session override: claude --teammate-mode in-process. Teammate model is set via /config → "Default teammate model" (does not inherit /model).

How to spawn and run a team (what the lead does)

Spawn in natural language; name teammates so you can reference them later:

Create an agent team to <goal>. Spawn:
- "<name-1>" to <scoped deliverable, own files>
- "<name-2>" to <scoped deliverable, own files>
- "<name-3>" to <scoped deliverable, own files>
Have them work in parallel. Wait for all to finish, then I'll synthesize.
  • Use a subagent definition as a teammate: "Spawn a teammate using the security-reviewer agent type to audit the auth module." Its tools allowlist and model apply; its body is appended to the system prompt. Team coordination tools are always available regardless of tools. skills and mcpServers from the definition are not applied (teammates load those from project/user settings).
  • Approval gate: "Require plan approval before they make changes." Teammate plans in read-only mode → sends plan to lead → lead approves/rejects.
  • Give context: teammates do NOT inherit the lead's conversation. Put task-specific detail in the spawn prompt; rely on CLAUDE.md in their cwd.
  • Assignment: either assign explicitly (Assign the migration to @db-expert) or let teammates self-claim the next unblocked task.

Coordination tools (always available to teammates)

SendMessage (message a named teammate or the lead), ListTeammates, CreateTask, ListTasks, UpdateTaskStatus, GetTaskContext. Task states: pending → in-progress → completed; dependencies auto-unblock; claiming is file-locked against races. Messages and idle notifications are delivered automatically — the lead does not poll.

Navigation: Shift+Down cycle teammates · Ctrl+T task list · Esc interrupt current turn.

Quality gates (hooks in settings.json)

TeammateIdle, TaskCreated, TaskCompleted — exit code 2 to block the action and send feedback (e.g. reject a task with no test coverage, keep an idle teammate working).

Sizing & boundaries

  • 3–5 teammates for most work; >5–6 = coordination overhead.
  • ~5–6 tasks per teammate; tasks self-contained with clear deliverables.
  • Each teammate owns separate files/modules — concurrent edits to the same file overwrite each other.
  • Avoid deep dependency chains (idle time). Good first uses: PR review, bug investigation, library research, competing approaches.

Gotchas

  • No nested teams; teammates can't spawn teammates. One team per lead at a time. Lead is fixed for the team's lifetime.
  • /resume and /rewind don't restore in-process teammates.
  • Task status can lag (teammate forgets to mark complete, blocking deps) — check ListTasks and fix manually if a team stalls.
  • Pre-approve common ops in /permissions before spawning (teammates start with the lead's permission mode).
  • Cleanup runs from the lead only, never a teammate. Clean up the team before starting another. Kill orphaned tmux sessions manually (tmux ls → tmux kill-session -t <name>).

Reference

  • references/orchestration.md — full verbatim config keys, spawn-prompt recipes, the delegate-vs-implement decision checklist, file/storage locations, and the limitations table.

Source: official docs — https://code.claude.com/docs/en/agent-teams

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.