skills/cost-aware-routing/SKILL.md
Use when deciding which model or agent to use for a task - guides cost-optimized model selection based on task complexity
npx skillsauth add kienbui1995/magic-powers cost-aware-routingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Not every task needs the most expensive model. Route tasks to the right model based on complexity, saving cost without sacrificing quality.
| Model | Agent | Cost | Best For | |-------|-------|------|----------| | Opus | architect | $$$$$ | Complex architecture, novel design, ambiguous requirements | | Sonnet | debugger, ui-designer, (default) | $$ | Implementation, debugging, most coding tasks | | Haiku | reviewer | $ | Code review, verification, simple lookups, formatting |
Cost ratios (approximate):
WHEN receiving a task:
1. Can Haiku handle this? (review, verify, format, lookup)
→ YES: Use reviewer agent or --model haiku
2. Is this standard implementation/debugging?
→ YES: Use default Sonnet (or debugger/ui-designer agent)
3. Does this require deep reasoning about novel problems?
→ YES: Use architect agent (Opus)
| Pattern | Problem | Fix | |---------|---------|-----| | Using Opus for everything | 25x cost for same result | Default to Sonnet | | Using Opus for code review | Overkill, slow | Use Haiku reviewer | | Using Haiku for implementation | Too many mistakes | Use Sonnet | | Not using agents at all | Missing cost savings | Dispatch to right agent |
# Quick review with Haiku
claude -p "review the last commit" --model haiku
# Debug with Sonnet (default)
claude -p "fix the failing test in auth.py"
# Architecture with Opus
claude -p "design the caching layer" --model opus
# Budget cap
claude --max-budget-usd 0.50 -p "implement the login form"
Track your usage in Claude Code settings or Vertex AI console:
content-media
Use when designing for XR (AR/VR/MR), choosing interaction modes, or adapting 2D UI patterns for spatial computing
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment
development
Use when you have a spec or requirements for a multi-step task, before touching code
development
Use when executing a structured workflow — select and run a feature, bugfix, refactor, research, or incident template with correct agent and model assignments per phase.