This skill orchestrates multiple Claude Code agents to decompose tasks, assign roles, and coordinate subtasks across a team for faster delivery.
npx playbooks add skill yeachan-heo/oh-my-claudecode --skill team
Spawn N coordinated agents working on a shared task list using Claude Code's implicit agent team. Claude Code 2.1.178+ removed native TeamCreate/TeamDelete; with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, each session has one implicit team and teammates are spawned directly with the Agent/Task tool using distinct name values. This skill still preserves OMC's legacy tmux/CLI worker orchestration where documented (omc team). The implicit team and omc team do not share a result: one finishing does not make the other succeed.
The swarm compatibility alias was removed in #1131.
/oh-my-claudecode:team N:agent-type "task description"
/oh-my-claudecode:team "task description"
/oh-my-claudecode:team ralph "task description"
team-exec stage (e.g., executor, debugger, designer, codex, gemini, antigravity). Optional; defaults to stage-aware routing. Use codex to spawn Codex CLI workers, gemini for Gemini CLI workers (enterprise/API-key tier), or antigravity for Antigravity CLI (agy) workers (Google's successor to the Gemini CLI; requires respective CLIs installed). See Stage Agent Routing below./team 5:executor "fix all TypeScript errors across the project"
/team 3:debugger "fix build errors in src/"
/team 4:designer "implement responsive layouts for all page components"
/team "refactor the auth module with security review"
/team ralph "build a complete REST API for user management"
# With Codex CLI workers (requires: npm install -g @openai/codex)
/team 2:codex "review architecture and suggest improvements"
# With Gemini CLI workers (requires: npm install -g @google/gemini-cli)
/team 2:gemini "redesign the UI components"
# With Antigravity CLI workers (requires: install per https://antigravity.google)
/team 2:antigravity "redesign the UI components"
# Mixed: Codex for backend analysis, Gemini/Antigravity for frontend (delegate per-task with /oh-my-claudecode:ask)
User: "/team 3:executor fix all TypeScript errors"
|
v
[TEAM ORCHESTRATOR (Lead)]
|
+-- Use the session's implicit Claude Code team
| -> no TeamCreate call; lead remains current session
|
+-- Analyze & decompose task into subtasks
| -> explore/architect produces subtask list
|
+-- Create task list entries from the implementation plan
| -> TODO/task entries #1, #2, #3 with dependencies
|
+-- Update task-list entries (pre-assign owners)
| -> task #1 owner=worker-1, etc.
|
+-- Task(name="worker-1") x 3
| -> spawns teammates into the team
|
+-- Monitor loop
| <- teammate messages (auto-delivered by the active team surface)
| -> task-list/TodoWrite review for progress
| -> message teammates through the active team surface to unblock/coordinate
|
+-- Completion
-> request shutdown from each teammate through the active team surface
<- shutdown acknowledgement from teammates
-> state_clear(mode="team", session_id="<current_session_id>")
-> preserve shared/legacy state for explicit --all cleanup
Native Claude Code team model (2.1.178+):
- No per-team ~/.claude/teams/<name>/ directory is created by this skill.
- No TeamCreate/TeamDelete calls are available.
- `team_name` is accepted by native Claude Code only as ignored legacy metadata; do not rely on it for routing.
- Spawn teammates directly via Agent/Task with `name="worker-N"`.
Team is the OMC authority for parallel, staged execution. Use the deterministic conflict policies refuse, adopt_existing, and artifact_only rather than non-deterministic warning handling. If a task mentions Claude Code /goal, Ralph, or artifact-only Ultragoal, keep Team as the primary loop authority unless the leader explicitly hands off. Use /goal only as a documented native Claude Code handoff target or as visible evidence from the lead session; do not claim the /goal evaluator independently runs commands, reads files, or replaces team-verify / team-fix. Artifact-only Ultragoal references should be treated as durable goal ledger/checkpoint/evidence artifacts, not as worker execution by themselves.
Team execution follows a staged pipeline:
team-plan -> team-prd -> team-exec -> team-verify -> team-fix (loop)
Each pipeline stage uses specialized agents -- not just executors. The lead selects agents based on the stage and task characteristics.
| Stage | Required Agents | Optional Agents | Selection Criteria |
| --------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| team-plan | explore (haiku), planner (opus) | analyst (opus), architect (opus) | Use analyst for unclear requirements. Use architect for systems with complex boundaries. |
| team-prd | analyst (opus) | critic (opus) | Use critic to challenge scope. |
| team-exec | executor (sonnet) | executor (opus), debugger (sonnet), designer (sonnet), writer (haiku), test-engineer (sonnet) | Match agent to subtask type. Use executor (model=opus) for complex autonomous work, designer for UI, debugger for compilation issues, writer for docs, test-engineer for test creation. |
| team-verify | verifier (sonnet) | test-engineer (sonnet), security-reviewer (sonnet), code-reviewer (opus) | Always run verifier. Add security-reviewer for auth/crypto changes. Add code-reviewer for >20 files or architectural changes. code-reviewer also covers style/formatting checks. |
| team-fix | executor (sonnet) | debugger (sonnet), executor (opus) | Use debugger for type/build errors and regression isolation. Use executor (model=opus) for complex multi-file fixes. |
Routing rules:
N:agent-type parameter only overrides the team-exec stage worker type. All other stages use stage-appropriate specialists.opus agents to sonnet, sonnet to haiku where quality permits. team-verify always uses at least sonnet.security-reviewer + code-reviewer (opus) in team-verify.explore scans codebase, planner creates task graph, optionally analyst/architect for complex tasks.analyst extracts requirements, optionally critic.verifier + task-appropriate reviewers (see routing table).team-fix.executor/debugger depending on defect type.team-exec then team-verify.Continue team-exec -> team-verify -> team-fix until:
team-fix is bounded by max attempts. If fix attempts exceed the configured limit, transition to terminal failed (no infinite loop).
Run closeout (either terminal outcome). Before /oh-my-claudecode:cancel state cleanup, append at most three factual lines to .omc/notepads/team/problems.md (blockers additionally in .omc/notepads/team/issues.md) — what broke (defects that survived a fix round, three-strike halts) and what dragged (worker environment friction, missing checks, unreachable information). Preserve existing entries: append only and never replace the shared file. If there are no observations, append nothing; an empty closeout is valid, so do not write “no lessons.” Observations only; landing them on repo surfaces is refit's job, with the user's approval. For a terminal failed outcome, also draft an incident work item with the failure signature, evidence pointers, and reopen path; append it to the local .omc/notepads/team/issues.md. Post it to a tracker only when the user or mode invocation explicitly authorizes that external action.
When transitioning between stages, important context — decisions made, alternatives rejected, risks identified — lives only in the lead's conversation history. If the lead's context compacts or agents restart, this knowledge is lost.
Each completing stage MUST produce a handoff document before transitioning.
The lead writes handoffs to .omc/handoffs/<stage-name>.md.
## Handoff: <current-stage> → <next-stage>
- **Decided**: [key decisions made in this stage]
- **Rejected**: [alternatives considered and why they were rejected]
- **Risks**: [identified risks for the next stage]
- **Files**: [key files created or modified]
- **Remaining**: [items left for the next stage to handle]
.omc/handoffs/ for session resume. They are not deleted by native Claude Code team cleanup; no TeamDelete call exists in Claude Code 2.1.178+.## Handoff: team-plan → team-exec
- **Decided**: Microservice architecture with 3 services (auth, api, worker). PostgreSQL for persistence. JWT for auth tokens.
- **Rejected**: Monolith (scaling concerns), MongoDB (team expertise is SQL), session cookies (API-first design).
- **Risks**: Worker service needs Redis for job queue — not yet provisioned. Auth service has no rate limiting in initial design.
- **Files**: DESIGN.md, TEST_STRATEGY.md
- **Remaining**: Database migration scripts, CI/CD pipeline config, Redis provisioning.
.omc/handoffs/ to recover stage transition context.skills/cancel/SKILL.md; do not duplicate its flag, scope, or state-cleanup
rules here. Handoff files in .omc/handoffs/ are preserved for resume.
complete, failed, and cancelled.On native Windows, do not tell users that /team requires WSL or that tmux is unavailable until the actual tmux-compatible binary has been checked. Native [psmux](https://github.com/psmux/psmux) installs a tmux-compatible command (often tmux / tmux.cmd) and is a supported Team multiplexer.
Before blocking or falling back on Windows:
tmux -V (or the platform equivalent such as where tmux followed by tmux -V).tmux -V as tmux available.Resolve the current session identity from the invocation context before touching Team state. In CLI contexts, OMC_SESSION_ID is authoritative; in hook contexts, the payload's session_id is authoritative. When an identity is available, pass it explicitly and consistently:
state_read(mode="team", session_id="<current_session_id>")
state_read without session_id reads legacy/aggregate state and may include other sessions. Never select or resume a Team from an unscoped aggregate response. If no identity is available, use only an explicitly identified legacy state; never infer ownership from session entries in an aggregate response.
Read existing session state before deriving a slug, decomposing work, or writing/initializing state. If active=true and current_phase is non-terminal, resume the recorded stage using the existing handoffs and task-list state for that Team. Preserve team_name, current_phase, fix_loop_count, max_fix_loops, stage_history, and all other existing Team state fields, including worker/task/launch-attempt records. Use the same session_id on every subsequent state_write and state_clear, applying only partial updates under the existing state lock. Do not run the new-team initialization below, derive a replacement slug, create duplicate tasks, spawn duplicate workers, or repeat launch attempts.
If state is malformed, unreadable, or otherwise corrupt, report the diagnostic and preserve the original bytes. Do not replace, clear, initialize, or treat it as a new run.
The following initialization phases apply only to a new run with no active, scoped state.
Use explore or architect (via MCP or agent) to analyze the codebase and break the task into N subtasks:
subject and detailed descriptionUse the session's implicit Claude Code team. Do not call TeamCreate; Claude Code 2.1.178+ removed that tool and automatically gives the session one implicit team when CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 is enabled.
Derive a slug such as fix-ts-errors for OMC state, prompt labels, handoffs, and human-readable reporting only. Native Claude Code may accept team_name as legacy metadata, but it is ignored for routing.
Write OMC state using the state_write MCP tool for proper session-scoped persistence:
Use the same resolved session_id from the Resume Check for this and every later Team state call; if no identity is available, use only the explicitly identified legacy state described above.
state_write(mode="team", session_id="<current_session_id>", active=true, current_phase="team-plan", state={
"team_name": "fix-ts-errors",
"agent_count": 3,
"agent_types": "executor",
"task": "fix all TypeScript errors",
"fix_loop_count": 0,
"max_fix_loops": 3,
"linked_ralph": false,
"stage_history": "team-plan"
})
> Note: The MCP state_write tool transports all values as strings. Consumers must coerce agent_count, fix_loop_count, max_fix_loops to numbers and linked_ralph to boolean when reading state.
State schema fields:
| Field | Type | Description |
| ---------------- | ------- | --------------------------------------------------------------------------------------- |
| active | boolean | Whether team mode is active |
| current_phase | string | Current pipeline stage: team-plan, team-prd, team-exec, team-verify, team-fix |
| team_name | string | OMC slug for state, handoffs, and reporting; ignored by native Claude Code routing |
| agent_count | number | Number of worker agents |
| agent_types | string | Comma-separated agent types used in team-exec |
| task | string | Original task description |
| fix_loop_count | number | Current fix iteration count |
| max_fix_loops | number | Maximum fix iterations before failing (default: 3) |
| linked_ralph | boolean | Whether team is linked to a ralph persistence loop |
| stage_history | string | Comma-separated list of stage transitions with timestamps |
Update state on every stage transition:
state_write(mode="team", session_id="<current_session_id>", current_phase="team-exec", state={
"stage_history": "team-plan:2026-02-07T12:00:00Z,team-prd:2026-02-07T12:01:00Z,team-exec:2026-02-07T12:02:00Z"
})
Create task list entries for each subtask using TodoWrite or the active task-list surface. Task-list tools are for tracking only; they do not create native teams.
// Task-list entry for subtaskWeekly roundup of top Claude Code skills, MCP servers, and AI coding tips.