agentleFS
scoobydont-666scoobydont-666/shared-claude-skills/skills/session-miser/SKILL.md

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.

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

    Use the cheapest model that can do the job well.

    line 15
  2. Distinctive:

    ALWAYS delegate these to subagents (automatic, don't ask):

    line 49
  3. Distinctive:

    NEVER delegate (must stay in main thread):

    line 61
  4. Distinctive:

    When coordinating work across multiple nodes:

    line 82
  5. Distinctive:

    When creating coordination tasks, specify the model tier in the task description: "This is a sonnet-tier task: bulk edit config files …

    line 85
  6. Distinctive:

    After significant work blocks, check session-snitch:

    line 91
  7. Distinctive:

    If session cost is climbing fast, suggest:

    line 97
  8. Distinctive:

    Use /model opus:low instead of opus:high

    line 100
  9. Distinctive:

    Use Opus to read a file and report its contents (that's a haiku job)

    line 105
  10. Distinctive:

    Use Opus to run git status and parse the output (haiku)

    line 106
  11. Distinctive:

    Use Opus to format JSON or YAML (sonnet:low)

    line 107
  12. Distinctive:

    Start on Opus for planning, switch to Sonnet for execution

    line 111
  13. Distinctive:

    Use effort levels to fine-tune cost within a model tier

    line 114

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

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 TypeModelEffortWhy
Architecture, design, complex reasoningOpushighNeeds deep reasoning
Security audits, code review with judgmentOpusmediumQuality-sensitive
Code generation (new features, complex logic)Opus or SonnetmediumSonnet handles most code well
Code generation (boilerplate, simple functions)SonnetlowTemplated, predictable
Text editing, formatting, refactoringSonnetlowMechanical transformation
Git operations (commit, push, branch, merge)SonnetlowDeterministic commands
File search, grep, glob, reading filesHaiku (subagent)—Read-only, no reasoning
Config file edits (.yaml, .json, .toml)SonnetlowStructural, not creative
Documentation writingSonnetmediumNeeds coherence, not deep reasoning
Debugging (root cause analysis)OpushighMulti-step reasoning
Debugging (applying a known fix)SonnetlowJust follow the plan
Research (web search, GitHub crawl)SonnetmediumSynthesis, not deep reasoning
Planning (PRD, architecture)OpushighOpen-ended judgment
Running tests, checking statusHaiku (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 subagents

Delegation 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)

EffortUse ForCost
highFirst attempt at complex problems, architecture, security1x
mediumMost coding, debugging, research~0.7x
lowSimple 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 model

If session cost is climbing fast, suggest:

  1. Delegate more to subagents
  2. Switch to /model sonnet for the current phase
  3. 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 status and 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

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.