agentleFS
crissmoldovancrissmoldovan/agent-skills/skills/model-routing/SKILL.md

model-routing

Skill2 starsChanged 47 days agoMITView on GitHub

Decide which model owns which task and when to escalate: give the cheap tier the legwork, keep planning and final review with the expensive one, and protect the driver's context. Symptoms: do this cheaply, which model should do this, delegate the legwork, we're burning tokens, this is too big for one context, set up / switch / inspect / clear a routing profile.

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

12 rules. 0 are common, 12 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Don't delegate a task whose context-packaging and reconciliation overhead exceeds the likely savings.

    line 29
  2. Distinctive:

    Read the routing policy before planning a routed run.

    line 34
  3. Distinctive:

    Prefer deterministic local tools before any model for exact transformations, formatting, extraction, filtering, counting, and validation.

    line 46
  4. Distinctive:

    Read profile controls and the reference for the active harness.

    line 53
  5. Distinctive:

    Choose the lowest viable route: Use deterministic tools first.

    line 62
  6. Distinctive:

    Decompose only when savings exceed overhead: Prefer one coherent owner.

    line 73
  7. Distinctive:

    Complete when: no fan-out duplicates source reading, output, or ownership.

    line 75
  8. Distinctive:

    Escalate on evidence: Stop at ambiguity, failed acceptance, quality risk, or ownership conflict.

    line 76
  9. Distinctive:

    Verify economically: Run deterministic/focused checks first and broader checks at risk or phase boundaries.

    line 80
  10. Distinctive:

    Never send complete conversations, repositories, plans, or raw logs to every child.

    line 139
  11. Distinctive:

    Never blindly retry the same prompt.

    line 141
  12. Distinctive:

    Never claim separate role models when the harness can run only one child model.

    line 144

“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

Token-efficient, quality-preserving model routing

Complete work with the fewest model tokens and least DRIVER-context growth that still meets the acceptance criteria. Route each task to the least expensive configured model that can own it completely, and escalate only when evidence shows that route cannot meet quality. Profiles and exact identifiers preserve approved bindings; they are mechanisms, not the product goal.

Fable/Opus/Haiku and Sol/Terra/Luna are illustrative names, not defaults or tiers. Never infer a model from one of those examples, a provider, a nickname, or a harness default.

When to Use

  • Work can be decomposed so expensive-model reasoning is reserved for judgment, synthesis, and acceptance.
  • Delegated research, implementation, review, or mechanical processing would otherwise inflate DRIVER context or use a stronger model than necessary.
  • A user asks to set up, inspect, change, switch, clear, reset, delete, or use a routing profile.

Don't delegate a task whose context-packaging and reconciliation overhead exceeds the likely savings. Do not optimize token count by weakening acceptance or verification. Do not use a sweeper for interpretation, quality judgment, or taste.

Read the routing policy before planning a routed run. Its local-tool-first, decomposition, context-bound, escalation, retry, and verification rules are normative.

Roles

RoleAssignment ruleOwns
DRIVERStrongest approved model; use only where marginal reasoning quality matters.Ambiguity, scope, trade-offs, architecture, orchestration, synthesis, acceptance, and user communication.
BUILDERLeast-cost approved model that can meet bounded substantive acceptance criteria.Implementation, research, tests, debugging, and implementation-level review.
SWEEPERLeast-cost approved model for mechanically verifiable language work.Only bounded zero-judgment transforms when deterministic local tools are insufficient.

Prefer deterministic local tools before any model for exact transformations, formatting, extraction, filtering, counting, and validation. A task moves upward only when evidence shows the lower route cannot meet acceptance: local tool → SWEEPER → BUILDER → DRIVER.

Prerequisites

  1. Read profile controls and the reference for the active harness. Complete when: the profile command, persistence location, and supported role bindings are known for that harness.
  2. Inventory models the harness can address now. Record each identifier literally. Complete when: every proposed binding names an identifier that the harness reports, not a guessed vendor label.
  3. Before child delegation, check for and load the agent-lifecycle skill. If it is unavailable, offer to install it and wait for user approval before installation. Do not substitute a todo list for lifecycle evidence. Complete when: lifecycle authority and its visible surface are known, or the user has declined installation and the resulting visibility limitation is explicit.

Procedure

  1. Set the acceptance standard. State the required output, decisive checks, and judgment/blast radius. Complete when: cost cannot be reduced by silently reducing required quality.
  2. Choose the lowest viable route. Use deterministic tools first; otherwise classify SWEEPER, BUILDER, or DRIVER by judgment required. Complete when: each task has one owner and a reason the cheaper route is insufficient.
  3. Resolve bindings only as needed. Reuse and validate a matching scoped profile. Enter profile setup/control mode only when requested or when a needed binding is absent/invalid. Complete when: no setup ceremony is repeated for an already valid profile.
  4. Package minimum context. Give children source paths, immutable decisions, ownership, acceptance checks, stop conditions, and a bounded result contract; never paste whole conversations/logs/plans. Complete when: the child can work from source without receiving unrelated context.
  5. Decompose only when savings exceed overhead. Prefer one coherent owner. Parallelize only independent, disjoint work with non-overlapping questions. Complete when: no fan-out duplicates source reading, output, or ownership.
  6. Escalate on evidence. Stop at ambiguity, failed acceptance, quality risk, or ownership conflict. Retry once only for a transient execution failure; otherwise pass the failure delta/artifacts to a stronger route. Complete when: no blind retry repeats full discovery/context.
  7. Verify economically. Run deterministic/focused checks first and broader checks at risk or phase boundaries; DRIVER independently accepts the result. Complete when: accepted output has fresh evidence and concise reporting.
  8. Expose lifecycle truth. Load agent-lifecycle for child delegation and prefer native child UI; use its display-only fallback only when needed. Complete when: visible state comes from lifecycle evidence, not task guesses.

Usage Examples

Show the active route

Show routing. Compare the scoped profile with live bindings and report MATCH,
MISMATCH, UNBOUND, NOT_ADDRESSABLE, or UNAVAILABLE for each role. Do not write.

Set up a reusable profile

Set up routing as "balanced". Ask me for exact DRIVER and BUILDER models, and a
SWEEPER model or explicit degraded mode. Validate the live inventory, preview
the changes, and wait for confirmation before applying and saving them.

Route a task efficiently

Use the active routing profile. Define acceptance first. Use deterministic local tools
for exact work, BUILDER for bounded implementation with objective checks,
and DRIVER only for ambiguity, trade-offs, synthesis, and acceptance. Delegate
only when the savings exceed dispatch/context overhead. Keep child work visible
with agent-lifecycle and independently verify the result.

Escalate without repeating discovery

The current route failed verification. Do not rerun the same prompt. Pass the
failure delta, relevant artifacts, attempted checks, and remaining acceptance
criteria to the next capable route.

Harness References

HarnessReference
Hermes Agentreferences/harness-hermes.md
Generic Agent Skills harnessreferences/harness-generic.md
User command semantics and profile scriptsreferences/profile-controls.md
Token/quality routing policyreferences/routing-policy.md

Pitfalls

  • A configured harness default is not a user-selected routing profile.
  • A saved profile is not valid forever: model inventory can change, so validate at auto-load and before dispatch.
  • “Cheapest” applies only after the user has selected an exact sweeper model; it never authorizes an agent to pick an unapproved model.
  • Parallelism does not permit concurrent edits to shared files, manifests, or acceptance criteria.
  • Fan-out can spend more tokens than it saves; parallelize only independent work whose wall-time or context benefit exceeds dispatch/reconciliation overhead.
  • Never send complete conversations, repositories, plans, or raw logs to every child. Pass source references and bounded evidence.
  • Never blindly retry the same prompt. Preserve artifacts and escalate on the failure delta.
  • A native task display is not lifecycle authority; a todo fallback is weaker still.
  • Never claim separate role models when the harness can run only one child model.

Verification

  • Every bound role has a literal exact identifier from the live inventory.
  • The DRIVER is the strongest model explicitly selected by the user for important reasoning.
  • Builder work is substantive and independent work is parallel only when ownership is disjoint.
  • Sweeper work is mechanically specified and contains zero judgment.
  • Deterministic local tools were preferred where no model judgment was needed.
  • Child context/results are bounded and do not duplicate broad source material.
  • Escalations follow failed evidence/ambiguity; no blind retry repeated discovery.
  • Token reduction did not weaken acceptance criteria or fresh verification.
  • The active scoped profile auto-load behavior and revalidation outcome are shown.
  • agent-lifecycle was loaded before child delegation, or its absence and approved installation decision are recorded.
  • Native lifecycle UI is used when present; otherwise the todo fallback is labelled non-authoritative.
  • Any harness limitation is reported as a degradation, not presented as a successful binding.

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.