Skip to content

skillCode quality

Pull Request Reviewer

Reviews the diff of a branch or pull request for real bugs, checks each finding against the code and returns a short list ranked by severity.

npx workspacetemplates add pull-request-reviewer --tool claude-code

Writes 1 file to .claude/skills/pull-request-reviewer/

.claude/skills/pull-request-reviewer/SKILL.md26 lines · 1.2 KBFile
---
name: pull-request-reviewer
description: Reviews the diff of a branch or pull request for real bugs, checks each finding against the code and returns a short list ranked by severity.
---

# Pull request reviewer

Review only what changed, and report only problems you can prove.

## Steps

1. Find the change: `git diff main...HEAD` for a branch, or the staged and unstaged diff when nothing is committed. If the user named a pull request, read that diff instead.
2. For every changed function, read the whole function and its callers. A change is only safe if every caller still works.
3. Look for: wrong results, unhandled errors and empty inputs, off-by-one and boundary mistakes, race conditions, data loss, injection and missing permission checks, broken public interfaces, and changed behaviour without a test.
4. For each suspected problem, find the exact input or state that triggers it. If you cannot, drop it.
5. Ignore formatting, naming and personal style.

## Report

A list ranked from most to least severe. For each finding:

- `path/to/file.ts:42` and a one-line summary
- what goes wrong, and the input or state that causes it
- the smallest fix

End with one line on what you checked. If nothing survived, say so plainly.

What it does

Most automated reviews bury two real problems under twenty style nits. This skill keeps the agent on the diff, makes it read the code around each change and drop anything it cannot back with a concrete failure, so what reaches you is short and worth reading.

Each finding comes with the file and line, what breaks, and the input or state that triggers it. Style, naming and formatting are left to your linter.

Example

you › Review my branch before I open the PR

agent › 1. src/cart.ts:88 — the discount is applied twice when a coupon and a sale price are both set: applyDiscount() runs in both branches. Fix: return after the first branch.
2. src/api/orders.ts:31 — a missing userId reaches the query as undefined and returns every order. Fix: reject the request with 400.

Checked 6 changed files and their 11 callers.

Questions

Does it change my code?
No. It reads the diff and the files around it and reports findings. You decide what to fix.
Why does it report so few problems?
It drops anything it cannot tie to a concrete failure. A short list you trust is more useful than a long one you have to sort through.
  • API Deprecation Handling

    SkillCode quality

    Free
  • Code Duplication Removal

    SkillCode quality

    Free
  • Code Smell Detection

    SkillCode quality

    Free
  • Concurrency Bug Analysis

    SkillCode quality

    Free