ai-usage

ai-usage is a skill for Claude Code from mcw-wellness/ai-dev-blueprint. It costs 80 tokens per session (555 once invoked), scanned A, original, MIT.

A read-only command-line tool that reports Claude Code and Codex usage across local profiles. It shows account details, login expiry, percentage-based limits, and reset times; it does not provide raw token counts or refresh logins.

In plain words
What is it for?
It is for checking session, weekly, per-model, credit, and extra-usage limits, spotting expired or soon-to-expire logins, and seeing profiles that share an account.
Why use it?
When several profiles or accounts exist, it can be difficult to know which quota is nearly full or whether switching profiles will help. This gathers the relevant usage and login status in one place.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code; reads ~/.codex paths.

Good fit It is for checking session, weekly, per-model, credit, and extra-usage limits, spotting expired or soon-to-expire logins, and seeing profiles that share an account.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mcw-wellness/ai-dev-blueprint/ai-usage
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 mcw-wellness/ai-dev-blueprint --skill ai-usage
Clone the repo
git clone --depth 1 https://github.com/mcw-wellness/ai-dev-blueprint

Made for: Claude Code.

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 ai-usage

README.md
[![agentmods](https://agentmods.dev/badge/skills/mcw-wellness/ai-dev-blueprint/ai-usage/github.svg)](https://agentmods.dev/skills/mcw-wellness/ai-dev-blueprint/ai-usage)
Your own site
<a href="https://agentmods.dev/skills/mcw-wellness/ai-dev-blueprint/ai-usage"><img src="https://agentmods.dev/badge/skills/mcw-wellness/ai-dev-blueprint/ai-usage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-usage

Your own site · 80×15
<a href="https://agentmods.dev/skills/mcw-wellness/ai-dev-blueprint/ai-usage"><img src="https://agentmods.dev/badge/skills/mcw-wellness/ai-dev-blueprint/ai-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 555 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.00080 $0.00555
Opus 5.5 $0.00032 $0.00222
Sonnet 5.5 $0.00016 $0.00111
Haiku 4.5 $0.00008 $0.00056

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

Security

Grade A, and why

ai-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 (ai-usage.py), 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.

skills/ai-usage/SKILL.md · 44 lines

What it actually says

AI usage across profiles

Run:

python3 ~/.claude/skills/ai-usage/ai-usage.py

It discovers every Claude profile (~/.claude, ~/.claude-*) and Codex profile (~/.codex, ~/.codex-*) on this machine and, per profile, prints: logged-in email and plan, login expiry, and each limit's % used with its reset time (session 5h, weekly, per-model weekly such as Fable, Codex primary/secondary windows, credits, extra usage).

Answering

  • Answer the question asked from the output — don't paste the whole dump. A table per product (profile · account · used % · resets · login expiry) is usually right.
  • Surface what needs action: a limit ≥ 90% or reached, an expired or missing login, a login expiring within a week.
  • Point out profiles that share one account (same email) — they share one quota, so "switching profile" to escape a limit won't work.
  • "Token consumption" here means % of each limit used; raw per-token counts are not available from this script.

Behaviour and limits

  • Read-only. It never refreshes tokens — refreshing would rotate them out from under the CLI. An expired access token is reported with the fix (run claude / codex in that profile once).
  • Unofficial endpoints (api.anthropic.com/api/oauth/usage, chatgpt.com/backend-api/wham/usage) — the same ones /usage and CodexBar use. If they change, the script prints ERROR for the profile and exits 1; report that rather than guessing numbers.
  • macOS only for Claude: credentials are read from the Keychain item Claude Code-credentials[-<sha256(config dir)[:8]>]. Codex homes need cli_auth_credentials_store = "file" (credentials in auth.json).
  • First run may trigger a Keychain access prompt per profile — "Always Allow".
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 · 44 lines · 80 tokens per session scan A dcb19ec3bfc2

Subscribe to this mod's changes

ai-usage is a skill published in the GitHub repository mcw-wellness/ai-dev-blueprint (2 stars, last pushed 2d ago), licensed MIT. It adds 80 tokens to every session and 555 once invoked, about $0.0003 per session on Opus 5.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-11-09.

Related

ai-usage compared with skills from other repositories

ai-usage next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ai-usagemcw-wellness/ai-dev-blueprintSkill22d agoMITA80Claude Code
orbit-notionnexu-io/open-designSkill107ktodayApache-2.0A117Claude Code, Codex
agentmailpaperclipai/paperclipSkill113ktodayMITA30Claude Code, Codex
rowboat-spacesrowboatlabs/rowboatSkill18ktodayApache-2.0A60Claude Code, Codex
Cortexdanielmiessler/LifeOSSkill20k6d agoMITA184Claude Code
pinchtab-mcppinchtab/pinchtabSkill11ktodayMITA52Claude Code, Codex
feishuHmbown/CodeWhaleSkill41k3d agoMITA33Claude Code, Codex