model-router
Skill0 starsChanged 4 months agoMITView on GitHub
Route AI development tasks to the optimal model and reasoning effort by difficulty. Use when starting any coding/implementation/debugging task to decide which model tier should execute it, when the user asks to optimize model usage or cost, or mentions model routing, モデル振り分け, 難易度判定, or コスト最適化. Works on Claude Code, Codex, and other Agent Skills-compatible platforms.
- Reads credentials
4 other projects use a version of this.
Adopted by
Most recently taken up by
- nidhi-singh02/agent-routertheir own version, first seen Sep 17, 2026
- francoisdp/skillstheir own version, first seen Sep 11, 2026
- willianbs/skillstheir own version, first seen Jul 18, 2026
- RandomNest/aivideo-production-skillstheir own version, first seen Feb 20, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- nidhi-singh02/agent-router★ 103same name
- RandomNest/aivideo-production-skills★ 15same name
- francoisdp/skills★ 2same name
- willianbs/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Don't spend time on classification.
- Very specific: line 43
If OPENROUTER_API_KEY is not set, the script runs as a dry-run (prints the request without sending).
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Model Router
Classify each task by difficulty and delegate it to the optimal model + reasoning effort, balancing cost and quality.
Procedure
- Classify — Assign the task a tier (T0–T3) using the rubric below. Classify multi-task requests item by item. When unsure, round up one tier.
- Pick the delegation target — Look up the current platform's target in references/routing.md. Platform-specific delegation mechanics are in references/platforms.md.
- Delegate — Write a self-contained prompt: background, target file paths, and completion criteria.
- Verify — Always check the result. If the delegate returned
ESCALATE:or verification failed, escalate one tier and retry exactly once. If it fails again, take the task over yourself (main loop). - Report — End with one line telling the user which tier/model executed the task.
Difficulty rubric
| Tier | Criteria | Examples |
| T0 Lite | Single file, mechanical, one correct answer | Typo fixes, renames, import cleanup, boilerplate, file lookups/summaries, formatting |
| T1 Standard | Clear scope, a few files, follows existing patterns | Reproducible bug fixes, small features, adding tests, in-module refactors, docs updates |
| T2 Deep | Cross-cutting, unknown cause, involves design decisions | Multi-module changes, hard debugging, performance work, concurrency, migrations |
| T3 Frontier | Ambiguous, high-risk, architecture-level | Tech selection, architecture design, clarifying vague requirements, large refactor planning |
Hard rules (override the rubric)
- Tasks touching security, auth, billing, or data deletion are at least T2.
- An explicit model/target choice from the user always wins (this skill's classification is the default behavior).
- Don't spend time on classification. If you can't decide instantly, go one tier up.
- Delegation prompts for T0/T1 must include: "If this turns out harder than expected, stop and reply only with
ESCALATE: <reason>."
Cross-model consultation (optional, T2/T3)
For design decisions or reviews where a second opinion from a third-party model (Kimi / Qwen / DeepSeek, etc.) helps, consult via OpenRouter:
echo "<question or code to review>" | node scripts/consult.mjs --model moonshotai/kimi-k2.7-code
node scripts/consult.mjs --models qwen # search available model IDs (no API key needed)If OPENROUTER_API_KEY is not set, the script runs as a dry-run (prints the request without sending). Treat consultation results as input, not verdicts — make the final call yourself.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

