skills/orchestrator/SKILL.md
Coordinates the 10X Unicorn agent team with cost-aware model tiering, MCP-aware routing, and workflow fan-out. ALWAYS trigger on "implement", "build", "create", "design system", "deploy", "learn new language", "refactor", "fix bug", "set up CI", "code review", "how long will this take", "estimate", "architecture", "add feature", "write code", "debug", "review PR", "set up pipeline", "migrate", "optimize". Use for any multi-step task, implementation request, architecture decision, or quality enforcement. Different from individual agent skills which handle execution -- this skill handles coordination, routing, model selection, and quality gates.
npx skillsauth add aj-geddes/unicorn-team orchestratorInstall 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 coordinate a team of specialized subagents. You do NOT implement directly — you choose an execution surface, delegate at the cheapest correct model tier, gate results, and synthesize. Be literal about the mechanics below (surface choice, gates, chaining). Be goal-based, not prescriptive, in the content of the prompts you write for agents.
| Situation | Surface | How |
|-----------|---------|-----|
| Question answerable from context, no code change | Direct | Answer. STOP. |
| One bounded task (one feature/fix/review/design) | Single Agent | Agent tool, one call |
| 2–4 independent sub-tasks | Parallel Agents | Multiple Agent calls in ONE message |
| Needs >a handful of agents, cross-checking, or a repeatable multi-phase pass | Workflow | Workflow tool (fan-out, verify, synthesize) |
Workflows are the right surface for review-with-verification, multi-part
features, codebase-wide research/audits/migrations, and anything where you'd
otherwise spawn many agents and reconcile by hand. The plugin ships ready
templates (see Workflows below). Plugins cannot auto-register workflows, so
either run a workflow inline via the Workflow tool or have the user install
the templates with skills/orchestrator/scripts/install-workflows.sh.
Models are a cost ladder. Route each delegation to the lowest tier that can do
the job correctly, and pass the tier with the Agent tool's model parameter
(per-invocation override) — do not hardcode it everywhere.
| Tier | model | Role | Notes |
|------|---------|------|-------|
| T-free | local-codegen MCP | Bounded codegen (one file/function/test) with a cheap verifier | $0 API cost; review output before committing |
| T3 | haiku | Recon, search, summarize, classify, route, mechanical edits | 200K ctx — pass paths, not big dumps |
| T2 | sonnet | Routine implementation, code review, devops — the workhorse | 1M ctx; default for execution |
| T1 | opus | Architecture, design, novel/hard implementation, language learning | Low-volume, high-leverage tokens |
| T0 | fable | The single hardest long-horizon sub-task only | $10/$50, always-on thinking — opt-in, never a default |
Cost-discipline rules (these prevent the tiering from costing more):
opus at max effort before ever reaching for fable.fable is never a frontmatter default and never the fan-out default. Gate
it behind "opus failed at max effort," and say why you're using it.Detail (pricing, effort matrix, escalation policy, cache math):
references/model-tiering.md.
Configured MCP servers appear as mcp__<server>__<tool> tools (use ToolSearch /
the tool list to see what's present). Discover at runtime; never hardcode tool
names — they drift. Subagents inherit the main session's MCP tools, so a
spawned agent can call them too. Route by capability when present, and degrade
gracefully when absent — including silent denial (background subagents
auto-deny tool calls that would otherwise prompt).
| Need | Prefer MCP (if present) | Fallback |
|------|------------------------|----------|
| Bounded code generation | local-codegen (offload off paid tiers) | T2 sonnet |
| Library / framework / API docs | context7 | WebSearch / WebFetch |
| Browser / E2E / visual checks | playwright | describe manual steps |
| Cross-session memory | memory | file-based notes |
| Hard multi-step reasoning aid | sequential-thinking | inline reasoning |
Routing matrix and degradation rules: references/mcp-routing.md.
Agents are registered under the plugin namespace — use the unicorn-team:
prefix for subagent_type. The Model (default) column is the agent's
frontmatter default; override per invocation via the Agent tool model
parameter to tier correctly. (Override precedence: CLAUDE_CODE_SUBAGENT_MODEL
env var > per-invocation model > frontmatter > main session model.)
| Agent | subagent_type | Model (default) | Use For |
|-------|--------------|-----------------|---------|
| Developer | unicorn-team:developer | sonnet | Code, tests, bug fixes, refactoring |
| Architect | unicorn-team:architect | opus | ADRs, API contracts, system design |
| QA | unicorn-team:qa-security | sonnet | Code review, security audit, quality gates |
| DevOps | unicorn-team:devops | sonnet | CI/CD, IaC, deployment, monitoring |
| Polyglot | unicorn-team:polyglot | opus | New languages, cross-ecosystem patterns |
| Loop-Assist | unicorn-team:loop-assist | haiku | Iteration gate: certify GO/NO-GO readiness in long-running loops |
There is no dedicated "scout" agent — for cheap recon, invoke any agent (or the
built-in Explore) with model: haiku.
Match the request to ONE pipeline. Each line shows the agent sequence and the
tier for each step. Full ACTION/GATE detail: references/delegation-examples.md.
| Task | Pipeline | Steps (agent @ tier) |
|------|----------|----------------------|
| Simple question | DIRECT | answer, no agent |
| Estimation | ESTIMATE | run estimation skill |
| Bug fix | BUG-FIX | developer @ sonnet (failing test → root-cause fix) |
| Feature, <200 lines, single domain | SIMPLE-FEATURE | developer @ sonnet → GATE |
| Feature, complex/multi-domain | COMPLEX-FEATURE | architect @ opus → developer @ sonnet → qa @ sonnet (or /feature workflow) |
| Architecture / design decision | ARCHITECTURE | architect @ opus |
| Code / PR review | REVIEW | qa @ sonnet (or /review workflow for diff-wide + verify) |
| Deployment / infra | DEPLOY | devops @ sonnet |
| New language / tech | NEW-TECH | polyglot @ opus → developer @ sonnet (if building) |
| Codebase recon / understanding | RESEARCH | haiku recon fan-out → synthesis (or /research workflow) |
| 2+ independent sub-tasks | PARALLEL | decompose → agents in ONE message → GATE |
| Long-running / looped task | LONG-TASK | long-running skill lifecycle; iteration via /long-task workflow; gate: loop-assist @ haiku |
Recon first when it pays: before a COMPLEX-FEATURE or REVIEW on unfamiliar
code, spawn a cheap haiku recon pass (paths + summaries) to brief the
higher-tier agents — cheaper than making opus/sonnet read everything cold.
Write delegations as objectives with full context, not micro-steps. Over-
prescriptive step lists reduce quality on the higher tiers and waste input
tokens. Every Agent call includes:
Goal: [The outcome. What "done" looks like.]
Context: [File paths, prior artifact paths, design-doc paths. Pass PATHS, not
contents. Note which MCP servers are available if relevant.]
Constraints: [TDD required; coverage ≥ 80%; tech/compat/security requirements;
the model tier you chose and why if it matters.]
Definition of done: [Concrete deliverables — files, test results, coverage,
approval/rejection, paths to artifacts.]
Per-tier prompting policy: T0/T1 (fable/opus) — goal-based, give the full spec and let them reason; do NOT over-prescribe. T2/T3 (sonnet/haiku) — add structure (checklists, explicit steps) for reliability on bounded work.
TDD line (mandatory for Developer): "Write the failing test FIRST. Do not write implementation until the test exists and fails." Missing test evidence = automatic GATE failure.
After each agent returns:
1. Read the result. Check each gate condition for the pipeline step.
2. All pass → proceed to the next ACTION.
3. Any fail → re-delegate the SAME agent with the original task PLUS specific
feedback: "Gate failed: [condition]. Fix: [what to do]." Consider raising
effort (Step 1, rule 1) before raising tier.
4. Fails 3× on the same condition → STOP, report to the user, ask for direction.
Default Developer gates: tests pass · coverage ≥ 80% · self-review done · no TODO/FIXME/HACK. Default QA gate: approved (or re-delegate with findings).
After the final GATE passes, return to the user:
## Summary
[1–2 sentences: what was done and the outcome]
## How it ran
[Surface (direct/agent/workflow), pipeline, agents called and at which tier]
## Changes
- `path/to/file`: [what changed]
## Tests
- X tests · coverage XX% · all passing: yes/no
## Quality gates
- [x] Tests pass - [x] Coverage ≥ 80% - [x] Self-review - [x] No markers - [x] QA passed (if applicable)
## Notes
[Decisions, tradeoffs, model-tier/escalation calls, follow-ups]
Bundled templates in skills/orchestrator/workflows/ (run inline via the
Workflow tool, or install with scripts/install-workflows.sh to get
/review, /feature, /research commands):
| Template | What it does |
|----------|--------------|
| review.js | Diff-wide review across correctness/security/design, then adversarial verification of each finding |
| feature.js | Design (opus) → parallel TDD build (sonnet) → QA review |
| research.js | Parallel haiku recon over sub-topics → synthesis → completeness critique |
| long-task.js | One enforced iteration of a long-running task: orient -> TDD milestone -> review -> GO/NO-GO gate |
For deep, web-sourced, fact-checked reports, prefer the built-in
/deep-research. When to choose a workflow over Agent calls, and how to author
one: references/workflow-examples.md.
| DON'T | DO |
|-------|-----|
| Describe a pipeline without executing it | Execute each ACTION, WAIT, GATE, then next |
| Run everything on the main/top tier | Tier each delegation; cheapest model that works |
| Default to fable because it's strongest | Gate fable behind "opus failed at max effort" |
| Start cheap then escalate with no verifier | Escalate only behind tests/lint; else start at the right tier |
| Spray one pipeline across 3 models | Batch same-tier work to share a warm cache |
| Hardcode MCP tool names | Discover mcp__* at runtime; degrade if absent |
| Pass full file contents to agents | Pass paths; agents read what they need |
| Spawn many agents by hand and reconcile | Use a Workflow for fan-out + verification |
| Micro-prescribe prompts for opus/fable | Goal-based for high tiers; structured for cheap tiers |
| Implement code yourself | Delegate to the Developer agent |
development
Orchestrates long-running, multi-iteration tasks with Fable-5-style checkpointing, resume packs, self-paced scheduling, and per-iteration enforcement gates. ALWAYS trigger on "long running task", "keep working", "work overnight", "autonomous loop", "checkpoint", "resume where we left off", "iterate until done", "multi-session task", "self-pacing", "background build". Use when a task spans multiple iterations, sessions, or context windows. Different from orchestrator which routes a single pass -- this skill manages state, pacing, and enforcement across iterations.
development
Guides the user through test-first development and test strategy decisions. ALWAYS trigger on "write tests", "TDD", "test coverage", "mock", "test fails", "flaky test", "how to test", "unit test", "integration test", "e2e test", "test structure", "what to test", "test organization", "coverage report", "testing strategy", "arrange act assert". Use when writing new tests, choosing test types, setting up mocking, debugging flaky tests, improving coverage, or designing testable code. Different from qa-security agent which focuses on code review and security audits rather than test authoring.
development
Guides deliberate management of technical debt: recognition, tracking, prioritization, and paydown. ALWAYS trigger on "technical debt", "code shortcut", "pay down debt", "debt tracking", "just for now", "temporary hack", "hardcoded value", "copy-paste code", "missing tests", "TODO cleanup", "refactor plan", "debt priority", "interest cost", "boy scout rule", "code quality backlog". Use when taking a shortcut, discovering suboptimal code, planning debt paydown, or quantifying ongoing cost of compromises.
development
Guides the user through systematic pre-commit quality verification. ALWAYS trigger on "review my code", "check my work", "before commit", "self-review", "quality check", "am I ready to commit", "pre-commit review", "code quality", "verify my changes", "sanity check", "review before merge", "is this ready". Use before any commit, merge, or code review submission.