claude-usage
Skill0 starsChanged 5 months agoMITView on GitHub
Check how much of the user's Claude (Anthropic) usage limit is consumed — the 5-hour session window and 7-day rolling limits. Use when the user asks "where am I on my usage", "how much usage do I have left", "am I close to my limit", "check my Claude usage/rate limit", or similar. ALSO use to budget a session against the limit — when the user says things like "use 10% of my limit on this", "spend up to a quarter of my usage", or "use my whole limit thinking this through": check usage to set a ceiling, then poll as you work and stop at the budget. Fetches live data from the same OAuth endpoint Claude Code's /usage command uses.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- jakeonrails/claude-usagetheir own version, first seen Aug 12, 2026
- pionion-ai/quotabartheir own version, first seen Aug 4, 2026
- tdimino/claude-code-minoantheir own version, first seen Apr 16, 2026
- lucasmocellin/claude-skillstheir own version, first seen Apr 12, 2026
- thaitype/skillstheir own version, first seen Mar 15, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- tdimino/claude-code-minoan★ 41same name
- thaitype/skills★ 13same name
- jakeonrails/claude-usage★ 1same name
- lucasmocellin/claude-skills★ 0same name
- pionion-ai/quotabar★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Run it, then relay the result to the user.
- Very specific: line 27
When the user frames a task as a usage budget — "use 10% of my limit on this", "spend up to a quarter of my usage", "use my whole limit …
- Very specific: line 32
Set the ceiling: Run the script to read the current five_hour utilization.
- Distinctive: line 37
Work in chunks, then poll: Do a meaningful slice of the task, then re-run the script to see where utilization landed.
- Very specific: line 43
Stop at the ceiling: When five_hour reaches the target, wrap up: summarize what got done and what remains.
- Very specific: line 47
Watch the 7-day too: If seven_day would cap out first, stop there and say so — the weekly limit is the real wall.
- Distinctive: line 50
If the user gives no budget, don't impose one.
- Distinctive: line 59
Do not use "the tool is a lagging indicator" or "it's unreliable" as a reason to stop a budgeted session early or to guess at the …
- Distinctive: line 71
It settles within a few seconds: after a burst of usage and then reads steady at the correct value.
- Distinctive: line 92
If the API returns a 401, the access token has expired — Claude Code refreshes it on next launch.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Claude usage check
Report the user's current Claude usage against their limits by running the
bundled script. It reads the Claude Code OAuth token from the macOS Keychain
and queries https://api.anthropic.com/api/oauth/usage (the endpoint behind
the built-in /usage command).
How to run
bash ~/.claude/skills/claude-usage/usage.sh # human-readable summary
bash ~/.claude/skills/claude-usage/usage.sh --json # raw JSONRun it, then relay the result to the user. Lead with the headline numbers (5-hour session % and 7-day %), note the reset times, and flag anything notable (e.g. close to a limit, or extra-usage billing disabled meaning a hard stop).
Budgeted sessions
When the user frames a task as a usage budget — "use 10% of my limit on this",
"spend up to a quarter of my usage", "use my whole limit thinking this
through" — treat the 5-hour session window (five_hour) as the meter,
since that's the one a single working session actually moves. Steps:
- Set the ceiling. Run the script to read the current
five_hourutilization. A budget of N% means N more percentage points, so the ceiling iscurrent + N(cap at 100). "Use my whole limit" → ceiling 100%. Tell the user the baseline and the target before you start (e.g. "5-hour is at 8% now; I'll work until ~18%"). - Work in chunks, then poll. Do a meaningful slice of the task, then re-run the script to see where utilization landed. Poll between chunks rather than after every action — roughly every few tool-heavy turns — because the meter moves in 1-point steps and a single session moves it slowly (it takes hundreds of thousands of tokens to move a few points), so checking after every turn just shows the same number.
- Stop at the ceiling. When
five_hourreaches the target, wrap up: summarize what got done and what remains. Don't blow past the budget — and don't stop short of it either. Keep working and re-polling until the meter actually reaches the ceiling. - Watch the 7-day too. If
seven_daywould cap out first, stop there and say so — the weekly limit is the real wall.
If the user gives no budget, don't impose one.
The meter is accurate — do not dismiss it
This has been verified empirically (refreshing the official usage page and the script side by side while burning tokens): the script reports the exact same number as Anthropic's official usage page, because it reads the same backend endpoint. It is not a lagging, unreliable, or merely-approximate indicator.
Do not use "the tool is a lagging indicator" or "it's unreliable" as a reason to stop a budgeted session early or to guess at the percentage instead of reading it. That reasoning is wrong, and it is the documented failure mode this skill exists to prevent. If you've been asked to spend a budget, the only way to honor it is to actually run the script and keep going until the number reaches the ceiling — not to stop when it "feels" like enough.
What is true about the meter (none of which makes it unreliable):
- Resolution is 1 percentage point. The endpoint returns integer percents, so sub-1% changes aren't visible. This is the same resolution the official UI shows — it's a granularity limit, not inaccuracy.
- It settles within a few seconds after a burst of usage and then reads steady at the correct value. Re-running the script a few seconds apart and seeing the same number means it has settled, not that it's stuck — trust it.
What the endpoint returns
Each window is a bucket with utilization (percent, 0–100) and resets_at
(ISO timestamp). Key fields:
five_hour— the rolling 5-hour session window.seven_day— the 7-day rolling limit across all models.seven_day_opus/seven_day_sonnet— per-model 7-day buckets. Oftennull(not separately tracked) — report those as "not tracked", not 0%.extra_usage— overage billing.is_enabled: falsemeans usage hard-stops at the limit instead of spilling into paid credits.
Notes
- The token lives in Keychain under service
Claude Code-credentials. If the script can't read it, the user may need to re-authenticate Claude Code. - This is read-only; it never mutates anything.
- If the API returns a 401, the access token has expired — Claude Code refreshes it on next launch.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

