code-review

code-review is a command for Claude Code from LeahyCC/claude-skills. It costs 0 tokens per session (3,238 once invoked), scanned A, original, MIT.

A code-review command that examines the changes in a Git diff, which is a list of code added, removed, or modified. It checks those changes against security guidance from OWASP and the project's relevant skills.

In plain words
What is it for?
Use it to review staged or unstaged changes for issues involving APIs, authentication, input validation, middleware, server actions, and other applicable areas.
Why use it?
It keeps the review focused on the current change instead of producing warnings about unrelated existing code, while also suggesting fixes.

Command for Claude Code

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

Part of the claude-skills plugin — 7 skills, 1 command shipped together

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.

agentmods
npx agentmods add commands/leahycc/claude-skills/code-review
Clone the repo
git clone --depth 1 https://github.com/LeahyCC/claude-skills

Made for: Claude Code.

Or install claude-skills, the plugin that ships this one along with the rest of its 7 skills, 1 command.

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 code-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/leahycc/claude-skills/code-review.svg)](https://agentmods.dev/commands/leahycc/claude-skills/code-review)
Your own site
<a href="https://agentmods.dev/commands/leahycc/claude-skills/code-review"><img src="https://agentmods.dev/badge/commands/leahycc/claude-skills/code-review.svg" alt="Measured on agentmods" 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 3,238 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.03238
Opus 5 $0.00000 $0.01619
Sonnet 5 $0.00000 $0.00648
Haiku 4.5 $0.00000 $0.00324

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

Security

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 5d 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/code-review.md · 255 lines

How it starts

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

Code Review — Deep & Thorough

OWASP-mapped, skill-aware code review with autofix suggestions. Reviews the diff, not the world.

Phase 1: Gather Context (30 seconds max)

Run these in parallel:

  • git diff --staged --unified=5 and git diff --unified=5 — the actual changes
  • git diff --staged --name-only and git diff --name-only — changed file list
  • git log --oneline -5 — recent commits for intent context
  • If no diff exists, use git diff HEAD~1 --unified=5 instead

Scope rule: Only review changed lines and their immediate context (5 lines above/below). Never flag issues in unchanged code unless they are CRITICAL security vulnerabilities introduced by the change's new dependencies.

Phase 2: Classify Changed Files

For each changed file, tag it with applicable review domains:

File Pattern Tags Review Focus
route.ts, api/** api, security OWASP API1-10, auth, input validation, CORS
actions.ts, action.ts, **/actions/** server-action, security Auth in every action, input validation, IDOR
proxy.ts, middleware.ts middleware, security Auth gate, CSP, rate limiting
*.tsx, *.jsx react Hooks, a11y, rendering, client/server boundary
next.config.* config, security Security headers, image domains, redirects
data/**, lib/db*, lib/auth* dal, security DAL pattern, parameterized queries, DTOs
*.test.*, *.spec.* test Coverage, assertion quality, mocking patterns
package.json, pnpm-lock.*, package-lock.* deps New dependencies, version changes, audit
*.css, *.scss, tailwind.* styles a11y (contrast, motion), reflow
*.sql, migrations/** database Injection, permissions, rollback safety

Phase 3: Security Review (OWASP-Mapped)

For every file tagged security, api, server-action, middleware, or dal, check against these OWASP categories. Cite the category ID in every finding.

CRITICAL — Must Block

Read the full file on GitHub · 255 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. 5d ago First seen · 255 lines · 0 tokens per session scan A fd4bd862e74e

Subscribe to this mod's changes

code-review is a command published in the GitHub repository LeahyCC/claude-skills (3 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,238 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-31.