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.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.svg" alt="Measured on agentmods" 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 $0.00024 $0.00280
Sonnet 5 $0.00010 $0.00112
Haiku 4.5 $0.00005 $0.00056

Measured 3d ago against content hash b07228380d9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 3d 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. 3d 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 2mo ago), licensed MIT. It adds 49 tokens to every session and 561 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

torchforge-rl-training

Provides guidance for PyTorch-native agentic RL using torchforge, Meta's library separating infra from algorithms. Use when you want clean RL abstractions, easy algorithm experimentation, or scalable training with Monarch and TorchTitan.

davila7/claude-code-templates · 49 tokens

rubber-duck

Adversarial "rubber duck" review that turns explaining-out-loud into a hallucination check. The main session is the PRESENTER (it did the work — a design doc, investigation, or analysis — and holds the real reasoning) and reconstructs the topic to a LISTENER — a spawned subagent pinned to a DIFFERENT-vendor model that…

kirodotdev/KiroCrew · 161 tokens

uctm-init

An initialization procedure for uc-taskmanager, a project task-management pipeline. It creates a works directory and, with permission, adds the file and command access the agent needs to local settings.

davepoon/buildwithclaude · 58 tokens

work-pipeline

Triggers the WORK-PIPELINE when a user request starts with a [] tag (e.g., [new-feature], [bugfix], [WORK start]). Use this skill whenever you detect a [] tag at the beginning of a user message.

davepoon/buildwithclaude · 52 tokens

feature-spec

Creates a complete product feature specification with acceptance criteria, scope, dependencies, and risks. Delegates to the Prometeo (PM) agent.

davepoon/buildwithclaude · 32 tokens

implement-feature

Implements a feature from its specification. Reads the spec, designs architecture, writes code and tests. Delegates to the Forja (Dev) agent.

davepoon/buildwithclaude · 34 tokens