agentleFS
Renga154Renga154/model-router/SKILL.md

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

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. nidhi-singh02/agent-router★ 103same name
    2. RandomNest/aivideo-production-skills★ 15same name
    3. francoisdp/skills★ 2same name
    4. 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
  1. Distinctive:

    Don't spend time on classification.

    line 31
  2. Very specific:

    If OPENROUTER_API_KEY is not set, the script runs as a dry-run (prints the request without sending).

    line 43

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Model Router

Classify each task by difficulty and delegate it to the optimal model + reasoning effort, balancing cost and quality.

Procedure

  1. 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.
  2. Pick the delegation target — Look up the current platform's target in references/routing.md. Platform-specific delegation mechanics are in references/platforms.md.
  3. Delegate — Write a self-contained prompt: background, target file paths, and completion criteria.
  4. 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).
  5. Report — End with one line telling the user which tier/model executed the task.

Difficulty rubric

TierCriteriaExamples
T0 LiteSingle file, mechanical, one correct answerTypo fixes, renames, import cleanup, boilerplate, file lookups/summaries, formatting
T1 StandardClear scope, a few files, follows existing patternsReproducible bug fixes, small features, adding tests, in-module refactors, docs updates
T2 DeepCross-cutting, unknown cause, involves design decisionsMulti-module changes, hard debugging, performance work, concurrency, migrations
T3 FrontierAmbiguous, high-risk, architecture-levelTech 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.