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.
npx agentmods add commands/halflength-ampleness75/claude-code-recipes/code-reviewgit clone --depth 1 https://github.com/halflength-ampleness75/claude-code-recipesWrote 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.
[](https://agentmods.dev/commands/halflength-ampleness75/claude-code-recipes/code-review)<a href="https://agentmods.dev/commands/halflength-ampleness75/claude-code-recipes/code-review"><img src="https://agentmods.dev/badge/commands/halflength-ampleness75/claude-code-recipes/code-review.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00013 | $0.00652 |
| Opus 5 | $0.00006 | $0.00326 |
| Sonnet 5 | $0.00003 | $0.00130 |
| Haiku 4.5 | $0.00001 | $0.00065 |
Grade A, and why
code-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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a senior code reviewer. Review the currently staged git changes and produce a structured report.
Step 1 — Gather the Diff
Run git diff --cached to get the staged changes. If nothing is staged, fall back to git diff for unstaged changes. If both are empty, inform the user there is nothing to review and stop.
Also run git diff --cached --stat to get a file-level summary of what changed.
Step 2 — Analyze Each Changed File
For every file in the diff, check for the following categories of issues. Read the full file when surrounding context is needed to understand a change.
Bug Risk
- Off-by-one errors, null/undefined dereferences, race conditions
- Incorrect logic (inverted conditions, wrong operator, missing break/return)
- Resource leaks (unclosed handles, missing cleanup)
- Type mismatches or unsafe casts
Security
- SQL injection, command injection, path traversal
- Hardcoded secrets, API keys, or credentials
- Missing input validation or sanitization
- Insecure use of cryptography or random number generation
- Exposed stack traces or verbose error messages in production paths
Performance
- O(n^2) or worse algorithms where O(n) or O(n log n) is possible
- Unnecessary allocations inside hot loops
- Missing pagination or unbounded queries
- Synchronous I/O blocking an async context
Code Quality & Style
- Dead code, unused imports, unreachable branches
- Functions longer than 40 lines that should be decomposed
- Inconsistent naming conventions
- Missing or misleading comments
- Duplicated logic that should be extracted
Error Handling
- Swallowed exceptions (empty catch blocks)
- Missing error propagation
- Generic catches that mask specific failures
- Missing validation at public API boundaries
Test Coverage
- New logic paths that lack corresponding tests
- Modified behavior without updated tests
Step 3 — Produce the Report
Output a Markdown report in this exact structure:
## Code Review Report
**Files reviewed:** (count)
**Issues found:** (count)
### Critical (must fix before merge)
- [ ] **[FILE:LINE]** [Category] — Description of the issue and suggested fix
### Warning (should fix)
- [ ] **[FILE:LINE]** [Category] — Description and suggestion
### Nit (optional improvement)
- [ ] **[FILE:LINE]** [Category] — Description and suggestion
### Positive Notes
- Anything done well that is worth calling out
### Summary
One-paragraph overall assessment: is this diff safe to merge, or does it need 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.
- 3d ago First seen · 88 lines · 13 tokens per session scan A e8a9d9b6df67
code-review is a command published in the GitHub repository halflength-ampleness75/claude-code-recipes (2 stars, last pushed 4d ago), licensed MIT. It adds 13 tokens to every session and 652 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-31.
Other commands, from other repositories
coograph-verify
Verify that the described work is complete and correct. Provide evidence for every claim. You verify — you do not implement or fix style.
prune
Trim transcript clutter to extend session lifetime — analyze, prune a copy, or toggle the after-each-turn service. Dry-run by default; gains land at resume/compaction, not the current turn.
add-dep
Vet a new or changed third-party dependency for license, provenance, and supply-chain risk before any install runs.
conflict
Stop everything and surface a rule conflict — persona vs. docs vs. code. Present both sides and the conflict-hierarchy level; the user resolves. No silent reconciliation.
status
Show the project's current state at a glance — stage, open tasks, open questions, overrides since the last checkpoint, current branch. Read-only.
commit
Run the full commit gate — the only sanctioned path to a git commit.