Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By kharabaszv0.9.2MITIn 1 marketplace
A bar above the prompt with usage limits or monthly extra-usage spend, session cost, prompt-cache status, context usage, compact and spend-review buttons, spend alerts, the fixed per-request overhead with the tools and skills it loads but never uses, and trimming of long shell output, optional context gate and long-turn brake, and a weekly spend review
Run automatically on Claude Code events. Claude doesn't decide.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Prompt cache TTLcacheTtl
How long the prompt cache lives after the last response (1h on subscriptions, 5m on most API keys)
One of
1 critical to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it sees, changes or blocks tool calls; runs programs; writes files; reads files; reads environment variables (HOME, LOCALAPPDATA, XDG_STATE_HOME); runs commands; reads or rewrites your prompts; sends prompts on its own; changes what Claude reads (system prompt, context, reminders); calls MCP servers.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
1h5mstringdefault 1h
Stats folderstatsDir
Where the event log is written; empty uses %LOCALAPPDATA%\claude-toolkit\spend-bar\events on Windows, ~/Library/Application Support/claude-toolkit/spend-bar/events on macOS, and $XDG_STATE_HOME or ~/.local/state elsewhere
stringdefault
Trim tool output over (characters)trimLimit
Bash, PowerShell and browser_batch results longer than this are cut to their head and tail, the full text saved to a file the note names; 0 turns trimming off
numbermin 0default 10000
Collect usage statscollectStats
Record token use, tool calls, cache rewrites and context size (metadata only, no prompt text or file contents) for a later spend review
booleandefault true
Long-turn brake (requests)turnRequestBrake
When one main-thread turn reaches this many model requests, tell Claude to stop, summarize and ask before continuing. Set it above the long-turn warning. 0 turns it off
numbermin 0default 0
Compact warning (% context)compactWarnPercent
The Compact button turns amber from this share of the context window; 0 turns it off
number0–100default 40
Context gate (% context)contextGatePercent
When a new turn starts at or above this share of the context window, tell Claude to ask you to compact or hand off first (once per crossing). 0 turns it off
number0–100default 0
Idle cache rewrite warning (tokens)idleRewriteWarning
Show a toast when a request after the prompt cache expired rewrites at least this many tokens; 0 turns it off
numbermin 0default 100000
Session cost warning (USD)sessionCostWarning
The session cost turns amber at this many dollars and red at twice it, with a toast at each multiple; 0 turns it off
numbermin 0default 25
Long turn warning (requests)turnRequestWarning
Show a toast when one main-thread turn reaches this many model requests; 0 turns it off
numbermin 0default 40
A bar above the prompt showing:
month $412/$1800), read from the desktop app's get_usage tool at session start, hourly and after a turn once the reading is 10 minutes old or missing (so a failed read at session start, while the app is still connecting, is retried) — amber from 75%, red from 90%, with a toast as it crosses each. The terminal has no such tool, so it shows no month figure. Personal plans (Free, Pro, Max) never show it, even with extra usage turned onspend 40%)/cost totals it — amber from $25, red from $50c while the bar has focus, that runs /compact in the chat, as the session rail does. It reads ↓… while any compaction runs (automatic ones too) and is dimmed and inactive below 30% context. It turns amber from 40% context, the point to compact byo, that scores this session and the past week from the usage stats below and asks Claude for suggestions. It looks at the share of tokens sent above 40% context, turns over 50 requests, shell calls per request, repeated reads by kind, tool results over 20k characters as the model read them (and by the tool's own record), cache rewrites over 100k tokens, the estimated and billed cost, the subagents' share of it and their spend by agent type and model, the most used shell commands and the most common shell errors, and the fixed overhead belowToasts warn about the patterns that cost the most:
Values under their thresholds are plain dim text; values past them become pills (rounded SVG pills on the desktop app, coloured labels in the terminal).
Options, in the config menu: Prompt cache TTL (1h default for subscriptions and Enterprise seats, 5m for most API keys), Compact warning (40% by default), Long turn warning (40 requests by default), Session cost warning ($25 by default) and Idle cache rewrite warning (100,000 tokens by default); 0 turns any warning off.
Warnings only tell you. These two options tell Claude, by adding a note to what the model reads (you do not see it), and are off (0) by default:
contextGatePercent): when a new turn starts with context at or above this share, Claude is told to say in one line, before new work, that you should /compact or hand off to a fresh session (a short handoff note is cheaper). Once per crossing; it re-arms when context falls back under the limit. Slash commands, prompts typed into a running turn and prompts sent by plugins get no note.turnRequestBrake): when the main-thread turn reaches this many model requests, Claude is told, with the next tool results, to stop, summarize what is done and what is left, and ask before continuing. Set it above Long turn warning so the toast comes first. A model can ignore the note; nothing is aborted./spend-review reads the last 7 days of spend-bar's own event logs (and the 7 before, for comparison) and asks Claude to compare this week with the one before: estimated cost by day, the share of tokens sent at high context, long turns, repeated reads, cache rewrites, subagent share and spend by agent type, the most common shell errors, and the fixed overhead below. It sends metadata only, never prompt text. The $ button gives the shorter review of this session and the past week.
If another plugin already has a command or skill named spend-review (oec-toolkit does), the engine refuses the name and spend-bar registers /spend-bar-review instead. Before 0.9.2 that refusal ended spend-bar's session start, so no event log was written for the session: its lines, the overhead line included, were dropped, and only the daily totals were kept.
npx claudepluginhub kharabasz/spend-bar --plugin spend-barBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground