Universal team coordination skill with dynamic role generation. Uses team-worker agent architecture with role-spec files. Only coordinator is built-in -- all worker roles are generated at runtime as role-specs and spawned via team-worker agent. Beat/cadence model for orchestration. Triggers on "Team Coordinate ".
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Universal team coordination skill with dynamic role generation. Uses team-worker agent architecture with role-spec files. Only coordinator is built-in -- all worker roles are generated at runtime as role-specs and spawned via team-worker agent. Beat/cadence model for orchestration. Triggers on "Team Coordinate ".
Universal team coordination skill: analyze task -> generate role-specs -> dispatch -> execute -> deliver. Only the coordinator is built-in. All worker roles are dynamically generated as lightweight role-spec files and spawned via the team-worker agent.
Architecture
+---------------------------------------------------+
| Skill(skill="team-coordinate") |
| args="task description" |
+-------------------+-------------------------------+
|
Orchestration Mode (auto -> coordinator)
|
Coordinator (built-in)
Phase 0-5 orchestration
|
+-------+-------+-------+-------+
v v v v v
[team-worker agents, each loaded with a dynamic role-spec]
(roles generated at runtime from task analysis)
CLI Tools (callable by any worker):
ccw cli --mode analysis - analysis and exploration
ccw cli --mode write - code generation and modification
Delegation Lock
Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.
If a tool call is BLOCKED: STOP. Create a task, spawn a worker.
No exceptions for "simple" tasks. Even a single-file read-and-report MUST go through spawn_agent. The overhead is the feature — it provides session tracking, artifact persistence, and resume capability.
After spawning, use wait_agent({ timeout_ms: 1800000 }) to collect results. If result.timed_out, send STATUS_CHECK via followup_task (wait 3 min), then FINALIZE with interrupt (wait 3 min), then mark timed_out and close agents. Use close_agent({ target: <name> }) each worker.
Inner Loop roles (role has 2+ serial same-prefix tasks): Set inner_loop: true. The team-worker agent handles the loop internally.
Single-task roles: Set inner_loop: false.
Model Selection Guide
Roles are dynamically generated at runtime. Select model/reasoning_effort based on the generated role's responsibility_type:
responsibility_type
model
reasoning_effort
Rationale
exploration
(default)
medium
Read-heavy, less reasoning needed
analysis
(default)
high
Deep analysis requires full reasoning
implementation
(default)
high
Code generation needs precision
synthesis
(default)
medium
Aggregation over generation
review
(default)
high
Quality assessment needs deep reasoning
Map each generated role's responsibility_type (from team-session.json#roles) to the table above.
Override model/reasoning_effort in spawn_agent when cost optimization is needed:
Send upstream task findings to a running downstream worker
Not used in this skill
followup_task
No resident agents -- all workers are one-shot
Check running agents
list_agents
Verify agent health during resume
Note: Since roles are dynamically generated, the coordinator must resolve task prefixes and role names from team-session.json#roles at runtime. There are no hardcoded role-specific examples.
fork_turns Strategy
fork_turns: "none" is the default. Consider fork_turns: "all" only when:
Runtime analysis reveals the task requires deep familiarity with the full conversation context
The dynamically-generated role-spec indicates the worker needs project-wide understanding
The coordinator has already accumulated significant context about the codebase
This decision should be made per-task during Phase 4 based on the role's responsibility_type.
Agent Health Check
Use list_agents({}) in handleResume and handleComplete:
// Reconcile session state with actual running agents
const running = list_agents({})
// Compare with team-session.json active_workers
// Reset orphaned tasks (in_progress but agent gone) to pending
Named Agent Targeting
Workers are spawned with task_name: "<task-id>" enabling direct addressing: