By 0xkatze
Context window & cost monitoring with ccusage integration for Claude Code
Context window & cost monitoring plugin for Claude Code, with ccusage integration.
/claude-usage-monitor:usage for detailed reports[Opus 4.6] ▓▓░░░ 42%/1M | $2.16($3.75/d) 30m +15-3 | 5h:12%
| Section | Description |
|---|---|
[Opus 4.6] | Current model |
▓▓░░░ 42%/1M | Context window (green <60%, yellow 60-79%, red ≥80%) |
$2.16 | Session cost |
($3.75/d) | Today's total (ccusage, updated every 30 min) |
30m | Session duration |
+15-3 | Lines added/removed |
5h:12% | 5-hour rate limit usage |
# Add marketplace
/plugin marketplace add 0xKatze/claude-usage-monitor
# Install
/plugin install claude-usage-monitor --scope user
Or test locally:
claude --plugin-dir ./claude-statusline-plugin
Default is 4 decimal places. To change:
# Option 1: Config file
echo "COST_DECIMALS=2" > ~/.claude/usage-monitor.conf
# Option 2: Environment variable
export COST_DECIMALS=2
jq — JSON parser (sudo apt install jq)npx — For ccusage (npm install -g npx)cron — For periodic ccusage cache updates (optional)Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
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 claimFramework to iteratively grill knowledge into an Obsidian vault and analyse/test it with agents. Bundles the grill-with-obsidian skill and four read-only analyzer agents.
npx claudepluginhub 0xkatze/claude-usage-monitorhtop for your Claude Code sessions — real-time cost tracking, cache efficiency, model comparison, smart alerts, web dashboard, and session analytics
Modular statusline for Claude Code — peak hours, rate limits, rolling-window burn rate, cache reuse, plus a hook-injected narrator (rules + optional Haiku) that surfaces context-management advice above your prompt. Bilingual (English/Hebrew, locale auto-detect).
A rich statusline for Claude Code — context, rate limits, tool activity, token costs. Pure bash, no dependencies beyond jq.
Claude Code statusline and quota tracker. Single Bash + jq file, no Node.js, no npm, with pace-aware rate limit tracking.
Lightweight Claude Code status-line monitor with switchable styles, themes, and slash commands. v3.14.1 lowers the projection red line to 85% (yellow now 70–84) so a 7d window heading for →99% reads red instead of merely warm. v3.14.0 colours the 5h/7d bars by where usage is HEADED, not where it is now: once an end-of-window projection exists, the bar fill, label, and reset clock take their severity from the projected % against the cap (green <80, yellow 80–99, red ≥100) while the fill length still shows current usage — so a 7d window at 24% but on track for →96% reads yellow instead of a falsely-healthy green (all three styles). It also fixes the →NN% projection reading far too low for the first ~15 min after a reset (it was seeded from the used=0 first tick and lagged); it now holds `→--` until MIN_ELAPSED, then seeds from the first trustworthy reading. v3.13.3–v3.13.5 fix the 5h/7d bars sticking at a stale high % after Anthropic re-baselines usage mid-window (e.g. weekly limit raised): the cross-session merge now accepts an official downward revision once the old reading goes unconfirmed for 120s, idle windows replaying hours-old rate_limits blobs (expired 5h reset) can no longer overwrite or re-confirm the shared reading, and the →NN% projection drops its old-denominator samples and relearns after a re-baseline instead of freezing for the rest of the window. v3.13.0 adds a ⚙ session-mode line — effort (low/medium/high/xhigh/max/ultracode/auto) · thinking · fast · output-style — with a distinct static colour gradient per effort tier. v3.12.0 adds an always-on end-of-window projection (→NN%, learned from your local work rhythm) + an at-risk `⚠eta` forecast after each reset timer, session lines on by default, and a faint on-bar version that shows a `↑` hint when a newer release is on PyPI. v3.10.0 adds an opt-in live-activity line (in-progress todo, active tool, completed-tool rollup), git ahead/behind + session duration/lines on the project line, running-subagent lines, an opt-in `bar_shimmer` starfield on the battery bars, and a self-hosted plugin marketplace — plus a reliability fix so auto-update actually runs in daemon mode (detached, non-blocking) and the cache countdown is now per-session-correct. v3.9.0 makes the `cache` countdown auto-detect the real prompt-cache TTL (5m vs 1h) from the transcript, fixing a ~55-minute early `cache COLD` for Claude subscription users (Claude Code requests the 1-hour TTL automatically). v3.7.0 defends against status-line hijacking: a new `cs --setup --project [PATH]` writes a project-level override so another tool stealing the global `~/.claude/settings.json` slot can't kick `cs` out of this project; when displacement is detected, the bar also surfaces a one-line warning. v3.6.0 makes daemon (fast) mode the default for `cs --setup` — under 1% CPU continuously instead of ~3% inline at refreshInterval=1; pass `--inline` to opt back. Requires the `cs` CLI from PyPI (`pip install claude-statusbar` or `uv tool install claude-statusbar`).
A comprehensive statusline dashboard for Claude Code — session summary, quota bars, agent tracker, MCP health, message history, and more. All at a glance, no slash commands needed.