usage

usage is a command for Claude Code from AleksandarBisevac/claude-plugins. It costs 38 tokens per session (2,073 once invoked), scanned A, original, MIT.

A read-only command that reports where tokens were spent in an audit pipeline, including phases, tasks, models, authors, time, caching, cost per task, and usage trends.

In plain words
What is it for?
It is for generating a usage report from a manifest, with optional backfilling of missing usage data.
Why use it?
It helps identify expensive phases, poor cache performance, or unexpected model routing without changing the audit data.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the audit plugin — 2 skills, 21 commands, 4 agents, 5 hooks shipped together

Good fit It is for generating a usage report from a manifest, with optional backfilling of missing usage data.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add AleksandarBisevac/claude-plugins
Claude Code
/plugin install audit

Made for: Claude Code.

Or install audit, the plugin that ships this one along with the rest of its 2 skills, 21 commands, 4 agents, 5 hooks.

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 usage

README.md
[![agentmods](https://agentmods.dev/badge/commands/aleksandarbisevac/claude-plugins/usage/github.svg)](https://agentmods.dev/commands/aleksandarbisevac/claude-plugins/usage)
Your own site
<a href="https://agentmods.dev/commands/aleksandarbisevac/claude-plugins/usage"><img src="https://agentmods.dev/badge/commands/aleksandarbisevac/claude-plugins/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 usage

Your own site · 80×15
<a href="https://agentmods.dev/commands/aleksandarbisevac/claude-plugins/usage"><img src="https://agentmods.dev/badge/commands/aleksandarbisevac/claude-plugins/usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,073 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.00038 $0.02073
Opus 5.5 $0.00015 $0.00829
Sonnet 5.5 $0.00008 $0.00415
Haiku 4.5 $0.00004 $0.00207

Measured 9d ago against content hash 785425e2b523, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 9d 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.

plugins/audit/commands/usage.md · 119 lines

How it starts

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

/audit:usage — where the tokens went

Run

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/usage/audit-usage.py" --format md $ARGUMENTS

Print its stdout verbatim in your own reply — a tool result is collapsed behind the tool call, so running the command is not delivering it. Do NOT re-format, summarize, re-tabulate, or "improve" it. Whether it goes in a code fence depends on the format, and only on that: the default md output is printed unfenced, because it is already markdown (pipe tables, bullets) and a fence would disable the table rendering it exists for; ascii output is printed inside a fenced block, because it is fixed-width text that only lines up in one. The script renders its own final output for a reason: a usage tool that spends a pile of tokens laying out its own tables every time you ask what you spent is self-defeating. Reading the numbers back to the user costs roughly as much as the report describes. Just show it. (A user-supplied --format ascii in the arguments wins over the default above — argparse takes the last occurrence; print that verbatim too, fenced as said above.)

The only thing worth adding is a single line of interpretation when something in the output is genuinely notable — a phase that cost several times its peers, a cache hit rate that collapsed, a model routed somewhere it shouldn't be. Otherwise say nothing.

Read-only: this never takes the audit lock and never touches the manifest. The one exception is --backfill, which rewrites the monthly ledger files and takes the shared usage lock for the duration — the same claim, in the same place, that audit-lock.py status and /audit:doctor report. That lock excludes only another backfill. The metering hook runs on every turn and never takes it. What it takes instead is the month's own lock, across each append's open, write and close; the backfill takes that same lock only around each month's last read and replace. So while a month is swapped no appender is mid-write or holding the file open, appending goes on through the rebuild, and the rows appended since the backfill read the month are carried into the new file — those of sessions it did not re-read. A project with no git repository has no lock scheme at all; there the backfill says so in its own output rather than inventing a guard nothing else can see.

What that still leaves open, stated rather than implied closed:

  • A session the backfill re-reads, metered while it runs — another session of this project ending a turn in the window. Its rows from the window are dropped with the rest of that session's old rows, and whichever of the hook's cursor and the backfill's is saved last decides whether its next turn re-reads them or skips them, so that session's spend can come out short or doubled. Run --backfill again once no other session of the project is active; it rebuilds every session it reads from the transcripts. The session running the backfill is exposed only through a subagent of its own finishing in the window: its own Stop metering runs when the turn ends, after the backfill has finished.
  • A writer that does not take the month's lock — an append that could not have it within its wait and wrote anyway, a filesystem that refuses locks altogether, or a copy of the hook older than the lock. If it opened the month file before the replace and writes after it, the backfill reads that row through a descriptor it held across the replace, until a short settle period passes with no byte added and no half-written line waiting, with a bounded number of re-checks. A row such a writer lands after that is lost. On a platform that refuses to replace an open file there is no descriptor to read after the replace: the backfill reads the old file one last time, closes it and replaces it, so a row such a writer lands between that read and the replace is lost. An append that takes the lock is never lost this way.

A month with no file yet is created empty before its rebuild and held the same way, so a row the hook appends while the backfill writes that month is carried like any other.

Read the full file on GitHub · 119 lines

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. 9d ago Changed · +38 lines 785425e2b523
  2. 1mo ago Changed · +4 lines d388c8152e3d
  3. 1mo ago Changed · +2 lines b90c21096e3a
  4. 1mo ago Changed 58a09c3aab23
  5. 1mo ago First seen · 75 lines · 38 tokens per session scan A 598948bdb574

Subscribe to this mod's changes

usage is a command published in the GitHub repository AleksandarBisevac/claude-plugins (4 stars, last pushed 3d ago), licensed MIT. It adds 38 tokens to every session and 2,073 once invoked, about $0.0002 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-08-31.