Don't go nuts with your tokens

TokenSquirrel

Your Claude Workflow Has No Feedback Loop

Whether you're on Pro, Max, or paying per token on the API, the question isn't whether you're spending too much. It's whether the tokens you're paying for are landing on the work that actually matters — and whether your setup is quietly burning credits before you've typed a single character.

Modern Claude Code sessions mix Opus, Sonnet, and Haiku — saving the expensive reasoning for the hard problems, the cheap models for everything else. But they also run alongside MCP servers you forgot you installed, skills you haven't invoked in months, CLAUDE.md files that grew to 800 lines, and hooks firing on every prompt. None of it is broken. It's why you hit the credit limit at 3pm with the hard problem still open, and why your context is 70% full before you start.

TokenSquirrel is the missing feedback loop. It audits your Claude Code sessions and scores 15 specific behaviours across discipline, hygiene, and setup weight — each rated 0–100 with a letter grade. The point isn't to spend less. It's to make sure your expensive tokens go where they earn their keep, so you get more from the plan you're already paying for and never run out of credits or context when it matters.

15 behaviours scored
A–F letter grades
0 data transmitted

What It Looks Like

One command. Plain English. Zero setup.

npx tokensquirrel
$ npx tokensquirrel
  TokenSquirrel
  Today: B (72/100)
  You ran 6 sessions in the last 24h, averaging 41 messages each.
  Trend: ▁▂▃▂▄▅▆▅▆▇  +5 over 30 days.

  Skill bloat (D, 38) — 47 skills loaded, ~12k context tokens; 18 unused in 30d.
  /clear frequency (D, 42) — context windows averaging 71% full at session end.
  Cache efficiency (C, 58) — 31% cache-hit rate; restructure prompts to reuse prefixes.
  Hook injection load (C, 55) — 4 UserPromptSubmit hooks adding ~800 tok/turn.

  Bottom line: ~$4.20/day spend, ~$1.10 of that is avoidable.
  --detail for full scorecard | --trend for history
      

Audit Your Skills

Every installed skill loads metadata into context on every turn — even the ones you never invoke.

skills --audit groups your skills by plugin, flags any you haven't used in 30 days, and tells you exactly what to uninstall to claw back tokens. Stale plugins are the single biggest source of silent setup-weight cost — and the easiest to fix.

grouped by plugin
stale-skill flag
$ copy-paste uninstall lines
npx tokensquirrel claude skills --audit
$ npx tokensquirrel claude skills --audit

 user — 8 skills · ~3.2k tok
  Skill                              Plugin    Ctx tok  Used
   using-superpowers                user        420    47d
   brainstorming                    user        310    62d
    debugging                        user        280     2d
  

 posthog@anthropics — 12 skills · ~5.1k tok · 9 stale
   error-analyzer                   posthog     680    91d
   insights-builder                 posthog     540   never
  

Recommendations
  posthog@anthropics — 9/12 stale, ~3.8k tok reclaimable:
    /plugin uninstall posthog@anthropics
  user skills — 4 stale (~1.1k tok):
    rm -rf ~/.claude/skills/{using-superpowers,brainstorming,…}

$ npx tokensquirrel claude skills --audit --fix   # walk through uninstalls interactively
$ npx tokensquirrel claude skills --stale 30      # only flag skills idle 30+ days
$ npx tokensquirrel claude skills --unused        # only skills never invoked
$ npx tokensquirrel claude skills --by tokens     # sort by ctx weight (also: used, size, mtime)
        

Audit Your MCPs

Every attached MCP server loads its full tool schema into context on every turn — even the ones you never call.

mcp --audit groups your MCP servers by source (settings.json vs. plugin), flags any you haven't called in 30 days, and shows you the top tools each one is actually used for. Idle MCPs are a silent tool-schema tax on every request — the audit makes them visible and tells you exactly how to remove them.

grouped by plugin / settings
stale-MCP flag
$ copy-paste removal lines
npx tokensquirrel claude mcp --audit
$ npx tokensquirrel claude mcp --audit

 qmd — 1 server
  Server         Source         Tport  Tools  Uses  Used  Top tools
    qmd          qmd            stdio  3      87    16d   query×53, get×33, status×1

 github — 1 server · 1 stale
   github       github         http   —      —     never

 settings.json — 1 server · 1 stale
   qmd          settings.json  stdio  —      —     never

Recommendations
  github@claude-plugins-official — all stale:
    /plugin uninstall github@claude-plugins-official
  settings.json — 1/1 stale:
    claude mcp remove qmd

  Or let TokenSquirrel walk you through it: `tokensquirrel claude mcp --audit --fix`

$ npx tokensquirrel claude mcp --audit --fix    # walk through removals interactively
$ npx tokensquirrel claude mcp --unused          # only servers never invoked
$ npx tokensquirrel claude mcp --by used         # sort by recency (also: tools, source, name)
$ npx tokensquirrel claude mcp --stale 14        # tighten the stale window
        

15 Behaviours Scored

Each behaviour maps to a real cost lever. Each one is something you can actually improve.

Context Management

Are you clearing sessions and monitoring context size, or letting windows bloat unchecked?

Spending Visibility

Do you check costs and usage, or discover the bill at the end of the month?

Plan Mode Usage

Are you using plan mode for complex tasks, or burning tokens on false starts?

Model Switching

Are you picking the right model for the job, or running Opus for everything?

Clear Frequency

How often you reset context — too rarely wastes tokens, too often loses momentum.

Paste Hygiene

Text input vs. binary and PDF dumps that bloat context with noise.

Session Hygiene

Focused sessions with clear goals vs. sprawling marathons that lose coherence.

Cache Efficiency

Are you structuring work to hit prompt caching, or paying full price every turn?

Tool Efficiency

Tool call-to-message ratio — a proxy for how much work you're getting per turn.

MCP/Plugin Hygiene

Are you loading servers and plugins you're not using? Every one costs context tokens.

CLAUDE.md Weight

Long CLAUDE.md files inject into every prompt. Are yours lean, or quietly burning context on every turn?

Hook Injection Load

UserPromptSubmit hooks fire on every prompt. Each one costs context tokens you didn't ask for.

SessionStart Noise

Hooks that fire when a session opens. A few are useful; a stack of them is just slow startup.

Skill Bloat

Installed skills load metadata into context. More skills = more weight, even when you don't use them.

MCP Tool-Schema Weight

Every attached MCP server ships its tool schemas in every request. Trim what you don't use.

Get Started

One command. Everything stays on your machine.

Terminal
$ npx tokensquirrel                          # compact score + cost (default: 24h)
$ npx tokensquirrel claude --detail           # full 15-behaviour scorecard
$ npx tokensquirrel claude --hours 48         # score the last 48 hours
$ npx tokensquirrel claude --days 7           # score the last 7 days
$ npx tokensquirrel claude --weeks 4          # score the last 4 weeks
$ npx tokensquirrel claude --project my-app   # filter to one project
$ npx tokensquirrel claude --trend            # score history over time
$ npx tokensquirrel claude mot                # MOT inspection (15-point service)
$ npx tokensquirrel claude --dashboard        # local web UI at :8080
$ npx tokensquirrel claude skills --audit     # find stale skills, suggest uninstalls
$ npx tokensquirrel claude --format md        # markdown output for sharing
        

How It Works

1

Reads local data

TokenSquirrel reads your ~/.claude/ directory — history, sessions, settings. Nothing leaves your machine.

2

Scores 15 behaviours

Each behaviour gets a score from 0–100 and a letter grade (A–F) based on evidence from your actual usage patterns.

3

Estimates cost

Using public Anthropic pricing, it estimates your daily spend and flags where habits are costing you the most.

The Theory and the Practice

The token economics series gives you the what. TokenSquirrel tells you whether any of it stuck.