From smart-dispatch
Automatically routes tasks to the optimal AI agent, model, or provider based on complexity, cost, and capability. Use when implementing features, fixing bugs, or any multi-step development work. Triggers on "implement", "build", "create", "fix", "add feature", "develop", or when the user asks to do any coding task.
How this skill is triggered — by the user, by Claude, or both
Slash command
/smart-dispatch:smart-dispatchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
If an `EXEC-MAP v1` block from `senior-prompt-engineer` is in context, **consume it instead of re-deriving complexity:**
If an EXEC-MAP v1 block from senior-prompt-engineer is in context, consume it instead of re-deriving complexity:
EXEC-MAP.effort seeds the tier (trivial/low → Tier 0; medium/high → Tier 1).EXEC-MAP.models is the per-phase routing intent (plan→Opus/quality, impl→Sonnet/balanced, mechanical→Haiku/budget); honor it unless validation proves it wrong.EXEC-MAP.executor picks the provider/CLI; map model tiers to that CLI's tiers.EXEC-MAP.mcp lists tools to wire up.
Treat the map as a starting routing decision, not gospel — escalation rules (Tier 1) still override it when validation keeps failing. With no EXEC-MAP, derive routing from the request as usual.Before dispatching to an AI agent for Tier 0 tasks, attempt to solve it using local CLI tools.
npm run lint --fix or eslint --fix.prettier --write.tsc and check if errors are trivial.If local tools fail or aren't enough, use Gemini-Flash YOLO via RTK.
rtk gemini --yolo.Any agent dispatched in YOLO/Bypass mode MUST execute the relevant validation command before completion.
tsc --noEmit.npm run lint.npm run test <file>.Always pick the cheapest tier that passes validation; escalate per 1.1. Tiers map per provider:
| Tier | Claude | Codex subagent | Gemini |
|---|---|---|---|
| budget | Haiku 4.5 | Luna (low/medium effort) | Flash |
| balanced | Sonnet 4.6 | Terra (medium/high effort) | Pro |
| quality | Opus 4.8 / Fable 5 | Sol (high/xhigh effort) | Pro (max thinking) |
Use the newest available OpenAI Codex aliases in this order: Luna for bounded mechanical work, Terra for implementation and integration, and Sol for architecture, adversarial review, or repeated validation failures. These are dispatch-only names; never add them to an application's LLM provider catalog.
| Task type | Tier | Notes |
|---|---|---|
| Docs, comments, changelogs, summaries, translations | budget | Haiku-class is enough; never burn Opus here |
| Test writing — mechanical / known pattern | budget | Verify with test run (0.3 mandate) |
| Lint / typecheck / format fixes | local CLI → budget | Tier 0 rules apply first |
| Implementation, refactor, multi-step agentic | balanced | Sonnet-class default for code |
| Test design — integration/e2e strategy | balanced | Strategy needs reasoning; writing the cases can drop to budget |
| Plan, architecture, root-cause, security audit, migration | quality | Opus-class; deep reasoning pays for itself |
EXEC-MAP's models: {plan, impl, mechanical} maps 1:1 to quality/balanced/budget rows above.
If a Tier 0 agent fails to resolve the issue (validation still fails) after 2 attempts, the dispatcher MUST:
| Domain | Best Platform | Reason |
|---|---|---|
| Multimodal / UI screenshots | Gemini Pro (latest) | Best image/screenshot interpretation. |
| Complex Logic / Math | Codex Sol | Highest-reasoning Codex subagent tier for algorithms and root cause. |
| Agentic Chains / Auth | Claude Sonnet 4.6+ | Best tool-use and multi-step autonomy. |
| Deep Plan / Architecture | Codex Sol or Claude Opus 4.8 / Fable 5 | Use Sol for codebase-grounded decisions; use Opus/Fable for cross-domain synthesis. |
| Open Source / Docs | OpenCode | Deep integration with community patterns. |
Guides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
npx claudepluginhub andersonlimahw/lemon-ai-hub --plugin smart-dispatch