---
name: code-review-master
description: "PR review in Claude. Style, security, perf, tests — with file-by-file inline comments. Acts as a senior reviewer on your pull requests. Picks up missing tests, unsafe patterns, perf regressions, and style drift. Generates an actionable review summary you can paste into GitHub."
license: MIT
---

# Code Review Master

Code Review Master turns Claude into a senior reviewer for your pull requests. It reads a diff, reasons about each changed file, and produces inline, line-anchored comments covering correctness, security, performance, test coverage, and style drift — plus a summary you can paste straight into a GitHub review. It's built for engineers who want a thorough first pass before a human teammate spends time, and for solo maintainers who don't have a reviewer on call.

## When to use it

- Before requesting human review, to catch the obvious stuff (missing null checks, unhandled errors, untested branches) so reviewers focus on design.
- On a teammate's PR when you're the reviewer and want a structured starting point.
- After a large refactor, to flag behavior changes and places where tests weren't updated.
- When touching auth, input parsing, SQL, or file/network I/O and you want a security-leaning read.

## How it works

Point it at a diff and it works file by file. It runs `git diff` (or reads a `gh pr diff <number>` against the base branch) and analyzes only the changed hunks, with surrounding context pulled from the working tree so comments aren't made blind. Findings are grouped by category — **correctness**, **security**, **performance**, **tests**, **style** — and each carries a file path, line range, severity, and a concrete suggested fix. The output is GitHub-flavored Markdown: a top-level summary plus per-file sections, so you can drop it into a review or post individual comments.

## Usage

```bash
curl -fsSL --create-dirs -o ~/.claude/skills/code-review-master/SKILL.md https://claudeskil.com/skills/code-review-master/SKILL.md

# Review your current branch against main
git checkout feature/checkout-refactor
claude "review this branch against main with code-review-master"

# Or review a specific PR
gh pr checkout 482
claude "run code-review-master on PR #482, focus on security and tests"
```

A finding looks like:

```
src/api/orders.ts:88-94  [security · high]
User-supplied `sortBy` is interpolated into the SQL string — injectable.
Suggestion: whitelist column names or use a parameterized ORDER BY.
```

## Tips & gotchas

- **Give it the base branch.** Reviewing a diff against `main` produces far sharper results than reviewing a single commit, which lacks context.
- **It reviews the diff, not the whole repo.** If a bug lives in unchanged code that the diff merely calls, ask it explicitly to widen scope.
- **Scope the categories** ("security and performance only") on large PRs — an unfocused review on 50 files dilutes the high-severity findings.
- **Treat severity as a hint, not gospel.** It errs toward flagging; triage before pasting everything into a thread.

## FAQ

**Does it post comments to GitHub automatically?**
No. It generates review-ready Markdown; you paste it or post comments yourself via `gh`. This keeps a human in the loop on what actually lands on the PR.

**Will it run my tests or linter?**
It reasons statically about coverage and style from the diff. It doesn't execute your suite — pair it with CI for actual pass/fail, and use it to find the cases CI isn't testing yet.

**What languages does it handle?**
Any language Claude reads well — TypeScript, Python, Go, Java, Rust, and more. Quality tracks how much surrounding context the working tree provides.
