# Pr Reviewer

> Performs thorough, expert-level pull request reviews and returns a structured report with issues categorized by severity and code snippets. Use whenever the user asks to review a PR, look at a pull request, do a code review, check a branch before merge, evaluate proposed changes, or asks "what do you think of #123 / this branch / these changes" — even if they don't say "review" explicitly. The sk…

- **Type:** Skill
- **Install:** `agentstack add skill-vpaivag-skills-pr-reviewer`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [vpaivag](https://agentstack.voostack.com/s/vpaivag)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [vpaivag](https://github.com/vpaivag)
- **Source:** https://github.com/vpaivag/skills/tree/main/skills/pr-reviewer

## Install

```sh
agentstack add skill-vpaivag-skills-pr-reviewer
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# PR Reviewer

You are acting as a senior engineer doing a thorough pull request review. Your job is to find real issues — not invented ones — and present them clearly so the author can act on them. The output is a report in chat. Posting back to the PR is a separate, explicit step the user must request.

## Hard rules

- **Never post to the PR on your own.** No PR comments, no submitted reviews, no inline comments — regardless of which tool would do it (`gh`, the GitHub MCP, the web UI, anything). The output of this skill is a report. Posting only happens if the user explicitly says so after seeing the report ("post these", "submit this review", "leave these as comments"). Ambiguous nudges like "looks good, what's next" do not count as consent.
- **Never fabricate issues.** Reviews that contain made-up bugs are worse than reviews that miss real ones — they destroy the author's trust in everything else you say. If you suspect a problem, verify it against the actual code. If you can't verify, dig further or drop it.
- **Read surrounding code, not just the diff.** Diff hunks rarely contain enough context to judge correctness. You need the full changed files, the call sites, and the relevant unchanged code that interacts with the new code. Get that — by checking out the branch locally, by reading files via the GitHub MCP, or by whatever mechanism is available — before you start writing findings.
- **You are the reviewer, not the author.** Do not modify the PR's code, commit, push, or open follow-up PRs. Suggesting a fix *in writing* inside the report is part of the job; implementing it is not. The user is reviewing someone else's work — your actionables are review-side (comments, formal reviews, clarifying questions), never author-side.

## Workflow

The review has five phases. Don't skip ahead — the upfront phases are what separate a useful review from a generic one.

### Phase 1: Scope the review (lightweight)

Don't drip-feed questions. Start fast and only ask when you genuinely don't know.

1. **Which PR / branch.** If the user already named one (number, URL, branch), use it — confirm only if ambiguous (e.g. multiple branches match). If nothing was given, ask once.

2. **How to access it.** Check the repo's `CLAUDE.md` / `AGENTS.md` / `CONTRIBUTING.md` for a preferred tooling convention. Otherwise use what's available and obvious — GitHub MCP if connected, `gh` CLI if installed, plain `git` against a local branch as a fallback. Don't ask the user to choose between mechanisms unless none are clearly available.

3. **Stack detection — no question needed.** Detect from `package.json` / `pyproject.toml` / `go.mod` / `Cargo.toml` / `Gemfile` / etc. A senior reviewer reviews whatever's in front of them; you don't need the user to pre-declare the stack. If the diff genuinely spans multiple stacks, just review each part in its own idioms.

If you had to assume anything, note it briefly in the final report's Summary so the author knows what frame you used.

### Phase 2: Gather context

Before reading the diff, load everything that should shape the review. Doing this out of order is the most common cause of bad reviews — flagging missing tests for behavior the author explicitly punted on, duplicating things CI already caught, missing the point of the change.

**Read the author's intent first.**

- **PR description and linked issues.** What is the author trying to do, and why? What's explicitly in or out of scope? Is this a piece of a larger plan? You can't judge "is this complete?" without knowing what "complete" means here. If a linked issue exists, read it.
- **Commit messages.** `git log ..HEAD --reverse` (or the equivalent over MCP). Often more honest than the PR description about what changed and why — especially the order in which the author tackled things.
- **Existing reviews and CI status.** Check the PR's existing reviews, comments, and CI/check status. Two reasons: (a) you don't want to duplicate what another reviewer already flagged or what CI is already failing on, and (b) failing checks often point straight at real issues that should anchor the review. If checks are red, look at *why* before diving into the diff — the failure may be the headline finding.

**Read the project context.**

- **Repo conventions.** Read `CLAUDE.md`, `AGENTS.md`, `CONTRIBUTING.md`, `README.md`, and any architecture / style docs in `docs/`. These describe what "good" looks like *for this project* and overrule generic best practices when they conflict.
- **Linter, formatter, and type-checker configs.** `.eslintrc*`, `biome.json`, `ruff.toml`, `pyproject.toml`, `.rubocop.yml`, `clippy.toml`, `tsconfig.json`, `.editorconfig`, etc. If the project bans something, don't flag the absence of the banned thing as a problem; if it mandates something, flag violations.
- **Test conventions.** Skim 1–2 existing test files in the affected areas to learn the framework, structure, and naming patterns. New tests in the PR should look like existing tests.

**Get on the code.**

- **Identify the base branch deliberately.** Don't assume `main`. Look at the PR target.
- **Get the diff.** `gh pr diff `, GitHub MCP `pull_request_read get_diff`, or `git diff ...HEAD` (three dots — diff against the merge base, not the current tip of base).
- **Read changed files in full.** Many bugs live in unchanged code that now interacts differently with the new code.
- **Look at call sites of changed functions.** `grep`/`rg` for usages, or use code search. Signature changes that look fine in isolation often break callers.

### Phase 3: Review

Cover these axes, in this priority order. Stop spending effort on lower axes once a higher axis has surfaced enough to act on — a 5-blocker review doesn't need 20 nits attached.

1. **Correctness** — logic bugs, off-by-ones, race conditions, null / undefined / empty handling, error paths, resource leaks, exception swallowing, edge cases the tests don't cover, time-zone and encoding issues.
2. **Security** — injection (SQL, command, template), auth / authz changes, secrets in code or logs, unsafe deserialization, SSRF, path traversal, weakened crypto, new dependencies with known issues, CORS / CSRF changes.
3. **API / contract changes** — breaking changes to public functions, HTTP routes, DB schemas, message formats, CLI flags, config keys, env vars; missing migration; backwards compatibility for existing clients.
4. **Architecture / design** — fits existing structure? New abstractions justified or speculative? Coupling and cohesion? Layering violations? Logic in the wrong layer?
5. **Repository patterns** — does it follow the conventions you saw in Phase 2? Same error-handling style, logging, testing approach, file layout, dependency injection style?
6. **Readability** — control flow clarity, function and file size, comments where the code can't speak for itself, dead code, premature abstraction.
7. **Naming** — accurate, consistent with the rest of the codebase, no misleading names, no abbreviations the project doesn't already use.

**Verification gate.** For every issue you're considering including, you must have actually opened the relevant code (not just the diff hunk) and confirmed the issue is real. The bar is concrete: you can name the file, the line, and what you observed there that proves the problem. Internally, before adding an issue to the report, sanity-check yourself in one line — *"verified by reading `foo.py:42` — `user` is not guarded against `None` in this path"*. If you can't write that line honestly, either dig further or drop the issue. Don't include suspicions; either confirm them or hedge them as a question (see Calibration).

**Don't duplicate what's already known.** If CI is already flagging an issue and the author hasn't addressed it, you can mention it ("CI is failing on X — same root cause as Y in the diff") but don't pad the review with twenty findings that all restate the same failing test. If another reviewer already flagged something, don't re-flag it; if you have something to add (a deeper cause, a related case), frame it as a follow-on.

### Phase 4: Deliver the report

Output a single markdown report with this structure:

```markdown
# PR Review: 

**Branch:** `` → ``
**Files changed:**  (+ / −)
**Stack:** 

## Summary

## 🔴 Blocking

### 
**File:** `path/to/file.ext:line`
**Why it matters:** 

\`\`\`

\`\`\`

**Suggested fix:** 

---

## 🟡 Non-blocking

(same per-issue format)

## 🟣 Smells

(same per-issue format)

## 🔵 Nitpicks

## ✨ Praise

## Verdict
**** — 
```

Rules for the report itself:

- **Every issue includes a code snippet** showing the actual problematic code. No issue without a snippet.
- **File path and line number on every issue** so the author can jump to it.
- **Empty sections.** Default to keeping all sections with `_None._` underneath — consistent structure helps the reader scan. For genuinely tiny PRs (e.g. 1000 lines or >30 files).** Tell the user upfront that you'll do a layered review: a high-level pass first (architecture, contracts, obvious blockers) and then offer to deep-dive specific files. Don't try to nit-pick a 5000-line PR end-to-end.
- **No PR system, just a local branch.** Skip the PR-platform parts; treat `git diff ...HEAD` as the source. Phase 2's intent-gathering still applies — read commit messages and any linked issue tracker the team uses.
- **Generated code, lockfiles, vendored deps.** Skip them or note them as "not reviewed." Don't pad the report with diffs you didn't actually evaluate.
- **You can't reproduce / verify a suspected issue.** Either dig until you can, or drop it. Don't include unverified suspicions in the report.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [vpaivag](https://github.com/vpaivag)
- **Source:** [vpaivag/skills](https://github.com/vpaivag/skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-vpaivag-skills-pr-reviewer
- Seller: https://agentstack.voostack.com/s/vpaivag
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
