model-cost-router
Skill3 starsChanged 7 months agoMITView on GitHub
Decide when to use cheaper, local, or frontier models and how to measure cost tradeoffs. Use for token limits, model routing, cost-conscious Codex work, DeepSeek/Claude/OpenAI comparisons, prompt caching, or agent workflow economics. Skip when cost routing is enforced by a production gateway, budget policy, fallback policy, or live alerting; use `$auto-skill-build-agent-reliability-loop`. Avoid unverifiable savings claims.
In this repository30 other files it gives its agents.
- agent-memory-ledgerSkill
- agent-observabilitySkill
- automation-skill-forgeSkill
- auto-skill-audit-codex-supercharge-installed-driftSkill
- auto-skill-build-agent-reliability-loopSkill
- auto-skill-build-agent-run-ledger-dashboardSkill
- auto-skill-build-mcp-conformance-harnessSkill
- auto-skill-build-memsearch-codex-memorySkill
- auto-skill-build-source-pattern-synthesisSkill
- auto-skill-build-sources-inventorySkill
- auto-skill-build-supercharge-feedback-loopSkill
- auto-skill-ops-supercharge-maintenance-passSkill
- auto-skill-safety-external-skill-intakeSkill
- auto-skill-safety-mcp-secret-guardSkill
- auto-skill-trend-github-discovery-radarSkill
- codebase-graph-scoutSkill
- codex-prompt-template-builderSkill
- codex-supercharge-routerSkill
- experiment-loop-runnerSkill
- low-token-contextSkill
- mcp-safety-reviewSkill
- mcp-server-labSkill
- openapi-to-mcp-skillSkill
- open-design-ui-librarySkill
- repo-intelligence-briefSkill
- repo-to-wikiSkill
- sandbox-source-intakeSkill
- skill-pack-factorySkill
- skill-quality-gateSkill
- workflow-launchpadSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
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
- Distinctive: line 29
Run cheap path once.
- Distinctive: line 30
Run strong review on the output.
- Distinctive: line 32
Keep routing only if quality and reliability are acceptable.
- Distinctive: line 36
Treat "17x cheaper" or similar claims as marketing until measured locally.
- Distinctive: line 37
Do not route secrets or proprietary code through unknown hosted tools.
- Distinctive: line 38
Prefer caching briefs and memory over re-sending context.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Model Cost Router
Optimize for total successful-task cost, not the cheapest single call.
Routing Heuristic
| Work | Model tier |
| Search, inventory, mechanical edits | cheap/fast model or local tools |
| Design decisions, risky code, security | stronger model |
| Final review of broad changes | stronger model |
| Long-running monitoring | no model; use process/log checks |
| Repeated repo facts | markdown memory, not model tokens |
Measurement Loop
- Define the task and quality bar.
- Run cheap path once.
- Run strong review on the output.
- Track elapsed time, fixes needed, and estimated tokens.
- Keep routing only if quality and reliability are acceptable.
Guardrails
- Treat "17x cheaper" or similar claims as marketing until measured locally.
- Do not route secrets or proprietary code through unknown hosted tools.
- Prefer caching briefs and memory over re-sending context.
- Escalate model quality when failure would be more expensive than tokens.
- For production agents, bind model routing to gateway budgets, cache rules,
trace metadata, and eval score gates; route to
$auto-skill-build-agent-reliability-loopwhen cost decisions affect live users or tools.
Pair with $agent-observability to keep a local cost ledger.
Validation
- Cost claims are measured locally or marked unverified.
- The cheaper path is kept only if quality and reliability meet the task bar.
- Production budget/fallback policy is routed to
$auto-skill-build-agent-reliability-loop.
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.

