Skip to content
Agentmart
Submit a tool

review-pr

Forensic, stage-aware pull request review.

Skill by jcottam

IndexedMIT★ 25
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/jcottam-review-pr

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Forensic, stage-aware pull request review. Reconstructs the commit narrative, tests architectural premises against project reality, detects over-engineering, and produces a ready-to-post review comment. Use when the user says "review PR", "review this PR", "review PR #N", "is this PR ready to merge", "review the diff", or any variation of wanting to critically evaluate a pull request for merge readiness. Do NOT use for branch summaries or "what does this PR do" questions — those are explanation tasks, not reviews.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/review-pr

What's inside

Skill name
review-pr
Description
Forensic, stage-aware pull request review. Reconstructs the commit narrative, tests architectural premises against project reality, detects over-engineering, and produces a ready-to-post review comment. Use when the user says "review PR", "review this PR", "review PR #N", "is this PR ready to merge", "review the diff", or any variation of wanting to critically evaluate a pull request for merge readiness. Do NOT use for branch summaries or "what does this PR do" questions — those are explanation tasks, not reviews.
License
MIT
Metadata
author: jcottam · version: 4.0.0
Instructions
373 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Review PR

Forensic, stage-aware pull request review. Reconstructs the commit narrative,
tests the PR's architectural premises against project reality, and produces a
review comment the user can post directly.

Three core insights:
1. Most bad reviews happen because the reviewer looks at the final diff in
   isolation and misses the *why*.
2. Most over-engineered PRs happen because the contributor builds for imagined
   future requirements instead of the current problem.
3. Most shallow reviews happen because the reviewer catalogs file-level
   findings without first understanding what the change means for the product.
   Think about the product impact before diving into the code.

## Phase 1 — Orientation

Before reading any code, establish context.

### 1. Get PR metadata

```bash
git remote -v
```

**GitHub (primary path):**

```bash
gh pr view <N> --json baseRefName,headRefName,title,body,commits,files,statusCheckRollup,reviews
```

**Fallback (no `gh` CLI or non-GitHub remote):**

```bash
git log --oneline <base-branch>..<pr-branch>
git diff --stat <base-branch>...<pr-branch>
```

Use the resolved base/head branch names for all subsequent commands.

### 2. Read project conventions

Before forming opinions, read the project's own rules:
- `AGENTS.md` — architecture, boundaries, "always do / never do" lists
- `.cursor/rules/` — workspace rules that apply to all changes
- `CONTRIBUTING.md`, `.github/PULL_REQUEST_TEMPLATE.md` if present

If none of these exist, infer conventions from the existing codebase: look at
2–3 files in the same directory as the PR's primary changes. Match naming,
error handling patterns, test structure, and abstraction level already
established.

These are the standards the PR should be measured against, not generic best
practices.

### 3. Read the PR description and commit messages

```bash
git log <base-branch>..<pr-branch> --reverse --format="%h %s%n%n%b"
```

Extract what the PR *claims* to do. Do not treat claims as fact until the
diff confirms them. Form your own judgment of scope and risk before reading
existing review comments or the user's opinion.

### 4. Check CI status

If checks are failing, lead with that.

### 5. Get the shape

```bash
git diff --stat <base-branch>...<pr-branch>
```

Flag anything unexpected: utility files touched by a feature PR, large line
counts unrelated to the stated goal, test files present or absent.

## Phase 2 — Timeline Reconstruction

```bash
git log <base-branch>..<pr-branch> --reverse --oneline
```

### Scaling strategy

| PR size | Approach |
|---------|----------|
| **≤15 commits, ≤30 files** | Full reconstruction — read every commit's `--stat`, inspect files of interest |
| **16–40 commits or 31–80 files** | Sample — read first commit, last commit, and any commit whose message signals a pivot ("revert", "actually", "try different approach"). Focus on the 5 highest-churn files. |
| **>40 commits or >80 files** | Shape-only — read `--stat` for all commits but only inspect the 3–5 files with the largest net diff. Note in findings that full reconstruction was not feasible. |

### Reconstruction

For each commit in scope, read `git show <sha> --stat` and inspect files of
interest.

Build a timeline: what was attempted first, were there course corrections,
did the contributor fix their own mistakes within the branch?

**Reversals and churn** — commit N adds something, commit N+M removes it.
Normal and healthy. Flag only if intermediate complexity survives in the final
state.

**Net diff is ground truth:**

```bash
git diff <base-branch>...<pr-branch>
```

Individual commits explain *why*; the net diff is what lands.

## Phase 3 — Categorize Changes

For each file in the net diff:

| Category | Definition | Review actions |
|----------|-----------|----------------|
| **Primary** | Directly serves the PR's stated goal | Read full file (Phase 4). Check correctness, edge cases, test coverage. Evaluate naming, error paths, and interaction with existing code. |

From jcottam/agent-resources, MIT.

More from jcottam/agent-resources

Signals

Stars
25
Forks
1
Open issues
0
Last commit (this folder)
Jun 1, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
4.0.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from jcottam

Cite this page

review-pr skill. Agent Mart. https://agentmart.dev/skills/jcottam-review-pr (last updated 2026-10-24)