agentleFS
ozturkogluozturkoglu/fable-skills/skills/model-routing/SKILL.md

model-routing

Skill0 starsChanged 4 months agoMITView on GitHub

Route work across model tiers (frontier / Opus / Sonnet / Haiku / external engines) and effort levels by task difficulty and cost. Trigger proactively at the start of any substantial task, when designing a workflow or spawning subagents, when the user asks which model to use ("which model", "route", "cost"), or whenever the scarcest/most capable tier is about to be spent on something a cheaper tier could execute.

30 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ecosystem-reference, fractal-delegation and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • naman10parikhSkill

    ecosystem-reference

    Quick-access directory of Claude Code ecosystem repos, skills, plugins, MCPs, and patterns. Use when improving the harness.

    Also in 5 projects that use this

  • naman10parikhSkill

    fractal-delegation

    Also in 5 projects that use this

  • KirchliveSkill

    skill-routing

    Decides which of the installed skills a task needs and loads them before the work starts. This skill should be used at the beginning of any multi-step task — build, fix, refactor, migrate, review, plan, release, research, write, design, video — and again at every phase change, after context compaction, and when work moves into a different part of the codebase. Use it for requests like "let's build X", "fix this bug", "refactor Y", "plan the migration", "review this", and also when the user asks which skill applies, why a skill did not fire, or asks to check what is available.

    Also in 5 projects that use this

  • sublimotionSkill

    agent-runtime

    Launch and manage detached agent runs on EKS via the agent-runner CLI. Use when the user says "launch an agent run", "agent runtime", "agent-runner", "run this spec on the cluster", "check run status", "agent run logs", or "stop a run". Do NOT use for writing the agent-runner code itself (edit the sibling ../agent-runner repo), Terraform of the foundation (use terraform-automation), or GPU serving deployments (use infra-deployer).

    Also in 5 projects that use this

  • GoZippySkill

    repo-scout

    Also in 5 projects that use this

  • BenjaminGSkill

    harness-review

    Turn one PR's review comments into harness fixes — classify each cause by the most solid place it can live (codebase, lint, rules, skill), then draft the fixes in a separate PR.

    Also in 5 projects that use this

  • +6 more from naman10parikh

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If unsure which tier a task needs, start one tier lower and escalate on a concrete failure — not on vibes.

    line 29
  2. Distinctive:

    When a task will recur or fan out, do NOT run it on the frontier tier.

    line 35
  3. Very specific:

    When spawning subagents (Agent tool model param, workflow agent() calls): the orchestrator keeps synthesis and final judgment.

    line 53
  4. Distinctive:

    Before sending ANY task to the scarcest tier, answer in one line: "Does this need frontier judgment, or just execution?" If execution → …

    line 75

“Common” is measured: kept by at least 6 in 10 of the 29 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Model Routing

Purpose: get frontier-quality results at workhorse cost, and stay functional when the scarcest/most capable tier is rate-limited, withdrawn, or quota-exhausted. Expensive tokens buy judgment; cheap tokens buy execution.

The ladder

TierUse forNever for
Haikubulk mechanical work: file shuffling, extraction, format conversion, mass scans with fixed criteriaanything needing synthesis or ambiguity resolution
SonnetDEFAULT workhorse: exploration, codebase scanning, standard coding, stats scripts, report drafting, running pre-designed workflowsfinal verdicts on strategy/architecture when a higher tier is available and the stakes are high
Opushard debugging, cross-domain synthesis, high-stakes review — the frontier tier for most day-to-day usebulk exploration (waste), tasks Sonnet handles cleanly
Frontier (scarcest tier — whatever your newest, most capable, quota-limited model currently is)one-shot judgment calls: architecture/strategy verdicts, meta-label arbitration, audits, and DESIGNING reusable artifacts (workflows, skills, prompts, routing rules)execution of anything already designed; exploration; scanning; repetitive runs
External engines (e.g. a different vendor's model, a local model)independent second opinions, web-grounded cross-checks, jobs where latency doesn't matteranything touching credentials or other irreversible external actions

If unsure which tier a task needs, start one tier lower and escalate on a concrete failure — not on vibes. Escalation ladder: Haiku → Sonnet → Opus → frontier → user.

Rule 1 — Design up, run down (the core rule)

When a task will recur or fan out, do NOT run it on the frontier tier. Instead:

  1. Have the strongest available model design the artifact ONCE: a dynamic workflow, a skill, a prompt template, a script.
  2. Save the artifact to disk (workflow file, ~/.claude/skills/, project scripts/).
  3. Execute it on Sonnet (or Haiku for mechanical stages) every time after.

A well-designed workflow produces near-identical results on Sonnet, Opus, or the frontier tier — the intelligence is in the design, so paying frontier prices for the execution is pure waste.

Failable check: after any frontier-tier design session, name the file path where the reusable artifact was saved. No saved artifact = the design work evaporates with the session and the spend was wasted.

Rule 2 — Subagent tier routing

When spawning subagents (Agent tool model param, workflow agent() calls): the orchestrator keeps synthesis and final judgment; workers route down-tier. Sonnet for stages needing real reasoning, Haiku for mechanical stages, the orchestrating model itself ONLY for what no cheaper tier can verifiably do.

Rule 3 — Effort dial

Effort is a per-task setting, not a set-and-forget one.

  • low / medium: routine edits, lookups, short scripts.
  • high / xhigh: hard problems — the marginal-value sweet spot.
  • max / ultracode: reserved for the very hardest problems (gnarly concurrency, deep architectural knots). CAUTION: these can overthink, overextend, and produce WORSE results on ordinary tasks. Do not leave them on across a whole session.

Watch the model work; when it returns, re-evaluate: too shallow → raise effort, churning/overbuilding → lower it. A frontier model on low effort often beats a mid model on max effort at similar cost — compare before defaulting up.

Rule 4 — Scarce-quota guard

Before sending ANY task to the scarcest tier, answer in one line: "Does this need frontier judgment, or just execution?" If execution → downshift and, if the task recurs, apply Rule 1. Batch pending frontier-level questions and spend the quota in consolidated sessions, not drip-fed one-offs.

Session bookkeeping

At the start of substantial work, state the routing in one line: route: <tier> @ <effort> — <one-clause reason>. This costs nothing and makes misroutes visible immediately.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.