Creates and routes portable subagents by harness, provider, model, and effort, with optional calibrated typed-decision routing and safety floors.
Ships in smart-sub-agents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use this skill to turn a vague delegation request into a reproducible route:
harness: opencode
provider: deepseek
model: deepseek-v4-flash
effort: max
The source of truth is references/provider-matrix.json. It separates two concepts that are often incorrectly mixed:
claude-code, codex, opencode, antigravity, gemini-cli, or lemon-code).anthropic/claude-opus-5, openai/gpt-5.6, and so on).It also separates the optional decision scorer from the executor. A scorer may choose a route, but it never appears as a worker model because it does not generate the task result. Read references/decision-routing.md before enabling probability-based routing.
opencode when the requested provider is not native to the current harness.budget, balanced, quality, or research.provider, model, and effort overrides. Explicit values win over profile defaults.ROUTE-MAP v1 block and, when requested, render the harness-specific subagent configuration.Use the cheapest path whose overhead can pay for itself:
taskRouting table by default. It adds no network hop and remains the fail-open path.decisionRouting.safetyFloor as the final monotonic clamp. It may raise, but never lower, the effective route.Ask independent typed questions together: tier, effort, task risk, tool complexity, and whether parallel reasoning will amortize startup cost. Reuse the shared task state across those questions when the scorer supports prefix caching or parallel suffixes. Treat option probabilities as routing signals, not proof of correctness. Start in shadow, measure against validation outcomes, calibrate per workload, then move to advisory or enforce. Never copy the example confidence gate into production without local calibration.
Recommended profile defaults:
| Profile | Effort | Use for |
|---|---|---|
budget | low | Formatting, bounded checks, repetitive work |
balanced | medium | Normal implementation and integration |
quality | high | Architecture, security, difficult debugging |
research | max | Long-horizon research or adversarial synthesis |
max is a quality/cost choice, not a promise that every provider accepts a literal max request parameter. The renderer preserves the requested level and exposes the effective native mapping.
The following common inputs are normalized only when the catalog has an explicit alias:
| Input | Canonical route |
|---|---|
openai / gpt-5.6 lunce | openai / gpt-5.6-luna |
opencode / kimi k3 | moonshotai / kimi-k2 (Kimi K3 is not in the verified matrix) |
anthropic / Opus % | anthropic / claude-opus-5 |
deepseek api / deepseek v4 flash | deepseek / deepseek-v4-flash |
google / Gemini 3.5 Pro | google / gemini-2.5-pro or google / gemini-3.1-pro-preview |
These are corrections, not fuzzy guesses. If an alias is not listed, ask for the exact provider/model ID or run the catalog validator before routing.
Use the local renderer to generate artifacts without mutating global configuration:
python3 plugins/smart-sub-agents/scripts/validate_catalog.py
python3 plugins/smart-sub-agents/scripts/render_agents.py \
--harness opencode \
--provider deepseek \
--model deepseek-v4-flash \
--effort max \
--output-dir .smart-sub-agents/generated
To create one route for every supported harness using a profile:
python3 plugins/smart-sub-agents/scripts/render_agents.py \
--harness all --profile balanced --output-dir .smart-sub-agents/generated
The renderer is deliberately non-destructive. Inspect generated files before copying them to ~/.claude/agents/, ~/.codex/agents/, ~/.config/opencode/agents/, or another harness-specific location. API keys are never read or written by this skill.
Native behavior covered by the renderer:
model and effort; native provider is Anthropic.model and model_reasoning_effort; native provider is OpenAI.opencode.json agent entries using provider/model; it can route across the matrix, but effort options remain model/provider-specific.When this skill is combined with smart-dispatch, return exactly one route contract for the selected subagent:
ROUTE-MAP v1
harness: opencode
provider: deepseek
model: deepseek-v4-flash
effort: max
native_effort: thinking=true
provider_fallback: openrouter/auto
router: heuristic|typed-scorer
router_mode: heuristic|shadow|advisory|enforce
router_confidence: 0.00-1.00|unavailable
router_fallback: ask|static-catalog|balanced|none
reason: quality-first coding route with DeepSeek V4 Flash thinking mode
Do not add secrets, invent provider support, or fall back after an explicit cancellation. provider_fallback is only a declared route for a provider outage or unavailable model; router_fallback explains a decision-router failure or uncertainty. Both must be visible to the caller.
Install the full tier × effort worker grid into local harnesses:
python3 plugins/smart-sub-agents/scripts/validate_catalog.py
python3 plugins/smart-sub-agents/scripts/install_worker_matrix.py
python3 plugins/smart-sub-agents/scripts/install_worker_matrix.py --validate-only
Naming contract:
| Harness | Pattern | Example |
|---|---|---|
| Claude (canonical) | {haiku|sonnet|opus}_worker_{effort} | sonnet_worker_high |
| Codex | {luna|terra|sol}_worker_{effort} | luna_worker_max |
| OpenCode Zen | zen_{family}_worker_{effort} | zen_sol_worker_max |
| OpenCode Go | go_{family}_worker_{effort} | go_luna_worker_high |
| MiniMax Token Plan | mm_{fast|m3|flash}_worker_{effort} (OpenCode mode: all + lean tools; Claude/Agy bridges relay via mm-run) | mm_flash_worker_high |
| Agy | symlink → Claude workers + Codex-named aliases | opus_worker_high → ~/.claude/agents/... |
Claude bodies are canonical. Codex gets native TOML (model + model_reasoning_effort). OpenCode gets adapted markdown (mode/permission/model). Agy symlinks Claude.
# Dry report against live `opencode models`
python3 plugins/smart-sub-agents/scripts/sync_provider_matrix.py
# Persist discovered/stale flags + bump updated date
python3 plugins/smart-sub-agents/scripts/sync_provider_matrix.py --write
# Reinstall workers after promoting discovered models
python3 plugins/smart-sub-agents/scripts/install_worker_matrix.py
Discovered models stay status: discovered until a human promotes them into workerMatrix / profiles. Never auto-delete.
The matrix is a curated snapshot, not a live provider API. Check the linked official documentation before production rollout and update updated plus the affected source URL when a model is added, deprecated, renamed, or changes effort semantics. Run the validator and tests after every matrix change. Prefer sync_provider_matrix.py for OpenCode Zen/Go drift.
README.md (opens in a new tab)agents/smart-route.md (opens in a new tab)plugin.json (opens in a new tab)references/decision-routing.md (opens in a new tab)references/provider-matrix.json (opens in a new tab)references/provider-matrix.md (opens in a new tab)scripts/install_worker_matrix.py (opens in a new tab)scripts/render_agents.py (opens in a new tab)scripts/sync_provider_matrix.py (opens in a new tab)scripts/validate_catalog.py (opens in a new tab)tests/test_catalog.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/smart-sub-agents:smart-sub-agentsfrom smart-sub-agents
npx claudepluginhub andersonlimahw/lemon-ai-hub --plugin smart-sub-agentsOther plugins' skills for the same job