session-miser
Skill1 starsChanged 5 months agoMITView on GitHub
Intelligent model routing for Claude Code sessions. Recommends optimal model (Opus/Sonnet/Haiku) and effort level based on task complexity. Delegates mechanical work to cheaper subagents. Maximizes quality-per-dollar across the entire session. Trigger on: any new session, "save tokens", "cheaper model", "delegate this", "use sonnet", "effort level", "cost", or automatically when task complexity is clearly below the current model's tier.
In this repository32 other files it gives its agents.
- ansible-hardeningSkill
- budi-analyticsSkill
- claude-to-cursorSkill
- code-consistencySkill
- code-qualitySkill
- config-auditorSkill
- container-sandboxSkill
- cost-optimizerSkill
- cpa-tax-specialistSkill
- database-designSkill
- differential-reviewSkill
- fleet-managerSkill
- grill-meSkill
- hydra-swarmSkill
- inbound-syncSkill
- infosec-architectSkill
- insecure-defaultsSkill
- model-evaluationSkill
- modern-pythonSkill
- ms-office-suiteSkill
- openclaw-opsSkill
- prd-to-planSkill
- project-managementSkill
- property-based-testingSkill
- session-miserSkill
- skill-updaterSkill
- supply-chain-risk-auditorSkill
- systematic-debuggingSkill
- tddSkill
- token-miserSkill
- verification-before-completionSkill
- write-a-prdSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
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 15
Use the cheapest model that can do the job well.
- Very specific: line 76
Prefer opus:low for simple tasks over switching to Sonnet entirely — preserves Opus quality for unexpected complexity.
- Distinctive: line 80
Check session cost via hydra-pulse / session-snitch:
- Distinctive: line 86
If cost climbing fast: delegate more, switch model, or reduce effort level.
≈ “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
Session-Miser — Session-Level Cost Optimization
Core Principle
Use the cheapest model that can do the job well. Opus for thinking, Sonnet for doing, Haiku for fetching.
For per-call routing, pricing data, and API-level optimization, see the token-miser skill.
This skill covers session-level decisions only: which model to start on, when to switch, and what to delegate.
Planning Phase Exemption
During the planning phase (before ExitPlanMode), use Opus for all subagents:
- project-management planning — Explore/Plan agents building the work queue
- /plan mode — implementation design
Once ExitPlanMode is called, normal routing resumes.
Session Start Assessment
At session start, assess the work and recommend:
| Work Profile | Recommendation |
| Architecture, design, complex planning | Stay on Opus |
| Debugging root cause analysis | Stay on Opus |
| Mixed planning + execution | Stay on Opus, DELEGATE mechanical tasks to subagents |
| Primarily code edits, file changes, deploys | Suggest /model sonnet |
| Bulk operations, config changes, formatting | Suggest /model sonnet |
When to Switch Models Mid-Session
| Signal | Action |
| Planning phase complete, entering execution | Suggest /model sonnet |
| Hit unexpected architectural decision | Switch back to Opus for that decision |
| 30+ minutes of file edits on Opus | Suggest /model sonnet |
| Debugging shifts from "apply known fix" to "investigate root cause" | Switch to Opus |
| Cost climbing fast with no complex reasoning | Suggest delegation or model switch |
Delegation Rules
ALWAYS delegate (automatic, don't ask):
- File exploration → Explore agent (haiku)
- Git status, diff, log → haiku subagent
- Searching codebase → haiku subagent
- Running bash for status checks → haiku subagent
SUGGEST delegating (mention to user):
- Bulk file edits across repos → sonnet subagent
- Running test suites → haiku subagent
- Documentation generation → sonnet subagent
- Config file updates → sonnet subagent
NEVER delegate:
- Active user discussion topics
- Security-sensitive operations
- Complex multi-step reasoning chains
Effort Level Guide
| Effort | Use For | Relative Cost |
| high | Complex problems, architecture, security | 1x |
| medium | Most coding, debugging, research | ~0.7x |
| low | Simple edits, formatting, git ops | ~0.4x |
Prefer opus:low for simple tasks over switching to Sonnet entirely — preserves Opus quality for unexpected complexity.
Cost Tracking
Check session cost via hydra-pulse / session-snitch:
# If hydra-pulse CLI available
hydra-pulse statsIf cost climbing fast: delegate more, switch model, or reduce effort level.
Anti-Patterns
- Using Opus to read a file and report contents (haiku job)
- Using Opus for
git status(haiku job) - Using Opus for JSON/YAML formatting (sonnet:low)
- Staying on Opus for 30+ minutes of mechanical edits
- Switching to Haiku for anything requiring judgment
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.

