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.
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.
Log errorsdebug_log
Append internal errors to errors.ndjson in the plugin's data directory. Hooks stay non-blocking either way; this is the on-disk record, separate from the failure Claude is told about.
booleandefault false
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
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.
Record poll historykeep_history
Append each poll to history.ndjson in the plugin data directory (pruned to 30 days), so the MCP tool can report trends.
booleandefault true
Spent threshold (percent)spent_percent
Usage at or above this counts as a spent window regardless of pace, and Claude is told to prefer wrapping up.
number1–100default 95
Advise Claude when quota is tightwrap_up_nudge
When a window is spent or badly outpacing its clock, add an instruction to prefer finishing and handing off over starting large new work.
booleandefault true
Show alerts in the transcriptvisible_alerts
Surface a message to you when a quota state gets worse, not only to Claude. Improvements are never announced.
booleandefault true
Alarm lead (percentage points)pace_alarm_lead
Lead at which the injected context adds advice to spend the remaining budget deliberately.
number0–100default 25
Caution lead (percentage points)pace_caution_lead
How far usage may run ahead of the window's elapsed time before the pace counts as worth noting. 90% used at 90% elapsed is fine; 90% used at 40% elapsed is not.
number0–100default 10
Report threshold (percentage points)report_delta_percent
After the first report of a session, inject the quota again only once some window has moved at least this many points. 0 reports on every prompt.
number0–100default 3
Minimum seconds between pollspoll_interval_seconds
The usage endpoint rate-limits per OAuth token, and every Claude Code session on this machine shares one token. All sessions poll through a single cache at most this often. Values below 60 are clamped.
number60–3600default 300
Request timeout (seconds)request_timeout_seconds
How long a poll may take before it is abandoned. A timed-out poll falls back to the last cached reading, and tells Claude that the refresh failed.
number1–30default 5
Claude cannot see your subscription usage. /usage shows it to you, but the
model has no idea whether it is at hour one of a fresh five-hour window or
about to burn the last of your week — so it plans identically either way, and
finds out only when a request is refused.
This plugin puts the numbers in Claude's context, and gives it a tool to ask on demand.
At session start, and afterwards only when something moved:
<quota>session 71%/64% +7 resets 1h48m · weekly 92%/89% +3 resets 15h · credits 16% of $60</quota>
Each window is used% / elapsed%, with the lead between them. That pairing is the whole point: 92% used is alarming four minutes into a window and completely unremarkable four hours and fifty minutes in. Only the lead is actionable, so only the lead triggers advice:
<quota-advice>The session quota is 60% used with only 20% of its window elapsed
(running 40 points ahead of the clock). Spend the remaining budget deliberately:
prefer targeted reads and edits over broad exploration, avoid long autonomous
runs and parallel subagents unless the user asks for them.</quota-advice>
When a window crosses 95% the advice switches to wrapping up — finish or hand off what is in flight — because at that point pace no longer matters.
Roughly 30 tokens per report, and reports are rare: after the first one, a
window has to move report_delta_percent points or change pace state.
check returns the full picture on demand, which is what you want before
starting something expensive:
session 71%/64% +7 resets 1h48m · weekly 92%/89% +3 resets 15h · credits 16% of $60
- session 71%/64% +7 resets 1h48m
- weekly 92%/89% +3 resets 15h [critical]
- extra-usage credits 16% ($9.33 of $60)
Pace: OK
Trend over the last 5h (12 polls): session +48, weekly_all +6
(from cache, 2m old)
Arguments: refresh (ask for a fresher poll, still rate-budget bound) and
history_hours (movement over that span, from locally recorded polls).
/plugin marketplace add gmatiukhin/claude-code-extras
/plugin install quota@claude-code-extras
Nothing to configure: it reads the OAuth token Claude Code already keeps in
~/.claude/.credentials.json (honouring CLAUDE_CONFIG_DIR). API-key installs
have no such token and the plugin stays silent.
GET https://api.anthropic.com/api/oauth/usage allows about five calls per
five minutes per OAuth token, then answers 429 with Retry-After: 300.
That budget is per token, and every Claude Code session on the machine shares
one token file — so a naive per-session poller with three windows open would
lock out /usage for everyone.
Hence:
poll_interval_seconds (default 300), so the plugin uses
about a fifth of the budget and leaves the rest for /usage and your own
scripts.mkdir, which is atomic on every platform, reclaimed after
30 s in case a poller was killed.429 is expected, not exceptional. The lockout is recorded with exactly
the Retry-After the server gave, and until it expires nothing polls. The
last good reading is still served, labelled with its age and the backoff.Node's built-in fetch ignores HTTP_PROXY/HTTPS_PROXY unless the process
was started with NODE_USE_ENV_PROXY=1 — and that is read at startup, so a
script cannot set it for itself, while an inline VAR=1 node … hook command is
not portable to Windows. Behind a proxy the request then does not merely fail:
it goes out direct and comes back 403 from the CDN, which looks exactly like
a broken token.
So scripts/request.mjs does its own proxying: a CONNECT tunnel for https,
the absolute-URI form for http, NO_PROXY honoured, TLS verified against the
real hostname so the proxy cannot read the token. Standard variable precedence
(https_proxy → HTTPS_PROXY → http_proxy → HTTP_PROXY).
Read-only, re-read on every poll, never written. The access token expires
roughly hourly and Claude Code refreshes it; a second refresher would rotate
the refresh token out from under it — which is exactly how the sibling
claude-usage project once destroyed a year-long token.
npx claudepluginhub danya02/claude-code-extras --plugin quotaBuilt 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