Arnie016/codex-prompt-templates / skills/model-cost-router
model-cost-router
VerifiedDecide 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.
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.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |