agentleFS
TwigpineTwigpine/openclaude-skills/skills/pr-review/SKILL.md

pr-review

Skill19 starsChanged 6 months agoMITView on GitHub

Reviews pull requests for correctness, style, and risks.

195 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use oss-pr, pr-automation and 10 more.

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.
  • CES-LtdSkill

    oss-pr

    Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

    Also in 3 projects that use this

  • CES-LtdSkill

    pr-automation

    PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".

    Also in 3 projects that use this

  • jtenniswoodSkill

    expert-reset

    Reimagine this repository from first principles using the current product and user experience as the target. Use when the user says "/expert-reset", asks how the project should be rebuilt if starting again, wants bold architecture or component-structure recommendations, or wants a research-only reset plan unconstrained by current implementation details.

    Also in 3 projects that use this

  • jtenniswoodSkill

    updates

    Summarize user-facing project updates from the last 7 days, ordered by importance and written as one-sentence "Feature: description" entries. Use when the user says "/updates", asks what changed recently, or wants a concise list of recent features, device support, fixes that users will notice, or other product value.

    Also in 3 projects that use this

  • openchamberSkill

    clack-cli-patterns

    Use when creating or modifying OpenChamber CLI commands, prompts, terminal output, non-TTY behavior, `--quiet`, or `--json` behavior.

    Also in 3 projects that use this

  • openchamberSkill

    drag-to-reorder

    Use when implementing or modifying OpenChamber sortable or drag-to-reorder behavior, especially `@dnd-kit`, touch/mobile interactions, variable-width items, or wrapping layouts.

    Also in 3 projects that use this

  • +6 more from openchamber

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 178 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the changed code in context, not just the diff hunks.

    line 51
  2. Distinctive:

    Check, in this order:

    line 55
  3. Very specific:

    Write the review. For each finding cite file:line (or file:line-line for a range), describe the problem in one sentence, and either propose …

    line 83
  4. Distinctive:

    When the PR is unusually large (more than ~600 lines changed or 20+ files touched), stop and tell the user the PR should be split before …

    line 89
  5. Distinctive:

    Do not invent a review the user did not ask for.

    line 118
  6. Distinctive:

    If the PR was unusually large, did I push back on the size rather than producing a thin review of every file?

    line 148

“Common” is measured: kept by at least 6 in 10 of the 178 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

PR Review

Review a pull request the way a careful teammate would: read the actual code, group findings by severity, and make every comment actionable.

Use this skill when

  • The user asks to review a pull request, diff, or set of changes.
  • The user pastes a PR URL or a raw diff and asks for feedback.
  • The user asks "what's wrong with this PR" or "is this ready to merge".
  • The user asks for a summary of what a PR does.
  • The user asks to compare two branches.

Do NOT use this skill when

  • The user wants to WRITE new code. Use a coding skill instead — this skill reviews code, it does not produce it.
  • The user wants a high-level architecture review or wants help planning a multi-PR refactor. Use the refactor-plan skill.
  • The user wants release notes generated from merged PRs. Use the release-maintainer skill.

Procedure

  1. Get the diff. Prefer these in order, depending on what the user gave you:
    • A PR number: fetch the diff with gh pr diff <number> and the metadata with gh pr view <number> --json title,body,additions,deletions,files.
    • Two branches: git diff <base>...<head> --stat then git diff <base>...<head> to see the patch.
    • A raw diff or patch: use it directly; if line numbers look off, ask the user for the post-image file path.
  2. Understand the scope. Count files touched, lines added/removed, and look at the file types. A 12-file PR with 3 lines per file is a different review than a 1-file PR with 800 lines.
  3. Read the changed code in context, not just the diff hunks. For each non-trivial file, open it and read 30-50 lines around each change so you understand callers, types, and adjacent invariants. Diff hunks hide context — reviewing only the hunk is how missed bugs ship.
  4. Check, in this order:
    • Correctness: does the code do what the PR description (or commit message) claims? Trace at least one happy path end-to-end.
    • Error handling: what happens on the failure paths? Are errors caught, surfaced, logged, or swallowed? Is the failure mode appropriate for the layer?
    • Edge cases: empty inputs, very large inputs, unicode, negative numbers, concurrency, partial failures, retries, timeouts, idempotency.
    • Naming: do new symbols match the rest of the codebase? A function named differently from its siblings is a signal something is off.
    • Tests: is the new behavior tested? Do the existing tests still cover the changed paths, or did the change move logic out from under them? A passing CI on a thinly-tested PR is not a green light.
    • Security: injection (SQL, command, template), auth and authz boundaries, untrusted deserialization, secrets in logs or responses, unsafe redirects.
    • Performance: obvious regressions, N+1 queries, sync work in a hot loop, large allocations, missing indexes.
    • Breaking changes: API shape, return types, side effects, default values, file formats, database columns.
  5. Group findings by severity:
    • Blocker — must fix before merge. Correctness bugs, regressions, data loss, security issues.
    • Important — should fix, can be follow-up. Missing tests for new behavior, unhandled edge cases that are unlikely but real, unclear error handling.
    • Nit — optional polish. Naming, comments, style consistency.
  6. Write the review. For each finding cite file:line (or file:line-line for a range), describe the problem in one sentence, and either propose a concrete fix or ask one focused clarifying question. Lead with blockers; finish with nits. Keep the tone constructive — you are reading the author's work, not grading it.

When the PR is unusually large (more than ~600 lines changed or 20+ files touched), stop and tell the user the PR should be split before being reviewed. Reviewing a too-large PR in one pass produces a worse review than reviewing three smaller ones; saying so up front is more useful than a half-baked sweep. Offer to review each piece as the author splits it.

Examples

In scope: "Review PR #142 — adds user search."

→ Run the procedure. Fetch the diff with gh pr diff 142. Note the 6 files touched and ~180 lines added. Open each changed file in src/search/: trace the request path from handler to repository, check the new SQL for parameter binding, check that the new endpoint has tests (look in tests/search/), check that pagination handles empty result sets. Group findings:

  • Blocker: repository.ts:42 builds the query with string concatenation — parameterize it.
  • Important: handler.ts:88 returns 200 with an empty array on invalid input — should be 400 with a message.
  • Nit: types.ts:14 — type alias SearchRes is inconsistent with SearchResult used elsewhere.

In scope: "Summarize what PR #87 does."

→ A summary is a valid output of this skill when the user explicitly asks for one. Read the PR description and diff, then produce a 3–5 bullet summary grouped by area (API changes, schema changes, tests). Do not invent a review the user did not ask for.

Out of scope: "Write the user search feature."

→ Tell the user that pr-review reviews existing code; suggest a coding skill (or a fresh implementation conversation) for the implementation work. Do not start writing the feature.

Out of scope: "Tell me whether to merge this — it's a 4000-line PR across 60 files."

→ A PR this size should be split before being reviewed. Suggest the author break it into smaller PRs grouped by concern, and offer to review each piece. Do not attempt a complete review of a PR you cannot read in a sitting.

Self-check before responding

  • Did I read the full changed files, not just diff hunks?
  • Did I check at least one happy path end-to-end?
  • Are findings grouped by severity (blocker / important / nit)?
  • Does every finding include a specific file:line reference?
  • Did I look at tests — both new tests added and existing tests that cover the changed paths?
  • Did I check error handling and at least one realistic edge case?
  • Did I flag breaking changes explicitly, not just in passing?
  • Is each finding either a concrete fix proposal or a focused question — not a vague "consider X"?
  • Did I avoid restating what the PR does as "feedback"? A summary is fine when the user asks for one, but it is not a review.
  • If the PR was unusually large, did I push back on the size rather than producing a thin review of every file?
  • Did I look for changes that affect more than the file they live in — public API, shared utilities, exported types, database schema?
  • Did I avoid generic "consider X" comments? Each one should be a concrete fix or a specific question.

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.