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
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
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 15
Use the cheapest model that can do the job well.
- Distinctive: line 49
ALWAYS delegate these to subagents (automatic, don't ask):
- Distinctive: line 61
NEVER delegate (must stay in main thread):
- Distinctive: line 82
When coordinating work across multiple nodes:
- Distinctive: line 85
When creating coordination tasks, specify the model tier in the task description: "This is a sonnet-tier task: bulk edit config files …
- Distinctive: line 91
After significant work blocks, check session-snitch:
- Distinctive: line 97
If session cost is climbing fast, suggest:
- Distinctive: line 100
Use /model opus:low instead of opus:high
- Distinctive: line 105
Use Opus to read a file and report its contents (that's a haiku job)
- Distinctive: line 106
Use Opus to run git status and parse the output (haiku)
- Distinctive: line 107
Use Opus to format JSON or YAML (sonnet:low)
- Distinctive: line 111
Start on Opus for planning, switch to Sonnet for execution
- Distinctive: line 114
Use effort levels to fine-tune cost within a model tier
≈ “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 — Intelligent Session Cost Optimization
Core Principle
Use the cheapest model that can do the job well. Opus for thinking, Sonnet for doing, Haiku for fetching.
Model Selection Matrix
| Task Type | Model | Effort | Why |
| Architecture, design, complex reasoning | Opus | high | Needs deep reasoning |
| Security audits, code review with judgment | Opus | medium | Quality-sensitive |
| Code generation (new features, complex logic) | Opus or Sonnet | medium | Sonnet handles most code well |
| Code generation (boilerplate, simple functions) | Sonnet | low | Templated, predictable |
| Text editing, formatting, refactoring | Sonnet | low | Mechanical transformation |
| Git operations (commit, push, branch, merge) | Sonnet | low | Deterministic commands |
| File search, grep, glob, reading files | Haiku (subagent) | — | Read-only, no reasoning |
| Config file edits (.yaml, .json, .toml) | Sonnet | low | Structural, not creative |
| Documentation writing | Sonnet | medium | Needs coherence, not deep reasoning |
| Debugging (root cause analysis) | Opus | high | Multi-step reasoning |
| Debugging (applying a known fix) | Sonnet | low | Just follow the plan |
| Research (web search, GitHub crawl) | Sonnet | medium | Synthesis, not deep reasoning |
| Planning (PRD, architecture) | Opus | high | Open-ended judgment |
| Running tests, checking status | Haiku (subagent) | — | Mechanical execution |
Session Start Recommendation
At the start of every session, assess the likely work and recommend:
You're on Opus. Based on the project and recent activity:
- If primarily editing/committing/deploying → suggest /model sonnet
- If primarily debugging/designing/architecting → stay on Opus
- If mixing both → stay on Opus but DELEGATE mechanical tasks to subagentsDelegation Rules
ALWAYS delegate these to subagents (automatic, don't ask):
- File exploration (Explore agent → haiku)
- Running bash commands for status checks → haiku
- Git status, diff, log → haiku
- Searching codebase → haiku
SUGGEST delegating these (mention to user):
- Bulk file edits across multiple repos → sonnet subagent
- Running test suites → haiku subagent
- Documentation generation → sonnet subagent
- Config file updates → sonnet subagent
NEVER delegate (must stay in main thread):
- Anything the user is actively discussing
- Decisions that need user confirmation
- Security-sensitive operations
- Complex multi-step reasoning chains
Effort Level Guide
Claude Code supports effort levels: opus:low, opus:medium, opus:high (and sonnet:low/medium/high)
| Effort | Use For | Cost |
| high | First attempt at complex problems, architecture, security | 1x |
| medium | Most coding, debugging, research | ~0.7x |
| low | Simple edits, formatting, git ops, status checks | ~0.4x |
Recommend /model opus:low for simple tasks instead of switching to Sonnet entirely.
This preserves Opus quality for unexpected complexity while saving cost.
Integration with Multi-Instance Coordination
When coordinating work across multiple nodes:
- Route GPU-intensive tasks to GPU hosts (create coordination task with requires: [gpu, ollama])
- Route mechanical fleet tasks to primary/CPU hosts (lower cost hosts)
- When creating coordination tasks, specify the model tier in the task description: "This is a sonnet-tier task: bulk edit config files across 5 repos"
- This helps the claiming instance pick the right model
Cost Tracking
After significant work blocks, check session-snitch:
session-snitch stats # session cost so far
session-snitch cost # cost breakdown by modelIf session cost is climbing fast, suggest:
- Delegate more to subagents
- Switch to /model sonnet for the current phase
- Use /model opus:low instead of opus:high
Anti-Patterns
DON'T:
- Use Opus to read a file and report its contents (that's a haiku job)
- Use Opus to run
git statusand parse the output (haiku) - Use Opus to format JSON or YAML (sonnet:low)
- Stay on Opus when doing 30 minutes of file edits (switch to sonnet)
DO:
- Start on Opus for planning, switch to Sonnet for execution
- Delegate parallel searches to haiku subagents
- Come back to Opus for review/verification of Sonnet's work
- Use effort levels to fine-tune cost within a model tier
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.

