model-router

model-router is a skill for Claude Code, Codex from JansenAnalytics/claudex. It costs 49 tokens per session (561 once invoked), scanned A, original, MIT.

A task-routing tool that chooses a Claude model tier—haiku, sonnet, or opus—based on the work required. It is intended to run before substantial work or before starting a sub-agent.

In plain words
What is it for?
Use it to classify tasks, choose a model before delegation, and optionally record model usage.
Why use it?
It helps match simple tasks with faster, lower-cost models while reserving more capable models for difficult work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to classify tasks, choose a model before delegation, and optionally record model usage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jansenanalytics/claudex/model-router
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.

Any agent
npx skills add JansenAnalytics/claudex --skill model-router
Clone the repo
git clone --depth 1 https://github.com/JansenAnalytics/claudex

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for model-router

README.md
[![agentmods](https://agentmods.dev/badge/skills/jansenanalytics/claudex/model-router/github.svg)](https://agentmods.dev/skills/jansenanalytics/claudex/model-router)
Your own site
<a href="https://agentmods.dev/skills/jansenanalytics/claudex/model-router"><img src="https://agentmods.dev/badge/skills/jansenanalytics/claudex/model-router/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for model-router

Your own site · 80×15
<a href="https://agentmods.dev/skills/jansenanalytics/claudex/model-router"><img src="https://agentmods.dev/badge/skills/jansenanalytics/claudex/model-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 561 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00049 $0.00561
Opus 5.5 $0.00020 $0.00224
Sonnet 5.5 $0.00010 $0.00112
Haiku 4.5 $0.00005 $0.00056

Measured 2mo ago against content hash b07228380d9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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.

skills/model-router/SKILL.md · 68 lines

What it actually says

Model Router Skill

Use EVERY TIME you are about to spawn a sub-agent or do significant work. Classify the task first, then use the right model tier.

Step 1: Classify

node ${MODEL_ROUTER_HOME:-$HOME/projects/model-router}/classify.cjs "your task description here"

Or get JSON for scripting:

node ${MODEL_ROUTER_HOME:-$HOME/projects/model-router}/classify.cjs --json "task description"
sessions_spawn(task=..., model="<model from classifier>")

Step 3: Log usage (optional but encouraged)

node ${MODEL_ROUTER_HOME:-$HOME/projects/model-router}/log-usage.cjs --task "..." --tier fast --model "..."

Tier guide

fast — anthropic/claude-haiku-4-5

Use for: summarize, format, extract, classify, convert, translate, clean data, rename, sort, filter Cost: ~1× baseline When in doubt about simple tasks, start here.

balanced — anthropic/claude-sonnet-4-6 (default)

Use for: explain, compare, draft, review, outline, moderate analysis, code with clear spec Cost: ~15× baseline

powerful — anthropic/claude-opus-4-5

Use for: deep analysis, architecture decisions, complex tradeoffs, research synthesis, debates, long-form strategy Cost: ~75× baseline Reserve for tasks where quality clearly matters more than speed/cost.

Classification signals

Fast triggers: summarize, format, extract, classify, categorize, convert, translate, list, count, clean, parse, fix typos, rename, sort, filter, deduplicate, "quick", "simple", "brief", "just"

Powerful triggers: "analyze deeply", architecture, tradeoffs, debate, hypothesis, synthesize, "design system", "evaluate options", comprehensive, thorough, research, strategy, critique, multiple complex questions

Usage stats

node ${MODEL_ROUTER_HOME:-$HOME/projects/model-router}/usage-report.cjs
node ${MODEL_ROUTER_HOME:-$HOME/projects/model-router}/usage-report.cjs --days 30
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 68 lines · 49 tokens per session scan A b07228380d9e

Subscribe to this mod's changes

model-router is a skill published in the GitHub repository JansenAnalytics/claudex (5 stars, last pushed 5mo ago), licensed MIT. It adds 49 tokens to every session and 561 once invoked, about $0.0002 per session on Opus 5.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-09-03.

Related

model-router compared with skills from other repositories

model-router next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
model-routerJansenAnalytics/claudexSkill55mo agoMITA49Claude Code, Codex
blinded-evalafaraha8403/balakitSkill110d agoMITA103Claude Code
rubber-duckkirodotdev/KiroCrewSkill5.2ktodayApache-2.0A161Claude Code, Codex
work-pipelinedavepoon/buildwithclaudeSkill3.8ktodayMITA52Claude Code
feature-specdavepoon/buildwithclaudeSkill3.8ktodayMITA32Claude Code
implement-featuredavepoon/buildwithclaudeSkill3.8ktodayMITA34Claude Code
review-findingsdavepoon/buildwithclaudeSkill3.8ktodayMITA43Claude Code