AIUsageTracker: Command for Claude Code

.claude/commands/papi-audit.md

papi-audit is a command for Claude Code from rygel/AIUsageTracker. It costs 0 tokens per session (303 once invoked), scanned A, original, MIT.

A branch-review command that checks recent code changes for bugs, project rule violations, and outdated documentation. It uses the conventions written in CLAUDE.md, a project instruction file.

In plain words
What is it for?
Reviewing changed files, checking naming, types, errors, and imports, and reporting each finding with its file, line, severity, problem, and suggested fix.
Why use it?
It helps catch problems before the changes are merged, including overlooked edge cases and documentation that no longer matches the code.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is rygel/AIUsageTracker's own configuration. It tells Claude Code how to work on AIUsageTracker itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything AIUsageTracker configures →

Reuse

Borrowing it

Nothing to install: this file belongs to rygel/AIUsageTracker. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/rygel/AIUsageTracker/main/.claude/commands/papi-audit.md
Clone the repo
git clone --depth 1 https://github.com/rygel/AIUsageTracker

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 papi-audit

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/rygel/aiusagetracker/papi-audit"><img src="https://agentmods.dev/badge/commands/rygel/aiusagetracker/papi-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 303 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.00000 $0.00303
Opus 5.5 $0.00000 $0.00121
Sonnet 5.5 $0.00000 $0.00061
Haiku 4.5 $0.00000 $0.00030

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

Security

Grade A, and why

papi-audit 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 1mo 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.

.claude/commands/papi-audit.md · 35 lines

What it actually says

Audit the latest changes in this branch for bugs and compliance with the project's conventions defined in CLAUDE.md.

Steps

  1. Identify changed files: Run git diff main --name-only to find all files modified on this branch.

  2. Read each changed file and review it for:

Bug check

  • Logic errors, off-by-one mistakes, incorrect conditions
  • Unhandled edge cases (null, undefined, empty inputs)
  • Race conditions or state management issues
  • Functions that could throw but aren't wrapped in try/catch where needed
  • Incorrect type narrowing or unsafe casts

Code style (from CLAUDE.md)

  • Check all conventions defined in CLAUDE.md and flag any violations
  • Pay special attention to naming, typing, error handling, and import patterns

Documentation check

  • For each changed source file, check if any documentation in docs/ describes behaviour that the change modified
  • If a doc needs updating, report it as a finding with severity "Doc drift"
  1. Report findings in this format:

For each issue found:

  • File: path and line number
  • Severity: Bug / Convention violation / Nitpick
  • Issue: What's wrong
  • Fix: How to fix it

If no issues are found, state that the changes are clean.

  1. Note pre-existing issues separately — flag them but don't fix them unless they interact with the new changes.
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. 1mo ago First seen · 35 lines · 0 tokens per session scan A 1ca7dfef2767

Subscribe to this mod's changes

papi-audit is a command published in the GitHub repository rygel/AIUsageTracker (48 stars, last pushed 7d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 303 tokens. 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-30.