Every “cut your AI token bill” tool I looked at compresses command output. So I nearly built one. Then I measured my own 111 sessions first, and the addressable slice came back at 2.8%.
What It Is
A skill inside my command center that governs what each operation costs. Three parts: a discipline layer that costs nothing, a compression benchmark that ships deliberately switched off, and a delegation lane pointed at a model running on my own machine.
What The Measurement Found
I streamed every session transcript and paired each tool call to its result.
| Sink | Volume |
|---|---|
| Reading files | ~1,694k tokens across 1,646 calls |
| Running commands | ~1,627k tokens across 7,579 calls |
| Everything else | 10% of the total |
Reads and commands are 92% of the bill. That part was expected. The second finding was not.
Compression tools protect correctness by refusing to touch anything risky: no pipes, no chained commands, no redirects. Sensible rules. Applied to my transcripts they excluded 96% of my commands, because almost everything I run is compound. What remained was worth maybe 150 tokens a session against a 30,000 token bill.
So the compression engine ships as a benchmark, not a filter. Dry-run mode, a stats file, wired to nothing. If the numbers ever justify switching it on, that becomes a decision made with evidence.
What Actually Got Built
- Read discipline. Locate before reading, read line ranges, never re-read what is already in memory. This is where the money was.
- Command discipline. Quiet flags on the loud commands. Never dump a passing test suite into analysis, because only failures carry information.
- A delegation taxonomy. Boilerplate, stubs, fixtures and docstrings can go to a local model. Architecture, auth, payments, anything touching real data, and anything written in my voice stay where judgment lives. The executor for that lane is the next piece. The rules landed first on purpose.
- A session hook. A nine-line digest injected whenever context resets, because a rule nobody remembers is not a rule.
The Part I Kept
Four open-source projects informed this. I borrowed patterns from all four and installed none of them. One rewrites every shell command machine-wide. One routes code through a third-party model account. One wants four separate tool installs. One is a proxy sitting between the agent and the shell. Patterns are cheap to borrow. Dependencies are expensive to keep.
Stack
| Tool | Role |
|---|---|
| Claude Code | Skill, hooks, session wiring |
| Python 3.12 | Compression benchmark, 20 precision tests |
| Ollama (gemma3:4b) | Local delegation target, nothing leaves the machine |