Agent skill

LLM Router

by curiositech in curiositech/some_claude_skills

Selects the optimal LLM model and provider for each task based on complexity, cost budget, and capability requirements.

MITAuto-check passedAI & LLM Engineering

Install LLM Router

skills CLI
$ npx skills add curiositech/some_claude_skills --skill llm-router -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install curiositech/some_claude_skills llm-router --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/curiositech/some_claude_skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/llm-router .claude/skills/llm-router && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
llm-router
GitHub stars
244
Token cost
~1.7k tokens
SKILL.md length
576 words
Files
3
Skills in repo
95
Repo updated
First seen
Licence
MIT

At a glance

Selects the optimal LLM model and provider for each task based on complexity, cost budget, and capability requirements.

  • Deciding which model to call
  • SKILL.md covers When to Use, Routing Decision Tree, Tier Assignment Table and Three Routing Strategies, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Optimizing LLM costs

What it does

LLM Router is an agent skill from curiositech/some_claude_skills. Selects the optimal LLM model and provider for each task based on complexity, cost budget, and capability requirements. Routes cheap tasks to Haiku/GPT-4o-mini and complex tasks to Sonnet/Opus/o1. Use when deciding which model to call, optimizing LLM costs, or building multi-model agent systems. Activate on "which model", "model selection", "route to model", "LLM cost", "model routing", "cheap vs expensive model". NOT for prompt engineering (use prompt-engineer), model fine-tuning, or training custom models.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `.claude-plugin/plugin.json` and `CHANGELOG.md`).

It sits in AI & LLM Engineering, covering LLM cost and token optimization, Prompt engineering and Model routing and gateways. It works with OpenAI. The repository describes itself as: Claude skills that make my life easier. The licence is MIT.

When your agent uses it

  • Deciding which model to call
  • Optimizing LLM costs
  • Building multi-model agent systems

Example prompts

  • “which model”
  • “model selection”
  • “route to model”
  • “/llm-router”

Requirements

  • Pre-approved tools (allowed-tools): Read

What it can do on your machine

Read from SKILL.md and the folder at commit 6713fc7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are mermaid and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

LLM Router loads about 1.7k tokens when it runs. Until then it costs about 131 tokens; SKILL.md has 576 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~131
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from curiositech/some_claude_skills at commit 6713fc7, republished under its MIT licence (© curiositech). 576 words, ~1,654 tokens.

Download SKILL.mdSave it as .claude/skills/llm-router/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
llm-router
description
Selects the optimal LLM model and provider for each task based on complexity, cost budget, and capability requirements. Routes cheap tasks to Haiku/GPT-4o-mini and complex tasks to Sonnet/Opus/o1. Use when deciding which model to call, optimizing LLM costs, or building multi-model agent systems. Activate on "which model", "model selection", "route to model", "LLM cost", "model routing", "cheap vs expensive model". NOT for prompt engineering (use prompt-engineer), model fine-tuning, or training custom models.
allowed-tools
Read
argument-hint
[task-description] [budget: low|medium|high]
metadata.category
AI & Machine Learning
metadata.tags
llm, router, which-model, model-selection, route-to-model

LLM Router

Selects the optimal LLM model for each task. The single biggest cost lever in multi-agent systems — intelligent routing saves 45-85% while maintaining 95%+ of top-model quality.


When to Use

✅ Use for:

  • Deciding which model to call for a specific task
  • Assigning models to DAG nodes in agent workflows
  • Optimizing LLM API costs across a system
  • Building cascading try-cheap-first patterns

❌ NOT for:

  • Prompt engineering (use prompt-engineer)
  • Model fine-tuning or training
  • Comparing model architectures (academic research)

Routing Decision Tree

mermaid
flowchart TD
  A{Task type?} -->|Classify / validate / format / extract| T1["Tier 1: Haiku, GPT-4o-mini (~$0.001)"]
  A -->|Write / implement / review / synthesize| T2["Tier 2: Sonnet, GPT-4o (~$0.01)"]
  A -->|Reason / architect / judge / decompose| T3["Tier 3: Opus, o1 (~$0.10)"]
  
  T1 --> Q1{Quality sufficient?}
  Q1 -->|Yes| Done1[Use cheap model]
  Q1 -->|No| T2
  
  T2 --> Q2{Quality sufficient?}
  Q2 -->|Yes| Done2[Use balanced model]
  Q2 -->|No| T3

Tier Assignment Table

Task TypeTierModelsCost/CallWhy This Tier
Classify input type1Haiku, GPT-4o-mini~$0.001Deterministic categorization
Validate schema/format1Haiku, GPT-4o-mini~$0.001Mechanical checking
Format output / template1Haiku, GPT-4o-mini~$0.001Structured transformation
Extract structured data1Haiku, GPT-4o-mini~$0.001Pattern matching
Summarize text1-2Haiku → Sonnet~$0.001-0.01Short summaries: Haiku; nuanced: Sonnet
Write content/docs2Sonnet, GPT-4o~$0.01Creative quality matters
Implement code2Sonnet, GPT-4o~$0.01Correctness + style
Review code/diffs2Sonnet, GPT-4o~$0.01Needs judgment, not just pattern matching
Research synthesis2Sonnet, GPT-4o~$0.01Multi-source reasoning
Decompose ambiguous problem3Opus, o1~$0.10Requires deep understanding
Design architecture3Opus, o1~$0.10Complex system reasoning
Judge output quality3Opus, o1~$0.10Meta-reasoning about quality
Plan multi-step strategy3Opus, o1~$0.10Long-horizon planning

Three Routing Strategies

Strategy 1: Static Tier Assignment (Start Here)

Assign model by task type at DAG design time. No runtime logic. Gets 60-70% of possible savings.

yaml
nodes:
  - id: classify
    model: claude-haiku-4-5     # Tier 1: $0.001
  - id: implement
    model: claude-sonnet-4-5    # Tier 2: $0.01  
  - id: evaluate
    model: claude-opus-4-5      # Tier 3: $0.10
Strategy 2: Cascading (Try Cheap First)

Try the cheap model; if quality is below threshold, escalate. Adds ~1s latency but saves 50-80% on nodes where cheap succeeds.

1. Execute with Tier 1 model
2. Quick quality check (also Tier 1 — costs ~$0.001)
3. If quality ≥ threshold → done
4. If quality < threshold → re-execute with Tier 2

Best for nodes where you're genuinely unsure which tier is needed.

Strategy 3: Adaptive (Learn from History)

Record success/failure per task type per model. Over time, the router learns:

  • "Classification nodes always succeed on Haiku" → stay cheap
  • "Code review nodes fail on Haiku 40% of the time" → upgrade to Sonnet
  • "Architecture nodes succeed on Sonnet 90% of the time" → don't need Opus

Gets 75-85% savings after ~100 executions of training data.


Show full SKILL.md (240 more words)Show less

Provider Selection

Once model tier is chosen, select the provider:

Model ClassProvider OptionsSelection Criteria
Haiku-classAnthropic, AWS BedrockLatency, regional availability
Sonnet-classAnthropic, AWS Bedrock, GCP VertexCost, rate limits
Opus-classAnthropicOnly provider
GPT-4o-classOpenAI, Azure OpenAIRate limits, compliance
Open-sourceOllama (local), Together.ai, FireworksCost ($0), latency, GPU availability

Cost Impact Example

10-node DAG, "refactor a codebase":

StrategyMixCostSavings
All Opus10× $0.10$1.00—
All Sonnet10× $0.01$0.1090%
Static tiers4× Haiku + 4× Sonnet + 2× Opus$0.2476%
Cascading6× Haiku + 3× Sonnet + 1× Opus$0.1486%
Adaptive (trained)Dynamic~$0.0892%

Anti-Patterns

Always Use the Best Model

Wrong: Route everything to Opus/o1 "for quality." Reality: 60%+ of typical DAG nodes are classification, validation, or formatting — tasks where Haiku performs identically to Opus. You're burning money.

Always Use the Cheapest Model

Wrong: Route everything to Haiku "for cost." Reality: Complex reasoning, architecture design, and quality judgment genuinely need stronger models. Haiku will produce plausible-looking but subtly wrong output on hard tasks.

Ignoring Latency

Wrong: Only optimizing for cost, ignoring that Opus takes 5-10x longer than Haiku. Reality: In a 10-node DAG, model choice affects total execution time as much as cost. Route time-critical paths to faster models.

No Feedback Loop

Wrong: Setting model tiers once and never adjusting. Reality: As models improve (Haiku gets smarter every generation), tasks that needed Sonnet last month may work on Haiku today. Record outcomes and adapt.

© curiositech, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in .claude/skills/llm-router of curiositech/some_claude_skills.

  • SKILL.md
  • .claude-plugin/plugin.json
  • CHANGELOG.md

Open the folder on GitHubat commit 6713fc7

Compare with similar skills

LLM Router next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

LLM Router compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
LLM Router this skillcuriositech/some_claude_skills244—~1.7kAutomated safety check: PassMIT
Olore Tensorzero Latestolorehq/olore104—~1.6kAutomated safety check: PassMIT
Agents Best PracticesDenisSergeevitch/agents-best-practices2.4k—~7.4kAutomated safety check: PassMIT
ClawRouter LLM GatewayBlockRunAI/ClawRouter6.6k—~6.8kAutomated safety check: PassMIT
LLM Gatewaysickn33/agentic-awesome-skills47k1 repos~2.1kAutomated safety check: PassMIT
Codex Fable5baskduf/FableCodex437—~1.6kAutomated safety check: PassAGPL-3.0

Similar skills

  • Local TensorZero documentation reference (latest). An agent skill from olorehq/olore.

    104 GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Agents Best Practices

    DenisSergeevitch/agents-best-practices

    A skill your agent uses when designing, generating an MVP blueprint for, auditing, troubleshooting, refactoring, or explaining an agentic harness for any domain.

    2.4k GitHub stars~7.4k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check passed
  • ClawRouter LLM Gateway

    BlockRunAI/ClawRouter

    Describes ClawRouter, a local proxy that forwards each LLM request to the blockrun.ai gateway, which routes to a cheaper capable model, paid by USDC wallet or API key credit.

    6.6k GitHub stars~6.8k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • LLM Gateway

    sickn33/agentic-awesome-skills

    Deploy an API gateway for LLM traffic with load balancing, rate limiting, key management, semantic caching, fallback routing, and cost tracking.

    47k GitHub starsUsed in 1 repo~2.1k tokens
    Backend & APIsAuto-check passed
  • Codex Fable5

    baskduf/FableCodex

    Apply a Claude Fable 5 inspired operating style inside Codex.

    437 GitHub stars~1.6k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • System Prompt Writing Guide

    cashew-labs/libretto

    Lays out a minimal, iteration-first approach to writing system prompts for LLM agents, with model-specific notes for Claude, GPT, Gemini, and Codex.

    904 GitHub stars~570 tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed

More from curiositech/some_claude_skills

All 95 skills in this repo
  • Crisis Detection Intervention AI

    curiositech/some_claude_skills

    Detect crisis signals in user content using NLP, mental health sentiment analysis, and safe intervention protocols.

    244 GitHub starsUsed in 2 repos~3.8k tokens
    Auto-check passed
  • Form Validation Architect

    curiositech/some_claude_skills

    End-to-end form handling with react-hook-form, Zod schemas, validation patterns, error messaging, field arrays, and multi-step wizards.

    244 GitHub stars~3.8k tokensUpdated 1 mo ago
    Auto-check passed
  • GitHub Actions Pipeline Builder

    curiositech/some_claude_skills

    Build production CI/CD pipelines with GitHub Actions. An agent skill from curiositech/some_claude_skills.

    244 GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check: notes
  • Background Job Orchestrator

    curiositech/some_claude_skills

    Expert in background job processing with Bull/BullMQ (Redis), Celery, and cloud queues.

    244 GitHub stars~3.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Competitive Cartographer

    curiositech/some_claude_skills

    Strategic analyst that maps competitive landscapes, identifies white space opportunities, and provides positioning recommendations.

    244 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Computer Vision Pipeline

    curiositech/some_claude_skills

    Build production computer vision pipelines for object detection, tracking, and video analysis.

    244 GitHub stars~4k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about LLM Router

What does LLM Router do?

Selects the optimal LLM model and provider for each task based on complexity, cost budget, and capability requirements. LLM Router is an agent skill from curiositech/some_claude_skills. Selects the optimal LLM model and provider for each task based on complexity, cost budget, and capability requirements.

When should I use LLM Router?

LLM Router fits situations like: deciding which model to call; optimizing LLM costs; building multi-model agent systems.

How do I install LLM Router in Claude Code?

Run `npx skills add curiositech/some_claude_skills --skill llm-router -a claude-code`. Or copy the skill folder (.claude/skills/llm-router in curiositech/some_claude_skills) into .claude/skills/llm-router in your project. Claude Code loads it when a task matches its description.

How do I install LLM Router in Codex?

Run `npx skills add curiositech/some_claude_skills --skill llm-router -a codex`. Or copy the skill folder (.claude/skills/llm-router in curiositech/some_claude_skills) into .agents/skills/llm-router in your project. Codex loads it when a task matches its description.

Can I use LLM Router in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add curiositech/some_claude_skills --skill llm-router -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/llm-router, .gemini/skills/llm-router, .github/skills/llm-router and .opencode/skills/llm-router in your project.

What does LLM Router need to run?

SKILL.md names no scripts, command-line tools or credentials: LLM Router is instructions for the agent only. Its frontmatter pre-approves these tools: Read.

Does LLM Router access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is LLM Router safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does LLM Router use?

LLM Router is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does LLM Router use?

About 1.7k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to LLM Router?

Skills that share tags, products or a category with LLM Router: Olore Tensorzero Latest (olorehq/olore, 104 stars), Agents Best Practices (DenisSergeevitch/agents-best-practices, 2.4k stars), ClawRouter LLM Gateway (BlockRunAI/ClawRouter, 6.6k stars) and LLM Gateway (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains LLM Router?

curiositech (a GitHub organization) maintains it in curiositech/some_claude_skills, which has 244 GitHub stars. The repository holds 95 skills in this directory. The repository was last updated on September 6, 2026.

Source: curiositech/some_claude_skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.