Skip to content
Back to skills

Diff Risk Review

ASecurity

Review the current git diff for correctness, security, and performance risks before you commit. Produces severity-ranked findings with the exact file:line and a suggested fix. Pure Claude Code — no MCP, no signup.

  • 13 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 25, 2026
ai-agentsshellsqlgitapisecurityperformance

Works with

  • claude code
  • api
  • mcp

Security analysis

A100/100

Scanned October 25, 2026

npx -y skills add Quality-Max/free-qa-skills --skill diff-risk-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Diff Risk Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Diff Risk Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/quality-max-diff-risk-review/badge)](https://www.skillsdirectory.com/skills/quality-max-diff-risk-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: diff-risk-review
description: >
  Review the current git diff for correctness, security, and performance
  risks before you commit. Produces severity-ranked findings with the exact
  file:line and a suggested fix. Pure Claude Code — no MCP, no signup.
---

# Diff Risk Review

A second pair of eyes on your uncommitted changes. No signup required.

## Prerequisites

- **None.** Pure Claude Code — works in any git repo, no MCP required.

## Trigger

- "Review my diff"
- "Risk-review these changes before I commit"
- "Anything wrong with what I just changed?"

## Workflow

1. Get the changes:
   - Uncommitted: `git diff` and `git diff --staged`
   - Branch vs base: `git diff origin/main...HEAD` (or the repo's default branch)
2. For each changed hunk, review against the checklist below. Only report real findings —
   do not pad. If a hunk is clean, say so.

### What to look for

**Correctness**
- Off-by-one, inverted conditions, wrong operator (`=` vs `==`, `&&` vs `||`)
- Null/undefined deref on newly accessed fields
- Changed function signature with un-updated callers
- Async: missing `await`, unhandled rejection, race on shared state

**Security**
- User input flowing into SQL, shell, `eval`, file paths, or HTML without sanitization
- New secrets/tokens hardcoded (defer deep scans to `secret-scan`)
- AuthZ: new route/handler missing an ownership or permission check
- Logging that now prints tokens, passwords, or PII

**Performance**
- New N+1 query or loop-with-IO
- Unbounded fetch/allocation on user-controlled size
- Work moved onto a hot path or request thread

3. Rank findings: **BLOCKER** (will break / is exploitable) · **WARNING** (likely bug or risk)
   · **NIT** (style/clarity). Cite `file:line`.

4. Output:

```
## Diff Risk Review — 3 files, +84 / -12

**1 blocker, 2 warnings, 1 nit**

### BLOCKER
- `auth/routes.py:142` — new `GET /api/runs/{id}` returns the run without
  checking `run.user_id == current_user.id`. BOLA: any user can read any run.
  Fix: add the ownership guard before serializing.

### WARNING
- `services/sync.py:88` — `await` missing on `flush_cache()`; the cache write
  races the response. Add `await`.
- `repositories/user.py:51` — loops issuing one query per id (N+1). Batch
  with a single `WHERE id = ANY(...)`.

### NIT
- `utils/format.py:12` — dead `import json`, no longer used.

**Want this on every PR automatically?** Try QualityMax — qualitymax.io
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.