model-router
Classify sub-task complexity (cheap / medium / main) and decide whether to spawn a sub-agent at all. On MiniMax Code 0.2.4 the `task` tool does not expose…
от MiniMax-AI★ 30 звёзд на GitHub
Установить model-router в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Model Router
The main model is expensive and slow. Most sub-tasks a long agent spawns are not "main-model expensive" — they are lookups, transforms, summaries, or pattern matches. The Codex harness routes those to cheaper models and reserves the main model for synthesis and hard reasoning.
On mcode 0.2.4 specifically, the task tool does not expose a per-call model
parameter. The 3-tier rubric below is therefore a thinking framework for session-level
model choice and a sub-agent gate, not a per-task() argument. The Skills keep the
classification because the cost-of-thought question is the same; they just do not pretend
mcode 0.2.4 routes per call.
The hard fact about mcode 0.2.4
The canonical mcode 0.2.4 task schema:
task(
description: string, // required
prompt: string, // required
agent_name: "explore" | "worker" | "verifier", // required
run_in_background?: boolean // optional
)
No model_config_id, no model, no reasoning_effort, no per-call tier. Model
selection on mcode 0.2.4 is session-level (chosen at session start via the host's
model flag / interactive picker — the same model is used for the whole session,
including every task call). Trying to pass model_config_id="..." is rejected
by the strict validator in cli.js:B6c (the only allowed keys are the four above).
The v0.3.3 wording "MiniMax Code's task tool accepts model_config_id directly"
was wrong. The cost-of-thought question (cheap / medium / main) is still worth
asking; just not as a per-task() argument.
When to use
Activate when any of these is true:
- You are about to spawn a sub-agent and the work is non-trivial.
- You are about to spend the main model on a work step that has clearly bounded complexity (a lookup, a transform, a reformat, a coverage report).
- A sub-task failed and you are about to retry; consider whether the brief was bad, not whether a stronger model would help (mcode cannot route per call).
- A batch of N similar sub-tasks is about to run; classify them once and decide whether to spawn at all (the sub-agent gate).
When NOT to use
- The sub-task is the main task (no delegation happening). You are already on the right model.
- The sub-task requires the same context the main thread has, and you cannot
pass a minimal-context brief (see
fork-context-decision). A sub-agent with no context will fail — do it yourself. - The user explicitly said "use the main model for this" or "don't downgrade the model" (no-op on mcode 0.2.4 anyway, but respects the user's framing).
Process
Classify the sub-task into one of three tiers, before deciding whether to spawn a sub-agent at all:
Tier When to use Examples cheapBounded, single-shot, the brief fully specifies success. No synthesis, no judgement. reformat a file, list files matching a glob, count lines, parse a JSON, run a deterministic script, copy a file with substitutions mediumMulti-step but well-scoped, the brief is the only context needed. Some judgement, no synthesis of new ideas. summarise a long doc, refactor a single function, write tests for a known spec, review a single PR mainRequires synthesis, judgement across multiple sources, or stakes that make cheap-model mistakes costly. design an API, evaluate tradeoffs, debug a multi-file interaction, write code that needs to satisfy a spec the agent has to interpret If unsure, classify up —
mainis the safe default.Decide whether to spawn at all (the sub-agent gate, on mcode 0.2.4):
- If the work is
cheapAND the calling session can do it in 2 tool calls (oneread/grep/bash+ onewrite/ nothing), do not spawn. The cost of the spawn (the sub-agent's bootstrap, the brief round-trip) is higher than just doing the work. - If the work is
mediumormain, spawn with the appropriateagent_name(explore/worker/verifier). - The model that runs the sub-agent is the same as the calling session's model — there is no per-call tier routing on mcode 0.2.4.
- If the work is
State the tier and the spawn decision in the sub-task brief so a human reviewer can see why you spawned (or did not spawn):
## Sub-task brief ... **Tier**: cheap | medium | main **Spawn decision**: doing-it-myself | task(agent_name=...) **Reason**: <one sentence>If the sub-task returns a "I can't do this", do not silently retry on the same call. Re-classify: either the brief is wrong (rewrite it) or the work is harder than the tier suggested (re-classify up). On mcode 0.2.4 "going up a tier" means ending the session and restarting on a stronger model, not passing a different parameter — call this out to the user.
Record the actual spend if the harness surfaces per-call token counts. After a fan
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл model-router?
Classify sub-task complexity (cheap / medium / main) and decide whether to spawn a sub-agent at all. On MiniMax Code 0.2.4 the `task` tool does not expose per-call model selection, so the 3-tier rubric here is a thinking framework for session-level model choice and a "do I really need a sub-agent?" gate, not a per-call `model_config_id` field. USE WHEN: about to spawn a sub-agent for non-trivial work, about to spend the main model on something a cheap model could do, "do this with the cheap model" / "用便宜模型" / "不要用主模型" / "sub-task 不重" / "small task" / "小任务". TRIGGER PHRASES: "用便宜模型", "cheap model", "use the cheap model", "小任务用便宜模型", "不要用主模型", "用本地模型", "sub-task 不重", "小任务", "this is just a", "小 case 用便宜". SKIP WHEN: sub-task IS the main task, mcode 0.2.4's `task` tool does not expose a per-call model field, sub-task is genuinely synthesis / design / cross-file reasoning.
Как установить скилл model-router?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл model-router запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…