review-diff

review-diff is a skill for Claude Code from faizkhairi/claude-code-blueprint. It costs 40 tokens per session (1,405 once invoked), scanned A, original, MIT.

A focused checker for scanning changed lines in a Git diff, the record of code changes, for project-specific anti-patterns. It first identifies the project and its framework before applying the relevant checks.

In plain words
What is it for?
Use it to scan unstaged or staged changes, branch comparisons, commit ranges, or individual commits for anti-patterns in the added lines.
Why use it?
It quickly catches known problematic patterns in new code without pretending to be a complete code review. It also reports clearly when there are no changes to inspect.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md.

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 skills/faizkhairi/claude-code-blueprint/review-diff
Any agent
npx skills add faizkhairi/claude-code-blueprint --skill review-diff
Clone the repo
git clone --depth 1 https://github.com/faizkhairi/claude-code-blueprint

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-diff

README.md
[![agentmods](https://agentmods.dev/badge/skills/faizkhairi/claude-code-blueprint/review-diff.svg)](https://agentmods.dev/skills/faizkhairi/claude-code-blueprint/review-diff)
Your own site
<a href="https://agentmods.dev/skills/faizkhairi/claude-code-blueprint/review-diff"><img src="https://agentmods.dev/badge/skills/faizkhairi/claude-code-blueprint/review-diff.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,405 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.00040 $0.01405
Opus 5 $0.00020 $0.00702
Sonnet 5 $0.00008 $0.00281
Haiku 4.5 $0.00004 $0.00140

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

Security

Grade A, and why

review-diff 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 6d 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.

skills/review-diff/SKILL.md · 75 lines

How it starts

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

Scan a git diff for project-specific anti-patterns. This is a fast, targeted scan (seconds), not a full code review. Use /review for comprehensive analysis.

Step 0: Detect project

Ensure you are inside a git repository before running diff commands:

  • If cwd is a git repo: use it
  • If recent context references a project: cd into it first
  • Check CLAUDE.md or the project manifest (package.json, composer.json, pom.xml, Gemfile, *.csproj, go.mod, Cargo.toml, requirements.txt/pyproject.toml, etc.) in the project root to identify the framework and project-specific patterns
  • If unclear: ask which project

Step 1: Get the diff

Determine the diff source from $ARGUMENTS:

  • No arguments: Run git diff (unstaged) + git diff --cached (staged). Combine both outputs.
  • Branch name (e.g., feat/xyz): Run git diff main...$ARGUMENTS
  • Commit range (e.g., HEAD~3..HEAD): Run git diff $ARGUMENTS
  • Single commit hash: Run git diff $ARGUMENTS~1..$ARGUMENTS

If the diff is empty, report "No changes to scan." and stop.

Step 2: Scan for anti-patterns

Analyze ONLY + lines (additions) in the diff. For each pattern below, search the added lines and the surrounding file context when needed.

Pattern Table

# Pattern What to look for Severity
1 Filter logic mismatch String === comparisons where one value could be a prefix of the other (e.g., 'All' === value when value could be 'All Categories'). Also: inconsistent use of startsWith() vs === on the same field across the diff. This requires semantic understanding, not just regex. HIGH
2 Auth gaps New defineEventHandler, @Get(), @Post(), @Put(), @Delete(), @Patch() without a corresponding @UseGuards() or defineMiddleware in the same file. Read the full file if needed to check. HIGH
3 Soft-delete violations DELETE FROM, .delete(, .deleteMany(, .destroy( in any ORM/SQL (adapt the delete-method names to your ORM) without corresponding is_active or deleted_at in the same block. Many projects require soft-delete: is_active=false + deleted_at=new Date(). Check CLAUDE.md for the project's soft-delete convention. CRITICAL
4 (Nuxt/Vue projects, adapt for your framework) API call pattern $fetch( or useFetch( in .vue files when the project uses a custom API composable. Check CLAUDE.md for the project's API composable (e.g., a wrapper around $fetch). Exception: server-side code in server/ directories may use $fetch. MEDIUM
5 (Nuxt/Vue projects, adapt for your framework) Navigation pattern router.push( or router.replace( in .vue files when the framework provides a preferred navigation function. Check CLAUDE.md for the framework-specific navigation function. MEDIUM
6 Secrets in diff Patterns like password:, token:, secret:, apiKey:, DATABASE_URL followed by a quoted string literal (not process.env., useRuntimeConfig(), or env variable references). CRITICAL
7 (Nuxt/Vue projects, adapt for your framework) External route gap New files added under server/routes/ or server/api/, check if corresponding frontend navigation uses external: true and <a href> instead of <NuxtLink>. Flag if unclear. LOW
8 N+1 queries findMany, findFirst, findUnique called inside for, for...of, forEach, .map(, while loops. Each iteration hits the DB separately instead of batching. HIGH
9 (Nuxt/Vue projects, adapt for your framework) CJS default import import X from 'cron-parser' or similar default imports from known CJS packages (cron-parser, lodash, moment). In Nuxt 4 + Vite, use named imports: import { CronExpressionParser } from 'cron-parser'. MEDIUM
10 (Nuxt/Vue projects, adapt for your framework) DevServer binding 0.0.0.0 appearing in config files (vite.config, nuxt.config, devServer sections). Binds to all network interfaces; security risk. HIGH

Read the full file on GitHub · 75 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. 6d ago First seen · 75 lines · 40 tokens per session scan A b7a8a206502f

Subscribe to this mod's changes

review-diff is a skill published in the GitHub repository faizkhairi/claude-code-blueprint (70 stars, last pushed 24d ago), licensed MIT. It adds 40 tokens to every session and 1,405 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

debugging-strategies

Master systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or technology stack. Use when investigating bugs, performance issues, or unexpected behavior.

wshobson/agents · 43 tokens

sql-optimization-patterns

Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

wshobson/agents · 44 tokens

parallel-debugging

Debug complex issues using competing hypotheses with parallel investigation, evidence collection, and root cause arbitration. Use this skill when debugging bugs with multiple potential causes, performing root cause analysis, or organizing parallel investigation workflows.

wshobson/agents · 44 tokens

error-handling-patterns

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

wshobson/agents · 43 tokens

spark-optimization

Optimize Apache Spark jobs with partitioning, caching, shuffle optimization, and memory tuning. Use when improving Spark performance, debugging slow jobs, or scaling data processing pipelines.

wshobson/agents · 37 tokens

systematic-debugging

Skill "systematic-debugging" from jnMetaCode/superpowers-zh, covering 系统化调试, 概述, 铁律, 何时使用 and 四个阶段.

jnMetaCode/superpowers-zh · 24 tokens