Unified team skill for performance optimization. Coordinator orchestrates pipeline, workers are team-worker agents. Supports single/fan-out/independent parallel modes. Triggers on "team perf-opt".
Profile application performance, identify bottlenecks, design optimization strategies, implement changes, benchmark improvements, and review code quality.
Skill(skill="team-perf-opt", args="<task-description>")
|
SKILL.md (this file) = Router
|
+--------------+--------------+
| |
no --role flag --role <name>
| |
Coordinator Worker
roles/coordinator/role.md roles/<name>/role.md
|
+-- analyze -> dispatch -> spawn workers -> STOP
|
+-------+-------+-------+-------+-------+
v v v v v
[profiler] [strategist] [optimizer] [benchmarker] [reviewer]
(team-worker agents)
Pipeline (Single mode):
PROFILE-001 -> STRATEGY-001 -> IMPL-001 -> BENCH-001 + REVIEW-001 (fix cycle)
Pipeline (Fan-out mode):
PROFILE-001 -> STRATEGY-001 -> [IMPL-B01..N](parallel) -> BENCH+REVIEW per branch
Pipeline (Independent mode):
[Pipeline A: PROFILE-A->STRATEGY-A->IMPL-A->BENCH-A+REVIEW-A]
[Pipeline B: PROFILE-B->STRATEGY-B->IMPL-B->BENCH-B+REVIEW-B] (parallel)
| Role | Path | Prefix | Inner Loop |
|---|---|---|---|
| coordinator | roles/coordinator/role.md | — | — |
| profiler | roles/profiler/role.md | PROFILE-* | false |
| strategist | roles/strategist/role.md | STRATEGY-* | false |
| optimizer | roles/optimizer/role.md | IMPL-, FIX- | true |
| benchmarker | roles/benchmarker/role.md | BENCH-* | false |
| reviewer | roles/reviewer/role.md | REVIEW-, QUALITY- | false |
Parse $ARGUMENTS:
--role <name> → Read roles/<name>/role.md, execute Phase 2-4--role → @roles/coordinator/role.md, execute entry routerPERF-OPT.workflow/.team/PERF-OPT-<slug>-<date>/perf-optccw cli --mode analysis (read-only), ccw cli --mode write (modifications)mcp__ccw-tools__team_msg(session_id=<session-id>, ...)Coordinator spawns workers using this template:
Agent({
subagent_type: "team-worker",
description: "Spawn <role> worker",
team_name: "perf-opt",
name: "<role>",
run_in_background: true,
prompt: `## Role Assignment