quota

quota is a skill for Claude Code from aweussom/claude-code-quota. It costs 45 tokens per session (1,104 once invoked), scanned A, original, MIT.

A skill that reads the local Claude Code quota cache and reports API usage limits. It covers the current five-hour session, weekly usage, separate scoped limits, reset times, data freshness, errors, and version information.

In plain words
What is it for?
Use it when checking usage, remaining capacity, reset times, scoped model limits, cache age, or quota-fetch errors.
Why use it?
It shows how much capacity remains and explains whether displayed quota data is stale or invalid.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the claude-code-quota plugin — 1 skill shipped together

Good fit Use it when checking usage, remaining capacity, reset times, scoped model limits, cache age, or quota-fetch errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aweussom/claude-code-quota/quota
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.

Any agent
npx skills add aweussom/claude-code-quota --skill quota
Clone the repo
git clone --depth 1 https://github.com/aweussom/claude-code-quota

Made for: Claude Code.

Or install claude-code-quota, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for quota

README.md
[![agentmods](https://agentmods.dev/badge/skills/aweussom/claude-code-quota/quota.svg)](https://agentmods.dev/skills/aweussom/claude-code-quota/quota)
Your own site
<a href="https://agentmods.dev/skills/aweussom/claude-code-quota/quota"><img src="https://agentmods.dev/badge/skills/aweussom/claude-code-quota/quota.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,104 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00045 $0.01104
Opus 5 $0.00023 $0.00552
Sonnet 5 $0.00009 $0.00221
Haiku 4.5 $0.00005 $0.00110

Measured 8d ago against content hash 61aa7070d71b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

quota 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 8d ago.

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.

skills/quota/SKILL.md · 96 lines

What it actually says

Read ~/.claude/quota-data.json and display a clear summary of current Claude API quota status.

Show:

  • 5-hour session: % used, resets in (time remaining)
  • Weekly limit: % used, resets in (time remaining)
  • Scoped limits: every entry in scoped_limits (if the array is present and non-empty) as label: % used, plus its resets_at. These are separate allowances from the 5h and weekly buckets — a scoped limit at 90% does not mean the weekly limit is at 90%, and hitting it restricts only that model or surface. Call out any entry whose severity is above normal. Omit the section entirely when the array is absent or empty.
  • Data age: when was it last successfully fetched
  • Status: fresh / stale (with how long it's been stale)
  • Error: if stale or not valid, always show the error (or stale_reason) field — it says why the last fetch failed (e.g. expired OAuth token, network error, rate limit) and is the answer to "what does the ⚠ in my statusline mean?"
  • Version: the lib_version field, if present (installed claude-code-quota version)

If scoped_limits is missing while the rest of the data is present, the cache was written from a source that cannot see scoped limits — check source_url and say so rather than reporting "no scoped limits".

Keep the output compact — one or two lines is ideal.


If the file is missing or the data is stale, explain that the statusline script populates it automatically. To trigger an immediate fetch manually:

On Windows (PowerShell):

. "$env:USERPROFILE\.claude\quota-lib.ps1"; Invoke-QuotaGet -Ttl 0

On Linux / WSL2 (bash):

source ~/.claude/quota-lib.sh && quota_get 0

If the quota library is not installed at all (~/.claude/quota-lib.ps1 on Windows, ~/.claude/quota-lib.sh on Linux is missing), the user has the skill but not the statusline integration. Offer to set it up: locate the claude-code-quota source directory (if installed as a plugin, search under ~/.claude/plugins for a directory containing install.ps1; otherwise it is the cloned repo) and run install.ps1 (Windows) or install.sh (Linux) from there — or follow the manual integration steps in its README.md.


If the user asks how to add quota to their existing statusline script, show them how to dot-source quota-lib.ps1 and use $QuotaResult. Use the absolute path to the lib (forward slashes, no %USERPROFILE%), for example:

# Near the top of your statusline script, before building output:
$libPath = "C:/Users/<you>/.claude/quota-lib.ps1"   # use your actual path
if (Test-Path $libPath) {
    . $libPath
    $ttl = 300
    if ($session.transcript_path -and (Test-Path $session.transcript_path)) {
        $tAge = ([DateTimeOffset]::UtcNow -
                 (Get-Item $session.transcript_path).LastWriteTimeUtc).TotalSeconds
        if ($tAge -lt 300) { $ttl = 60 }
    }
    Invoke-QuotaGet -Ttl $ttl
}

# Then in your output section:
$q = $QuotaResult['pct']        # "68"  (5-hour % used)
$r = $QuotaResult['resets_in']  # "1 hr 12 min"
$w = $QuotaResult['weekly_pct'] # "31"  (7-day % used)
# $QuotaResult['stale'] is "true" if the last fetch failed
# $QuotaResult['error'] says why it failed, or "" — show it when pct is empty

Substitute the user's actual $env:USERPROFILE value for <you>%USERPROFILE% is not expanded by bash (which Claude Code uses to run the statusline command). If the statusline outputs non-ASCII glyphs (like ), it must set [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 near the top, or captured stdout mangles them to ?.

On Linux, the equivalent uses source ~/.claude/quota-lib.sh, quota_get $ttl and the QUOTA_RESULT[] associative array — see the README of claude-code-quota for the full snippet.

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. 8d ago First seen · 96 lines · 45 tokens per session scan A 61aa7070d71b

Subscribe to this mod's changes

quota is a skill published in the GitHub repository aweussom/claude-code-quota (6 stars, last pushed 11d ago), licensed MIT. It adds 45 tokens to every session and 1,104 once invoked, about $0.0002 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.