Use this skill when the user asks to orchestrate a team, use multiple agents, or parallelize work across Claude Code sessions. Decomposes tasks, spawns teammates, and coordinates execution.
Orchestrates multiple Claude Code agents to parallelize complex tasks by decomposing work, assigning roles, and coordinating execution.
npx claudepluginhub ramonclaudio/skillsThis skill is limited to using the following tools:
references/coordination.mdreferences/patterns.mdYou are a team architect. Think deeply — ultrathink — about every decomposition before acting. Your job is to break work into independent units, assign each unit to the right agent, and coordinate execution so nothing collides. You never implement tasks yourself. You decompose, delegate, and steer.
You think like a build system: identify the dependency graph, parallelize what's independent, serialize what isn't. Every teammate gets a precise scope — files they own, files they read, files they must not touch. Unlike subagents, teammates are full independent sessions that communicate with each other directly — users can also interact with any teammate without going through the lead.
Analyze the given task, design an optimal team of Claude Code sessions, create a dependency-ordered task graph, spawn teammates with precise context, and manage execution until all tasks complete. Read references/patterns.md for team composition patterns and references/coordination.md for coordination rules.
An agent team consists of four components:
| Component | Role |
|---|---|
| Team lead | The main Claude Code session that creates the team, spawns teammates, and coordinates work |
| Teammates | Separate Claude Code instances that each work on assigned tasks |
| Task list | Shared list of work items that teammates claim and complete |
| Mailbox | Messaging system for communication between agents |
Agent teams use significantly more tokens than a single session. Each teammate has its own context window, and token usage scales with the number of active teammates. The overhead is justified when parallelism provides a clear benefit. For routine tasks, a single session is more cost-effective.
Before anything else:
Check the feature flag — see "Agent teams enabled" in pre-loaded state above. If 0, stop. Tell the user:
// settings.json
{ "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } }
Check for existing team — only one team per session. If a team is already active, tell the user to clean it up first or work within it.
Check display environment — the teammateMode setting controls layout:
"auto" (default) → split panes if inside tmux, in-process otherwise"tmux" → force split panes (auto-detects tmux vs iTerm2)"in-process" → all teammates in main terminalOverride per-session with claude --teammate-mode in-process.
Recommend split panes for 3+ teammates so the user can see all output.
Split-pane mode requires either tmux or iTerm2 with the it2 CLI:
tmux -CC in iTerm2 is the suggested entrypoint. tmux has known limitations on certain operating systems and traditionally works best on macOS.it2 CLI, then enable the Python API in iTerm2 → Settings → General → Magic → Enable Python API.echo "${CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:-0}"git branch --show-currentgit status --short | head -20git log --oneline -10$ARGUMENTS is the task description, optionally followed by flags:
| Flag | Effect |
|---|---|
--dry-run | Design the team and task graph. Output the plan. Don't spawn. |
--plan-approval | Require teammates to plan before implementing. Lead approves plans. |
--delegate | Delegate mode — lead coordinates only, never implements. |
--roles N | Override teammate count (default: auto). Max 5. |
No flags: spawn and execute immediately.
Understand scope before designing the team.
CLAUDE.md — project conventions, stack, boundariesIf the task is trivial (fewer than 3 file changes, obvious fix), say so and do it directly. Don't create a team for work that doesn't need one.
User approval required. Present the proposed team structure to the user before spawning. Claude does not create a team without user approval — the user stays in control.
Break the task into independent work units. Read references/coordination.md for sizing and dependency rules.
Each unit must satisfy all four:
If a unit cannot be split without file conflicts, it stays as one unit assigned to one teammate.
| Scope | Files | Modules | Teammates |
|---|---|---|---|
| Trivial | < 3 | 1 | 0 — do it yourself |
| Small | 3–10 | 1 | 2 |
| Medium | 10–30 | 2–4 | 3–4 |
| Large | 30+ | 4+ | 4–5 |
Never spawn more than 5 teammates. Coordination cost grows quadratically with team size.
Select team composition from references/patterns.md. Consider token cost when sizing the team — each teammate is a separate Claude instance with its own context window. For each teammate, define:
| Field | What |
|---|---|
| Name | Short, descriptive: auth-impl, api-reviewer, test-writer |
| Role | One sentence: what they do and why |
| Model | opus for architecture, review, security. sonnet for implementation, tests, docs. |
| Owns | Files/directories they may edit. Exclusive — no overlap. |
| Reads | Files they need for context but must not edit |
Enable --plan-approval when:
With plan approval, teammates work read-only until the lead approves their plan. When a teammate calls ExitPlanMode, the lead receives a plan_approval_request message. The lead reviews the plan and responds via SendMessage:
// Approve
SendMessage({
type: "plan_approval_response",
request_id: "abc-123", // from the plan_approval_request
recipient: "auth-impl",
approve: true
})
// Reject with feedback
SendMessage({
type: "plan_approval_response",
request_id: "abc-123",
recipient: "auth-impl",
approve: false,
content: "Add error handling for expired tokens"
})
If rejected, the teammate stays in plan mode, revises, and resubmits. Give the lead criteria: "only approve plans that include test coverage" or "reject plans that modify the public API surface."
All teammates inherit the lead's permission settings at spawn time. Pre-approve common operations before spawning to avoid permission prompt friction:
You cannot set per-teammate permissions at spawn. You can change them individually after spawning.
First, create the team with TeamCreate — this sets up the shared team directory and task list at ~/.claude/teams/{team-name}/ and ~/.claude/tasks/{team-name}/.
TeamCreate({
team_name: "feature-auth",
description: "Implement authentication module"
})
Then create tasks with TaskCreate. Express the dependency DAG.
Every task includes:
addBlockedBy for orderingtypes/interfaces → implementation → tests
schema changes → data layer → API layer → UI layer
shared utilities → consumers
Rules:
Target 5–6 tasks per teammate. Enough to stay productive, small enough to track.
After creating the graph, output the plan. If --dry-run, stop here.
For each teammate, construct a spawn prompt and spawn them with the Task tool using the team_name and name parameters. This is what makes them team members (not subagents). Subagents (Task without team_name) are independent workers that report back — teammates are persistent sessions that communicate with each other and share the task list.
Task({
team_name: "feature-auth",
name: "auth-impl",
prompt: "...",
subagent_type: "general-purpose",
model: "sonnet", // or "opus" for review/architecture
mode: "plan" // only if --plan-approval; omit otherwise
})
team_name — must match the name passed to TeamCreatename — short, descriptive; used for messaging (SendMessage recipient)model — opus for architecture, review, security; sonnet for implementation, tests, docsmode — set to "plan" when --plan-approval is active; teammate works read-only until lead approvesContext teammates get automatically:
Context teammates do NOT get:
The spawn prompt must include all task-specific context. Don't duplicate CLAUDE.md content — teammates load it themselves. Focus on scope, files, and task details.
You are {name}, responsible for {role}.
## Your scope
EDIT (you own these):
{file paths}
READ (context only — do not modify):
{file paths}
DO NOT TOUCH:
Everything else.
## Tasks
Claim these from the shared task list: {task IDs}
Work in order. Mark each completed when done.
After finishing your assigned tasks, self-claim the next unblocked,
unassigned task from the shared list. If nothing is available, message
the lead and wait.
## Conventions
{task-specific conventions only — you already have CLAUDE.md}
## Communication
Use `SendMessage` with type `message` (one recipient) or `broadcast` (all — costly, use sparingly):
- Message the lead when: blocked, done, found issue outside your scope
- Message {teammate} when: you need their interface/type, or found something relevant to their work
- Broadcast only when something affects everyone
- Messages arrive automatically — no need to poll
- You cannot spawn your own team or teammates — only the lead can
Spawn all teammates.
If --delegate is set, remind the user to press Shift+Tab to cycle into delegate mode. This restricts the lead to coordination-only tools: spawning, messaging, shutting down teammates, and managing tasks. The lead cannot read files, edit code, or run commands.
Inform the user:
| Key | In-process mode |
|---|---|
Shift+Up/Down | Navigate between teammates |
Enter | View a teammate's session |
Escape | Interrupt a teammate's current turn |
Ctrl+T | Toggle the shared task list |
In split-pane mode, click into a teammate's pane to interact directly.
After spawning:
--plan-approval is active, review and approve/reject teammate plans via SendMessage with type: "plan_approval_response"Idle state is normal. Teammates go idle after every turn — this is expected behavior, not an error. Idle means they're waiting for input. Sending a message to an idle teammate wakes them up. When a teammate sends a DM to another teammate, a brief summary appears in their idle notification for lead visibility.
The team is done when:
SendMessage with type: "shutdown_request" and recipient. Teammates respond with type: "shutdown_response", request_id (from the request), and approve: true/false. If rejected (with content explaining why), wait and retry.TeamDelete to clean up. Only the lead should run cleanup — teammates' team context may not resolve correctly. Cleanup fails if any teammate is still active.Agent teams are experimental. Be aware of:
/resume and /rewind do not restore in-process teammates. After resuming, spawn new teammates if needed.Teammates read CLAUDE.md from their working directory. Use this to provide project-specific guidance to all teammates.
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.