model-routing-patterns

model-routing-patterns is a skill for Claude Code from softspark/ai-toolkit. It costs 40 tokens per session (2,217 once invoked), scanned A, original, Apache-2.0.

A guide to routing work between AI models with different costs and reasoning abilities.

In plain words
What is it for?
Use it to design model selection rules, escalation paths, fallback chains, and multi-model agent workflows.
Why use it?
It helps avoid using an expensive model for simple tasks while reserving stronger models for difficult or high-stakes work.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code; mentions Codex.

Part of the ai-toolkit plugin — 115 skills, 44 agents, 14 hooks shipped together

Good fit Use it to design model selection rules, escalation paths, fallback chains, and multi-model agent workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/softspark/ai-toolkit/model-routing-patterns
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 softspark/ai-toolkit --skill model-routing-patterns
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 115 skills, 44 agents, 14 hooks.

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-routing-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/softspark/ai-toolkit/model-routing-patterns/github.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/model-routing-patterns)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/model-routing-patterns"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/model-routing-patterns/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-routing-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/model-routing-patterns"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/model-routing-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,217 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00040 $0.02217
Opus 5.5 $0.00016 $0.00887
Sonnet 5.5 $0.00008 $0.00443
Haiku 4.5 $0.00004 $0.00222

Measured 15d ago against content hash a0275d8c1d93, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

model-routing-patterns 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 15d 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.

app/skills/model-routing-patterns/SKILL.md · 190 lines

How it starts

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

Model Routing Patterns

Choose routes from measured quality, latency and cost under the user's approved model and spending policy. An explicit model choice overrides automatic routing. This skill never authorizes a model-tier, permission or budget change.

Apply the same policy across Codex, Copilot and Claude: retain the model selected by the native client. Provider API IDs, editor picker labels and agent aliases are separate namespaces; do not translate between them by resemblance. For a cross-provider application route, validate capabilities and availability on each provider, and obtain authorization before transferring data or changing spend. The project inventory is kb/reference/model-compatibility.md.

Claude Code: available executors and supervised routing

Apply this section only in Claude Code. Other clients use their native agents and keep their configured models and reasoning effort. Never call the Claude Codex plugin from Codex, Antigravity or another client.

Check availability before choosing an executor. The Codex route requires all three: the codex@openai-codex plugin is installed, effectively enabled for the current project, and codex:codex-rescue is callable through the current Agent tool. The toolkit SessionStart hint checks local metadata only; it does not prove runtime availability, authentication, model access or security access. An existing cache directory alone is insufficient. If the hint is absent, verify those conditions from the client's plugin status and agent catalog.

When unavailable or disabled, use installed native agents with their configured models and effort. Do not install or enable a plugin, force a Codex command, or change the current session's model to satisfy this policy. If delegation itself is unavailable, do the authorized work in the current session and report that limitation. Explicit user model choices always take precedence.

The toolkit's Claude defaults use these roles when available:

Read the full file on GitHub · 190 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. 15d ago Changed · +7 lines a0275d8c1d93
  2. 21d ago Changed · +70 lines 1ea5256a152f
  3. 1mo ago Changed · -29 lines · -6 tokens per session 6d3f6f35ba1a
  4. 1mo ago First seen · 142 lines · 46 tokens per session scan A e76942e940dc

Subscribe to this mod's changes

model-routing-patterns is a skill published in the GitHub repository softspark/ai-toolkit (180 stars, last pushed 9d ago), licensed Apache-2.0. It adds 40 tokens to every session and 2,217 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

Other skills, from other repositories

continue-gemini-explicit

Continue's Gemini provider doesn't use the cachedContents API at all. Add explicit caching for sessions over the minimum token threshold.

OnlyTerp/prompt-cache-skills · 31 tokens

roo-fix-volatile-msg

Ladder-aware Roo Code Anthropic caching — verify the rolling read/write ladder on the wire, then close the real gaps (Vertex 4-block budget, MiniMax path).

OnlyTerp/prompt-cache-skills · 42 tokens

roo-bedrock-custom-arn

Roo Code's Bedrock provider silently disables caching for custom ARNs. Populate cachableFields to fix.

OnlyTerp/prompt-cache-skills · 29 tokens

model-strategy

Rollenbasierte Multi-Modell-Strategie. Modellkatalog liegt in einer lokalen Konfigurationsdatei statt im Skill-Text -- Rollen (Denker/Entscheider, Dauer-Worker, Entwurfsgenerator, Reviewer/Abnahme, Eskalation), Reasoning-Effort als eigene Achse, Abnahmepflicht für Entwurfsmodelle, Anbieterwechsel für unabhängige…

ellmos-ai/skills · 107 tokens

creator-prompt-engineer

Convert creative-department outputs (script, vision, cinematography, characters, sets, storyboards, shots) into producible, consistent AI image/video prompts — with tool-specific optimization, locked anchors, negative prompts, and safe alternatives. Default image tool priority for storyboard/character sheets is GPT…

ilkaydemiralay/vision_art_creator · 135 tokens

ai-portable-setup

Erstellt einen portablen KI-Arbeitsbereich auf einem USB-Stick oder beliebigen Laufwerk. RAG-Pipeline mit lokalen LLM-Modellen (Ollama), Vektordatenbank (ChromaDB) und vorkonfigurierten Prompts.

ellmos-ai/skills · 62 tokens