usage

A usage reporter for Claude Code’s current request quota. It reads the five-hour and seven-day limits, their reset times, and whether requests are allowed, nearing a limit, or rejected.

In plain words
What is it for?
Use it when checking quota, rate limits, reset times, or whether an automated workflow should continue running.
Why use it?
It replaces estimates with the quota information reported by Claude Code’s own service responses. Cached results also avoid repeatedly checking unchanged usage data.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/dburkart/auto-engineer/usage
Any agent
npx skills add dburkart/auto-engineer --skill usage
Clone the repo
git clone --depth 1 https://github.com/dburkart/auto-engineer

Made for: Claude Code, Codex.

Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 732 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00070 $0.00732
Opus 5 $0.00035 $0.00366
Sonnet 5 $0.00014 $0.00146
Haiku 4.5 $0.00007 $0.00073

Measured 2d ago against content hash ca449fc24c94, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

usage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (probe.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/usage/SKILL.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

usage

The authoritative source for session-quota state is the set of anthropic-ratelimit-unified-* response headers Anthropic attaches to every /v1/messages call. Claude Code reads them into memory and feeds them to its statusline — they are the real numbers, not an estimate.

Since that state lives only in the running Claude Code process, this skill fetches it by making a minimal 1-token probe call and parsing the headers. Result is cached for 60s at ~/.claude/cache/usage-probe.json so repeat invocations are free.

Primary command

bash .claude/skills/usage/probe.sh

(Add --force to bypass the 60s cache.)

Output is a single-line JSON like:

{"http":200,"fetched_at":1776054016,
 "5h":{"utilization":0.38,"resets_at":1776056400,"status":"allowed"},
 "7d":{"utilization":0.33,"resets_at":1776567600,"status":"allowed"},
 "overage":{"utilization":0.0,"resets_at":1777593600,"status":"allowed"}}

Fields: utilization is 0..1+ (can exceed 1 when the window is over-consumed), resets_at is Unix epoch seconds, status is allowed / allowed_warning / rejected.

Output format

Always emit these two machine-readable lines first (auto-engineer step 9 parses them):

remaining_pct: <max(0, 100 - 5h.utilization*100), rounded to 1 decimal>
reset_ts: <ISO-8601 of 5h.resets_at>

Then a short human summary: 5h %, 7d %, overage %, each window's status, time-until-reset, and a note if status=rejected (Claude Code is currently blocked on that limit until reset).

Fallback

If the probe returns an error (no credentials, non-200, missing headers), fall back to ccusage:

npx -y ccusage blocks --active --token-limit max --json

Label fallback output clearly as estimated — ccusage benchmarks against the user's all-time largest block, not the plan's real cap, so its percentage is routinely off vs. the probe. Use projection.remainingMinutes and endTime from .blocks[0].

Caveats

  • The probe costs one tiny Haiku call (~22 in / 1 out, well under $0.001). The 60s cache keeps this negligible.
  • overage appears only on plans where extra-usage is enabled; absent otherwise.
  • If the user is fully rate-limited (5h.status == "rejected"), the probe itself still succeeds — Anthropic returns headers on 200s and rejects only subsequent inference calls. If it ever fails with 429, report remaining_pct: 0 and surface the cached reset_ts from a prior probe if one exists.

Read the full file on GitHub · 57 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 57 lines · 70 tokens per session scan A ca449fc24c94

Subscribe to this mod's changes

usage is a skill published in the GitHub repository dburkart/auto-engineer (5 stars, last pushed 4mo ago), licensed BSD-3-Clause. It adds 70 tokens to every session and 732 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens