usage-monitor-for-claude: Command for Claude Code

.claude/commands/review.md

review is a command for Claude Code from jens-duttke/usage-monitor-for-claude. It costs 13 tokens per session (1,102 once invoked), scanned A, original, MIT.

A structured review process for staged code changes, documentation, and cleanup. Staged changes are files selected to be included in the next Git commit.

In plain words
What is it for?
It helps inspect every staged file, review correctness and maintainability, check project instructions, and verify that related names and documentation still match the implementation.
Why use it?
It helps catch incorrect logic, edge cases, invalid state, unnecessary code, naming problems, and outdated comments before changes are committed.

Command for Claude Code

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

This is jens-duttke/usage-monitor-for-claude's own configuration. It tells Claude Code how to work on usage-monitor-for-claude 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 usage-monitor-for-claude configures →

Reuse

Borrowing it

Nothing to install: this file belongs to jens-duttke/usage-monitor-for-claude. 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/jens-duttke/usage-monitor-for-claude/main/.claude/commands/review.md
Clone the repo
git clone --depth 1 https://github.com/jens-duttke/usage-monitor-for-claude

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 review

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/jens-duttke/usage-monitor-for-claude/review"><img src="https://agentmods.dev/badge/commands/jens-duttke/usage-monitor-for-claude/review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,102 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.00013 $0.01102
Opus 5 $0.00006 $0.00551
Sonnet 5 $0.00003 $0.00220
Haiku 4.5 $0.00001 $0.00110

Measured 12d ago against content hash 992092f7c118, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

review 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 12d 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/review.md · 113 lines

How it starts

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

Perform a systematic quality review of all staged changes. Work through the following steps sequentially. Use the full context of this conversation to understand WHY the changes were made.

Step 1: Critical Code Review

Run git diff --staged and critically review EVERY changed file:

Correctness & Logic

  • Are all changes meaningful and actually necessary for the intended implementation?
  • Off-by-one errors, boundary conditions, edge cases (empty inputs, None values, zero-length collections)?
  • State management - can objects be left in invalid states?
  • Order dependencies - do operations assume a specific sequence without enforcing it?

Code Quality

  • Can existing code be simplified or removed as a result of these changes (dead code, duplicates)?
  • Is there optimization potential (performance, readability, maintainability)?
  • Are naming conventions and code style consistent with CLAUDE.md rules?
  • When a comment is corrected because the described behavior changed, check immediately whether the same outdated concept is also encoded in nearby variable, parameter, or function names - and rename them too.
  • No ambiguous names like other, data2, flag - every name must be immediately clear.

Security (especially for changes touching api.py)

  • No credentials in logs, error messages, or anywhere outside HTTP Authorization headers.
  • All URLs and API endpoints are top-level constants - no dynamic URL construction.
  • No eval(), exec(), compile(), or dynamic imports.
  • No file write operations (the app is read-only).
  • No obfuscation, no base64-encoded strings, no encoded URLs or tokens.
  • Network communication exclusively with api.anthropic.com.

Concurrency & Resource Management

  • Race conditions in threading code (check-then-act patterns, shared mutable state)?
  • Proper cleanup of resources in error paths (context managers, finally blocks)?
  • Timeout handling on blocking operations?

Error Handling & Resilience

  • Proper input validation at function boundaries?
  • Early returns and guard clauses used consistently?
  • Error messages provide enough context for debugging without leaking sensitive data?

Read the full file on GitHub · 113 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. 12d ago First seen · 113 lines · 13 tokens per session scan A 992092f7c118

Subscribe to this mod's changes

review is a command published in the GitHub repository jens-duttke/usage-monitor-for-claude (282 stars, last pushed 2d ago), licensed MIT. It adds 13 tokens to every session and 1,102 once invoked, about $0.0001 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-30.