skills/crew/SKILL.md
Orchestrate multi-agent teams for parallel multi-branch work. Triggers on: team, crew, launch team, parallel agents, multi-branch, agent teammates, coordinate work, worktree. Handles config, worktree setup, teammate spawning, and task coordination.
npx skillsauth add arpitnath/claude-capsule-kit crewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a Crew Orchestrator responsible for launching and coordinating multi-agent teams that work in parallel across separate git worktrees. You handle the full lifecycle: config, setup, spawning, coordination, and cleanup.
Auto-triggers on keywords:
Use crews when:
Do NOT use crews when:
architecture-explorer)Manual invocation: /crew
Goal: Determine team composition and config
Step 1: Check for existing config
cat .crew-config.json
If config exists:
Team: {name}
Profile: {profile}
Teammates:
| Name | Role | Branch | Model |
|------|------|--------|-------|
| ... | ... | ... | ... |
If no config exists:
Option A: Auto-decompose (recommended for large codebases)
cck crew decompose [paths...]
.crew-config.json with teammates for each cluster--write flag to write directly: cck crew decompose --write--teammates N to limit team size: cck crew decompose --teammates 3Option B: Manual composition
Ask user: "What work needs to be parallelized?"
Gather requirements:
Write .crew-config.json directly. Two formats supported:
Flat format (simple — all teammates in one list):
{
"team": {
"name": "collected-name",
"lead": { "model": "sonnet" },
"teammates": [
{ "name": "name", "branch": "branch", "worktree": true, "role": "developer", "focus": "focus" }
]
},
"project": { "main_branch": "auto-detect" },
"stale_after_hours": 4
}
Grouped format (crew grouping — logical sub-teams):
{
"team": {
"name": "collected-name",
"lead": { "model": "sonnet" },
"crews": [
{
"name": "frontend",
"teammates": [
{ "name": "ui-dev", "branch": "feat/ui", "worktree": true, "role": "developer", "focus": "..." }
]
},
{
"name": "backend",
"teammates": [
{ "name": "api-dev", "branch": "feat/api", "worktree": true, "role": "developer", "focus": "..." }
]
}
]
},
"project": { "main_branch": "auto-detect" },
"stale_after_hours": 4
}
Use grouped format when you have 4+ teammates that fit into logical sub-teams.
CLI commands support --crew <name> to filter operations by crew group.
Auto-detect main_branch from git
When to use decompose vs manual:
Deliverable: Valid .crew-config.json and confirmed team composition
Goal: Create worktrees and prepare team state
Step 1: Run crew start
cck crew start [profile]
Step 2: Read the generated lead prompt
The lead prompt is saved at the path shown in the output. Read it:
cat ~/.claude/crew/{hash}/{profile}/lead-prompt.md
Step 3: Parse the prompt
Extract from the generated prompt:
Step 4: Display team layout
Worktrees created:
| Teammate | Branch | Worktree Path |
|----------|--------|---------------|
| alice | feature/auth | /project-feature--auth |
| bob | feature/tests | /project-feature--tests |
Deliverable: Worktrees ready, lead prompt parsed, team layout confirmed
Goal: Create team, tasks, and spawn all teammates
Execute these steps in order:
Step 1: Create team
TeamCreate(team_name="{team.name}")
Step 2: Create tasks One task per teammate describing their focus area:
TaskCreate(
subject="[teammate-name]: [brief focus]",
description="[full focus description from config]",
activeForm="[verb-ing form]"
)
Step 3: Spawn ALL teammates in parallel
CRITICAL: Spawn all teammates in a SINGLE message with multiple Task calls.
For each teammate, use the full prompt from the generated lead prompt:
Task(
name="{teammate.name}",
team_name="{team.name}",
subagent_type="{resolved.subagent_type}",
model="{resolved.model}",
mode="{resolved.mode}",
run_in_background=true,
prompt="{full teammate prompt from lead-prompt.md}"
)
The teammate prompt includes:
Step 4: Assign tasks
TaskUpdate(taskId="N", owner="{teammate.name}")
Deliverable: All teammates spawned and working in parallel
Goal: Monitor, support, and wrap up
Monitor progress:
TaskList periodically to see task statusHealth Monitoring:
Teammates can become unresponsive or crash. Use health monitoring to detect issues:
Manual health checks:
cck crew doctor [profile]
Displays health table showing each teammate's status, last activity, and recent commits.
Automated monitoring protocol (every 10-15 minutes):
SendMessage(type="message", recipient="{name}", content="Status check: still working?")
git -C {worktree_path} log --oneline -5
git -C {worktree_path} status
Re-spawning crashed teammates:
Health status meanings:
active (✓): Updated recently, working normallyidle (○): No recent updates but not yet stale, may be thinkingunresponsive (⚠): Stale beyond threshold, may need attentioncrashed (✗): Worktree exists but no activity and very stale, needs re-spawnWhen teammates report completion:
git -C {worktree_path} log --oneline -5
git -C {worktree_path} diff {main_branch} --stat
When ALL tasks are complete:
cck crew merge-preview [profile]
cck crew merge [profile]
Optional flags:
--test: Run tests after each merge (rollback on failure)--test-command="npm run test:ci": Custom test commandgit merge {branch}
# Resolve conflicts manually
git add .
git commit
SendMessage(type="shutdown_request", recipient="{name}", content="Work complete, shutting down.")
cck crew stop [profile] --cleanup
.crew-config.json if it was created for this session onlyDeliverable: All work merged, teammates shut down, worktrees cleaned
Roles set sensible defaults. Explicit fields in config always override role defaults.
| Role | Model | Mode | Focus Default |
|------|-------|------|---------------|
| developer | sonnet | bypassPermissions | Implement features, write code, fix bugs |
| reviewer | sonnet | default | Review code for bugs, security, quality. Read-only |
| tester | haiku | bypassPermissions | Write and run tests, ensure coverage |
| architect | opus | default | Design architecture, review patterns. Read-only |
Single team (simple):
{
"team": {
"name": "my-team",
"teammates": [
{ "name": "alice", "branch": "feat/auth", "worktree": true, "role": "developer", "focus": "Build auth" }
]
},
"project": { "main_branch": "main" }
}
Multiple profiles (advanced):
{
"profiles": {
"dev": {
"name": "dev-team",
"teammates": [
{ "name": "backend", "branch": "feat/api", "role": "developer", "focus": "API work" },
{ "name": "frontend", "branch": "feat/ui", "role": "developer", "focus": "UI work" }
]
},
"review": {
"name": "reviewers",
"teammates": [
{ "name": "reviewer", "branch": "main", "worktree": false, "role": "reviewer" }
]
}
},
"default": "dev",
"project": { "main_branch": "main" }
}
testing
Systematic task orchestration for complex multi-step tasks. Triggers automatically when detecting: complex task, multi-step work, coordinate, orchestrate, break down. Guides through Understand → Strategy → Plan → Execute → Verify phases for comprehensive systematic approach.
testing
Decision matrix for choosing optimal approach to any task. Helps Claude decide when to delegate to sub-agents vs. working directly. Use when starting a new task or unsure of best approach.
development
Build deep codebase understanding using Capsule context, progressive-reader, and specialist agents instead of overwhelming main context. Triggers on: don't have context, understand codebase, learn about, need background. Implements progressive context building.
development
Systematic debugging using error-detective and debugger agents instead of manual investigation. Triggers automatically on: error, bug, broken, failing, exception, stack trace, test failure. Orchestrates RCA-first approach with parallel agent investigation.