By Anuj7411
Track and optimize token spending in Claude Code sessions with per-session forensic audits, A/B savings verification against Sipcode optimizer, reproducible cost benchmarks, and per-model dollar predictions for coding tasks.
Run the published 20-task Sipcode benchmark on the user's machine and report measured median savings (target 62.6%). Reproducible, locked corpus. Use when the user asks "what's the proof?", "how much does sipcode actually save?", "run the benchmark", or wants to verify the headline savings claim themselves.
Predict the dollar cost of a coding task across Opus 4.7, Sonnet 4.6, and Haiku 4.5 BEFORE the user runs it. Pure heuristic + historical-anchor math, zero LLM calls. Use when the user asks "how much will X cost?", "is this task worth doing on Opus?", "estimate the refactor", or any pre-flight pricing question.
A/B compare the user's actual token spend before and after they installed Sipcode's optimizers — on their own session data. The honesty-first savings verifier. Use when the user asks "is sipcode actually saving me tokens?", "show me the impact", "prove sipcode is working", or any variant of "is this thing worth running?"
Forensic audit of the user's most recent Claude Code session. Returns total spend, output ratio, duplicate file reads, idle context after auto-compact, top expensive tool calls, and an estimate of what Sipcode would have RECOVERED if optimizers were active. Use when the user asks "where did my tokens go?", "audit my last session", "why was that session so expensive?", or any forensic question about a past Claude Code session.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Keep Claude Code's context clean for sharper answers and lower cost, automatically.
npm i -g sipcode
sipcode init
That is it. Your next Claude Code session will use Sipcode automatically. Verify a few minutes later:
sipcode drift
If the output reads no drift, context health stable, Sipcode is doing its job.
Sipcode is a free command-line tool that sits between you and Claude Code. It does three things:
It is open source under the MIT license. It makes zero network calls during normal use. Your data never leaves your laptop.
| Sipcode | Tool A | Tool B | Tool C | |
|---|---|---|---|---|
| Approach | Live PreToolUse hook | Cross-session memory store | Static methodology | RAG retrieval server |
| Caps verbose tool output | ✓ | ✗ | docs only | ✗ |
| Dedups same-session re-reads | ✓ | ✗ | docs only | ✗ |
| Mid-session install support | ✓ Verified Warm-Fill | n/a | n/a | n/a |
| Zero false-dedup by construction | ✓ | n/a | n/a | n/a |
| Reproducible benchmark on locked corpus | ✓ 62.6% median (20 tasks) | ✗ | ✗ | ✗ |
| Self-introspection MCP tools | ✓ 15 tools | ✗ | ✗ | partial |
| Zero network calls in normal use | ✓ | ✓ | n/a | ✗ |
| MIT licensed | ✓ | ✓ | ✓ | ✓ |
Sipcode is complementary to memory tools that persist context across sessions (Tool A in the table). Sipcode keeps each individual session clean. They solve different problems. Run both for maximum effect.
Full feature-by-feature comparison with tool names revealed: anuj7411.github.io/sipcode/compare
If you use Claude Code for real work, you have already felt this:
Sipcode measures the bloat, then removes the parts Claude does not need. The savings are not theoretical. Run sipcode benchmark on any machine and you will see the same 62.6% median reduction on the locked 20-task corpus.
After installing, here are the five commands that show you what Sipcode is doing.
sipcode driftTells you if your current Claude Code session is drifting from your normal usage pattern. Bloated context, repeated reads, stale signals are all flagged here.
✓ Sipcode drift: no drift, context health stable vs your recent baseline.
sipcode proxy --statsShows what Sipcode caught in the current session, broken down by rewriter.
Sipcode proxy, rewrite stats
total rewrites: 144
est. tokens saved: ~288,685 (heuristic)
signal kept: 67% (med), weighted across all rewrites
sipcode benchmarkRuns the locked 20-task corpus and produces a verifiable savings number. Anyone, anywhere can run this and get 62.6%.
62.6% median savings on a locked 20-task corpus
range 37.4% to 80.6% 3,567,170 tokens $67.43
sipcode todayDaily spend summary. Tokens used, sessions, output ratio, comparison to your 30-day median.
spend so far $1.20 across 4 sessions
tokens so far 943.8K output ratio 3.7%
sipcode forecastMonth-end projection based on your last 14 days.
projected month-end $17,674 (range $14,139 to $21,208)
npx claudepluginhub anuj7411/sipcode --plugin sipcode45% cost reduction measured. Cache expiry prevention, SubTask auto-delegation, zero-cost context restoration, real-time cost dashboard. The only Claude Code plugin built from CC source analysis.
Real-time session dashboard for Claude Code — cost tracking, analytics, and smart alerts
Governor: always-on compact professional output, telemetry, context slimming, tool-output filtering, prompt guidance, and drift guardrails for Claude Code Max users.
Opus 4.8-aware context optimization: silent-by-default hooks, honest NET token savings, big-file map-then-load, Context Control Center, per-task tracking, prompt coach
Analyze Claude Code session token usage, costs, trends, and anomalies
Cost-conscious mode for Claude Code. Saves 30-60% on costs through concise responses, model routing, and efficient workflow patterns.