agentleFS
ratacatratacat/ratacats-skills/skills/show-usage/SKILL.md

show-usage

Skill9 starsChanged 4 months agoMITView on GitHub

Show rate-limit and quota usage across the user's AI coding subscriptions (Claude, Codex, Gemini, Kimi, MiniMax, Z.ai, Qwen, Grok) with per-window percent used and time to reset. Use when the user asks about usage, quotas, rate limits, or when subscriptions reset.

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run python3 <skill dir>/usage.py.

    line 40
  2. Distinctive:

    Ask the user: any other subscriptions to include, and whether the detected set is right.

    line 41
  3. Very specific:

    Run python3 <skill dir>/usage.py, print its stdout exactly, and exit.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Show Usage

usage.py in this skill folder reads every subscription and prints the report. Print its output as is.

Tools

usage.py calls these tools. Install any that are missing:

ToolInstallReads
aitcargo install aitracker --locked (needs Rust)Codex, once per ~/.codex* folder that has an auth.json
aiquokkago install github.com/McKean/aiquokka@latest (needs Go; binary at ~/go/bin/aiquokka)Kimi (KIMI_API_KEY)
qwencloudnpm install -g @qwencloud/qwencloud-cliQwen free tier (needs qwencloud login once)
ompnever install; used only if already on PATHZ.ai, Grok

usage.py reads the rest itself: Claude from each ~/.claude* folder that has a .credentials.json, Gemini from each VibeProxy login ~/.cli-proxy-api/antigravity-*.json, and MiniMax with MINIMAX_API_KEY.

First run

  1. Install missing tools.
  2. Run python3 <skill dir>/usage.py. Its stderr names each source that failed (bad key, needs login, no plan).
  3. Ask the user: any other subscriptions to include, and whether the detected set is right.
  4. Record the confirmed list in ~/.config/show-usage/providers, one per line, from claude, codex, gemini, kimi, zai, minimax, grok, qwen. usage.py reads only the listed providers.

Every run

Run python3 <skill dir>/usage.py, print its stdout exactly, and exit. No notes, no follow-up questions.

Claude (cheshire)
  5h                 32% used   0h 8m
  weekly             86% used   18h 38m
  fable-weekly       10% used   18h 38m

Codex (cheshire)
  7-day               4% used   6d 16h

MiniMax
  general-5h          1% used   4h 38m
  general-weekly      0% used   2d 23h

A window with no time has not started; its clock starts on first use.

JSON

usage.py --json prints one usage reading per line:

{"usage": "codex:cheshire", "window": "7d", "used": 4.0, "resetsAt": "2026-10-29T17:12:46Z"}
  • usage names the account: the provider, and the login name when the provider has several logins (claude:cheshire, codex:cheshire, minimax).
  • window is the window length, with the model group after a colon when the window counts only some models (5h, 7d, 7d:fable).
  • used is a percent. resetsAt is UTC, or null.

SourceWalk's account queue runs it (usageCommand in ~/.sourcewalk/capacity.yaml) and matches accounts and reserves by these ids. Keep them stable.

Changing usage.py

  • A program can run it as /usr/bin/python3 (3.9) with a short PATH, so use no newer syntax, and find tools in ~/go/bin, ~/.cargo/bin, and ~/.bun/bin too.
  • SourceWalk kills a run after 60 seconds. So --json prints each account's lines when its source is done, and each tool call stops after 45 seconds.
  • Codex refresh tokens are single-use. ait only reads auth.json and never refreshes it. Never add a Codex refresh, and never share a CODEX_HOME folder between two tools that refresh.
  • Claude Code keeps each login in <config dir>/.credentials.json, not the keychain. usage.py refreshes an expired token and writes it back to that file, so Claude Code reads the new token.
  • MiniMax interval windows are fixed 5-hour blocks in UTC, and the last block of the day is 4 hours. The text label gives the real length (general-4h). The JSON window stays 5h.
  • Gemini needs the current Antigravity version in its User-Agent. An old version gets only the Claude and GPT group.
  • Qwen prints one free-tier line: the highest used_pct of the models with status valid, and the earliest resetDate.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.