agentleFS
PradnyeshpPradnyeshp/Claude-Skills/.claude/skills/review-diff/SKILL.md

review-diff

Skill2 starsChanged 4 months agoMITView on GitHub

Review the current branch or working-tree diff for bugs, security issues, and style problems before committing. Use when the user asks to review changes, says "review my code", "review the diff", "spot bugs in my changes", "is this ready to commit", or "what's wrong with this code".

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use grilling.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    grilling

    Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 20 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not invent problems. If a section has no findings, omit it.

    line 48
  2. Distinctive:

    If the diff is empty, tell the user there's nothing to review.

    line 51

“Common” is measured: kept by at least 6 in 10 of the 20 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Branch & base

!git branch --show-current

Changes under review

!git diff ${ARGUMENTS:-main}...HEAD --stat 2>/dev/null || git diff HEAD --stat 2>/dev/null || echo "No diff found"

!git diff ${ARGUMENTS:-main}...HEAD 2>/dev/null || git diff HEAD 2>/dev/null

Instructions

Review the diff above and report concrete, actionable findings. Review only the changed lines and the code they directly affect — do not audit the whole codebase.

What to look for

  1. Correctness — logic errors, off-by-one, null/undefined handling, incorrect conditionals, unhandled error paths, race conditions, resource leaks.
  2. Security — injection (SQL/command/XSS), hardcoded secrets or credentials, missing authz/authn checks, unsafe deserialization, path traversal, unvalidated input.
  3. Maintainability — duplicated logic, dead code, misleading names, missing edge-case handling, functions doing too much.
  4. Consistency — deviations from patterns already used elsewhere in the file or project.

Output format

Group findings by severity. For each, cite the file and line, explain the problem in one sentence, and give the fix:

### 🔴 Blocking
- `path/to/file.ts:42` — <problem>. Fix: <suggestion>

### 🟡 Should fix
- ...

### 🟢 Nits
- ...

Rules

  1. Be specific — every finding must reference a location and a concrete fix. No vague advice.
  2. Do not invent problems. If a section has no findings, omit it. If the diff is clean, say so plainly.
  3. Prioritize correctness and security over style.
  4. Distinguish certainty from suspicion — flag "verify that…" items separately from confirmed bugs.
  5. If the diff is empty, tell the user there's nothing to review.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.