model-routing
Skill0 starsChanged 4 months agoMITView on GitHub
When to load — deciding which model or agent should handle a task (main thread vs. subagent vs. external cheap CLI agent), whether a delegation is worth its round-trip cost (break-even rule), or what to do when the primary model is unavailable (fallback chain). Load before delegating any read, write, or research task.
30 other projects use a version of this.
Adopted by
Most recently taken up by
- cveralyon/axel-setuptheir own version, first seen Nov 8, 2026
- naman10parikh/pennytheir own version, first seen Nov 8, 2026
- weedmo/skillstheir own version, first seen Nov 8, 2026
- naman10parikh/wikimemtheir own version, first seen Nov 8, 2026
- fal-ai-community/skillstheir own version, first seen Nov 7, 2026
- ArcReel/ArcReeltheir own version, first seen Nov 1, 2026
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.
naman10parikhSkillecosystem-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
naman10parikhSkillfractal-delegation
Also in 5 projects that use this
KirchliveSkillskill-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
sublimotionSkillagent-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
GoZippySkillrepo-scout
Also in 5 projects that use this
BenjaminGSkillharness-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
Other versions30 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 30
- ArcReel/ArcReel★ 6.6ksame name
- alinaqi/maggy★ 711same name
- alinaqi/claude-bootstrap★ 708same name
- fal-ai-community/skills★ 265same name
- NoobyGains/godmode★ 120same name
- nahid-sparktales/agent-dispatcher★ 59same name
- echo-of-machines/fable-advisor★ 27same name
- frankxai/agentic-creator-os★ 10same name
- FaisalAlqarni/sp-ecc★ 9same name
- naman10parikh/agentgrid★ 9same name
20 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- agy-delegationSkill
- go-ceremonySkill
- quality-gateSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 29 edited versions we read keep these.
7
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
- Distinctive: line 18
If no external cheap CLI agent is configured, skip that tier entirely — route reads to the mid-tier subagent and keep writes on the main …
- Distinctive: line 22
Before delegating anything, ask in order:
- Distinctive: line 42
If the external cheap CLI agent is down long-term: fall back to main-thread-direct implementation only with explicit user approval, …
- Distinctive: line 48
Never read an entire repository.
- Distinctive: line 49
Prefer compressed-output subagents (investigator- or Explore-style) for exploration.
- Very specific: line 51
Never read or review build caches or generated directories (build output, node_modules/, dist/, derived-data folders, etc.).
- Distinctive: line 52
Do not re-read files you just edited, and do not re-explain information already established in the conversation.
- Distinctive: line 54
If your environment has an optional CLI output filter for shell/tool output, let it run — it typically cuts noise substantially with no …
“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.
Files
Model Routing
The user converses with the main thread only. Every other model or agent works behind it; the main thread relays results and owns the final judgment call.
Model roles
- Main thread (expensive, judgment) — think / decide / own correctness: requirements, architecture, final plans, root-cause analysis, reviewing and accepting delegated output, running builds/tests itself, 1-2 file surgical edits, docs, reporting to the user. Never delegate this role away.
- Mid-tier subagent, e.g. Sonnet (read / summarize / draft) — repo reads of roughly 3-50 files returning a digest (an
Explore-type or general-purpose subagent), plan drafts (aPlan-type subagent). Also the fallback read path when an external cheap agent is unavailable. - Cheap subagent, e.g. Haiku (locate / count) — "where is X", enumerating callers, log filtering. Use the cheapest agent capable of a pure lookup.
- External cheap CLI agent (implementation, optional) — if the user's setup includes an external low-cost coding agent (for example, the Antigravity CLI driving Gemini — see the
agy-delegationskill for the concrete protocol), route to it: application code of any size when the project explicitly designates it as the implementer (requires explicit user GO — seego-ceremony), bulk test generation, scaffolding, mechanical migrations. - External cheap CLI agent (bulk read / web, optional) — same external agent, cheaper tier: whole-repo or huge-log digests, fan-out web research. Only applicable if such a tool is configured; otherwise fall back to the mid-tier subagent.
If no external cheap CLI agent is configured, skip that tier entirely — route reads to the mid-tier subagent and keep writes on the main thread (with explicit GO where app code is involved).
The 3-question delegation flow
Before delegating anything, ask in order:
- Am I writing application code? → external cheap agent if the project designates it as implementer (GO required); otherwise the main thread does it directly. Never a mid-tier or cheap subagent — they should not own application-code correctness.
- How much reading is involved? → 1-2 files: main thread reads them directly. 3-50 files: mid-tier subagent (Explore-style), returning a digest. Larger, or external web: external cheap CLI agent if available.
- Is this judgment, review, or verification? → always the main thread. Never delegated, regardless of size.
Break-even rule
Delegation has a fixed round-trip cost: writing the spec, waiting for the response, and verifying it. If that overhead exceeds the tokens a delegate would save, skip delegation and do the work directly on the main thread. A single-file grep or a two-line edit is never worth delegating.
Digest-only rule
Delegated results return as a digest only — a summary, not raw output. Never paste raw delegate output back into the main thread's context, and never re-read files a delegate has already digested for you. If a delegate's wrapper warns that it dumped raw output instead of a digest, discard the response and re-run asking explicitly for a digest.
Fallback chain
Preferred order when the primary main-thread model is unavailable: primary → next-strongest available model → mid-tier model (last resort). Switch models via whatever mechanism your Claude Code setup provides (e.g. /model).
- Next-strongest fallback: same duties as primary, no workflow change.
- Mid-tier as main thread (last resort): the
quality-gateskill's cross-model review requirement activates — an independent review (e.g. via an external agent, or a second model) is required per implementation; do not declare "done" until Must-fix items from that review are resolved. Do not finalize architecture or data-model decisions alone at this tier — present options plus a recommendation to the user, or defer the decision. Downgrade read-delegation one tier further (e.g. from mid-tier to cheap-tier subagents). - If the external cheap CLI agent is down long-term: fall back to main-thread-direct implementation only with explicit user approval, recorded as a governance exception. Reads fall back to the mid-tier subagent.
Invariant regardless of model in the main-thread seat: the explicit-GO ceremony still applies to app code, the verification gate still requires running and quoting results yourself, no direct commits to the trunk branch, and destructive actions still require confirmation.
Token rules
- Never read an entire repository; read only the needed ranges of the needed files.
- Prefer compressed-output subagents (investigator- or Explore-style) for exploration; receive conclusions only, not raw transcripts.
- Quote only the Error/Warning context from build and test logs — never paste full logs.
- Never read or review build caches or generated directories (build output,
node_modules/,dist/, derived-data folders, etc.). - Do not re-read files you just edited, and do not re-explain information already established in the conversation.
- Batch independent tool calls into a single response instead of issuing them one at a time.
- If your environment has an optional CLI output filter for shell/tool output, let it run — it typically cuts noise substantially with no loss of signal. This is optional tooling, not a requirement.
- Delegation prompts should state "what to decide" and "what format to return" explicitly, so a single round-trip suffices. Prefer writing delegation prompts and other model-facing text in English when your user-facing language is not English — machine-to-machine text is typically cheaper in English; keep user-facing output in the user's language.
- For the concrete commands, tiers, and pitfalls of any specific external cheap CLI agent, load that agent's own delegation skill on demand (see
agy-delegationfor a worked example).
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
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.

