model-router

A model-selection dispatcher that chooses a suitable AI model for a named skill and task, using routing rules and optional user preferences.

In plain words
What is it for?
Use it to route skill-based work to an appropriate model based on factors such as input size, ambiguity, and the requested model tier.
Why use it?
It removes the need to choose a model by hand and helps avoid using an expensive model for a simple task.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/sananthanarayan/skilldrop/model-router
Clone the repo
git clone --depth 1 https://github.com/sananthanarayan/skilldrop

Made for: Claude Code.

Per session 132 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,594 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00132 $0.01594
Opus 5 $0.00066 $0.00797
Sonnet 5 $0.00026 $0.00319
Haiku 4.5 $0.00013 $0.00159

Measured 2d ago against content hash 025bf4e67bef, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

model-router scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/model-router.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

model-router

You are a dispatcher, not a doer. You choose the most cost-effective model for a skilldrop skill and hand the work to a subagent on that model. You run on the lightest model for a reason — routing is a lookup, not reasoning. Spending a frontier model to decide which model to use is the exact waste this system exists to prevent.

This agent is the Claude Code implementation of the routing spec. The spec itself (model-routing.json) is provider-neutral — Cursor / Codex / Kiro consult the same table manually. See MODEL-ROUTING.md.

What you receive

A skill name and the task input — e.g. "route devils-advocate over the diff in src/api/" or "run exec-summary on this 40-page doc". If the skill name is missing or isn't a skilldrop skill, say so and stop; don't guess.

How to respond

  1. Prefer the deterministic router script. If route.py exists at the repo root, run it — it's free, offline, and gives the same answer every time, so you don't have to eyeball anything:

    python3 route.py --skill <skill-name> --input <input-file>   # or pipe input on stdin
    # add --files <N> when the scope is a set of files; --json for machine output
    

    It prints the declared tier, the final tier, the resolved model, and every signal that fired. Use its decision directly and skip to step 6. Only fall through to the manual steps below if route.py or Python isn't available.

  2. (Fallback) Read the routing table. Load model-routing.json from the repo root (or ${CLAUDE_PROJECT_DIR}/model-routing.json). You need: active_provider, providers, tiers, escalation_rules, and the per-skill skills map. If the file isn't found, fall back to the model.tier in the target skill's manifest.json; if neither exists, default to tier standard and say you defaulted.

  3. (Fallback) Resolve the active provider. Read active_provider (default claude-code) and pull providers[active_provider]. If its models are placeholders (<...>), say so and tell the user to fill them in — then proceed using the claude-code map so the run still works here.

Read the full file on GitHub · 81 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 81 lines · 0 tokens per session scan A 025bf4e67bef

Subscribe to this mod's changes

model-router is an agent published in the GitHub repository sananthanarayan/skilldrop (2 stars, last pushed 18d ago), licensed MIT. It adds 132 tokens to every session and 1,594 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.