agentleFS
Arnie016Arnie016/codex-prompt-templates/skills/model-cost-router/SKILL.md

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.

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
  1. Distinctive:

    Run cheap path once.

    line 29
  2. Distinctive:

    Run strong review on the output.

    line 30
  3. Distinctive:

    Keep routing only if quality and reliability are acceptable.

    line 32
  4. Distinctive:

    Treat "17x cheaper" or similar claims as marketing until measured locally.

    line 36
  5. Distinctive:

    Do not route secrets or proprietary code through unknown hosted tools.

    line 37
  6. Distinctive:

    Prefer caching briefs and memory over re-sending context.

    line 38

≈ “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.

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

Model Cost Router

Optimize for total successful-task cost, not the cheapest single call.

Routing Heuristic

WorkModel tier
Search, inventory, mechanical editscheap/fast model or local tools
Design decisions, risky code, securitystronger model
Final review of broad changesstronger model
Long-running monitoringno model; use process/log checks
Repeated repo factsmarkdown memory, not model tokens

Measurement Loop

  1. Define the task and quality bar.
  2. Run cheap path once.
  3. Run strong review on the output.
  4. Track elapsed time, fixes needed, and estimated tokens.
  5. 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-loop when 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.

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.