ClaudeCodeMod

All shelves / Mods / Usage

leaks

By davekiss

leaks is a Claude Code usage mod by davekiss.

Opens a pane that ranks the avoidable spend in the last 7 days of transcripts, and draws a strip above the prompt when a leak is happening.

Draws

Install

The marketplace name is davekiss.

In Claude Code
/plugin marketplace add davekiss/mods
/plugin install leaks@davekiss
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
0.1.1
License
MIT
Repo stars
11
Last change
2026-10-12

What it can reach

  • Draws in the session
  • Reads usage or context figures
  • Runs a command when you press

Node 22 or later. Start a new session after installing and run /leaks: a pane ranks the avoidable spend in the last 7 days of transcripts, each leak with what it cost and the fix, and /leaks --days 30 looks further back. It finds sessions run past the compact point, a cache rebuilt after a break, read-only subagents on a big model, a subagent cache expiring between steps, and huge tool outputs carried along. A fix that is a setting or a CLAUDE.md line applies with one press of a. The strip above the prompt flags a leak while it happens, a context past 400k that every turn re-reads, the warn_at setting, or a cache about to expire on a big conversation, with what your next message will re-write, and compact now shrinks it first. The author says it reads ~/.claude/projects on your machine, every response's message.usage, prices each call at the API rates in leaks.mjs, and that nothing leaves your machine.

The marketplace, davekiss, holds Dave Kiss's seven plugins, ci-light, shot, and env among them. This one installs on its own, or loads from a checkout with claude --plugin-dir ./leaks. Finding where the week's usage went is why this page files it under usage. token-ledger, by Arunjay4213, pins this session's cost and the last turn's tokens and cache hit, and /ledger lists each turn. cost-meter, by Singh-AP, draws the session cost, the context fill, and the plan windows on the status line, with what each turn cost. This one looks back over a week of transcripts for spend that could have been avoided, and fixes it. The author says dollars are API-equivalent, a share of the limit on a subscription and not a bill, and savings are estimates that overlap a little. The engine also runs on its own, with node leaks.mjs. In the source, /leaks runs node leaks.mjs, a settings fix writes one key to ~/.claude/settings.json and keeps the rest, and compact now calls Claude Code's own compact.

Demo

The leaks section on the author's GitHub page
Screenshot of the author's GitHub page.

What it hooks into

  • session.startWhen a session starts
  • turn.completeWhen a turn ends
  • command.runWhen you run its slash command/leaks
  • ui.renderDraws into the sessionAbovePromptPane

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Slash commands 1

  • /leaksWhere your Claude Code week went, and one-press fixes (/leaks --days 30)

Files

The author's README and source, 4 files. They load when you open them.

Facts

Author
davekiss
Category
Usage
Marketplace
davekiss
Repo
davekiss/mods
Folder
leaks
Version
0.1.1
License
MIT
Repo stars
11
Last change
2026-10-12
Language
JavaScript
Files
10

Other mods in Usage

context-dietdrkokorevReplaces a huge tool output with a short digest and the path of a file that still holds the full text, and /diet opens a panel of what it saved.agent-profilerYeonwooSungDraws where a session's time goes, model wait against tools and subagents, in a status line and a live pane, and can write the session out as an OTLP trace.claude-carbongwittebolleDraws the CO2 of each answer and a pane with a pixel molecule colored against your past sessions, plus this session's total under the prompt.dividendMint-SecurityDraws a tip above the prompt about the prompt cache, the context, or the plan limits, with a status line and a /dividend pane of the session's figures.caliber-jev-compactioncaliber-ai-orgReplaces /compact: Jev scores each tool call, drops the stale ones, and keeps the rest of the conversation word for word, then toasts what it kept.model-effort-bandYeonwooSungDraws a band above the prompt with the selected model and the effort of the latest main-conversation request.shuntpleaseaiDraws a band above the prompt with the shared pool's usage and reset times, or this session's rate limits when you are off shunt.optimaizrblendbunjakuHolds a commandDraws this turn's cost, the 5-hour window, and cache time above the prompt, and holds a command that failed twice unchanged.clawdmeterwelternDraws Clawd and the session, weekly, and context bars in a band above the prompt.ccswaperrhythmDraws your ccswap accounts and their 5-hour and 7-day usage, and switches from a button on the band.routeralexei-ledPicks a model and effort for each turn from a classifier, and draws the tier above the prompt.context-budgetmelodic-softwareHolds a commandDraws the session's context by category, in a pane or a band above the prompt, and asks before a settings file is written.
All 183 in Usage