agentleFS
oopsla5xxoopsla5xx/oops-skills/.claude/skills/review-pr/SKILL.md

review-pr

Skill4 starsChanged 4 months agoMITView on GitHub

Review PR diff against the spec before shipping — check spec compliance, conventions, scope, required security checklist, and test coverage. Outputs a structured verdict (APPROVE / REQUEST CHANGES / COMMENT). Run after self-check, before Phase 4 ship.

185 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnose-ci-failures, review-delta 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.
  • zerx-labSkill

    diagnose-ci-failures

    Diagnose CI failures for a PR using the GitHub CLI, extract error logs, and generate a plan to fix them. Use when the user asks to check CI status, pull CI issues, triage test failures, or investigate PR build failures.

    Also in 3 projects that use this

  • n24q02mSkill

    review-delta

    Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.

    Also in 3 projects that use this

  • GeiserXSkill

    docs-loop

    Use when the user asks to audit docs, check documentation for stale claims, or verify docs against the code.

    Also in 3 projects that use this

  • GeiserXSkill

    full-loop

    Drive a repository to done with sergio-loop, then keep improving it with refine-loop at a descending theta. Use only when the user explicitly invokes full-loop.

    Also in 3 projects that use this

  • n24q02mSkill

    build-graph

    Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically.

    Also in 3 projects that use this

  • +7 more from GeiserX

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 178 edited versions we read keep these.

  • 1

    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:

    Do not fix them yourself. Report clearly, let the agent/implementer decide:

    line 137
  2. Very specific:

    Create a follow-up task for minor issues → note in .ai/tasks/ or create an issue

    line 139

“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

Review PR

Review the PR diff against the written spec. This is not a generic "code review" — it checks whether the code matches what was committed to in the spec.


Run

Step 1 — Read context

# View the full diff about to be shipped
git diff main...HEAD    # or git diff <base-branch>...HEAD

Also read:

  • .ai/tasks/<task-name>.md — spec (Goal, Scope, Out of scope, Constraints, Plan)
  • .ai/context/conventions.md — project code conventions
  • .ai/context/security-checklist.md — required security checks

Step 2 — Review across 5 dimensions

Evaluate each dimension, record findings using [BLOCKING] or [MINOR] format:


A. Spec compliance

  • Does the code achieve the Goal in the spec?
  • Are there any changes outside ## Scope?
  • Are there any changes that violate ## Out of scope?
  • Are the ## Constraints respected?
  • Have all steps in ## Plan been implemented?

[BLOCKING]: any Out of scope item violated, or Goal not achieved. [MINOR]: a small step in Plan is missing but does not affect the Goal.


B. Conventions

Compare each change against .ai/context/conventions.md:

  • Is error handling following the correct pattern? (no silent error swallowing)
  • Does naming follow the convention?
  • Are there any hardcoded values?
  • Is there any copy-pasted code causing duplicate logic?

[BLOCKING]: violation of a hard convention (e.g., swallowing errors in a production path). [MINOR]: naming slightly off style, can be fixed later.


C. Scope creep

# Check which files were touched outside the defined scope
git diff --name-only main...HEAD

Compare the list of changed files against ## Scope in the spec.

  • Are there any files modified that are not mentioned in Scope?
  • If so — is that change justified? (incidental bugfix, required refactor)

[BLOCKING]: unrelated change that increases risk unnecessarily. [MINOR]: small cleanup in a related file.


D. Test coverage

  • Does each item in ## Test plan of the spec have a corresponding test?
  • Do tests cover the happy path?
  • Do tests cover at least 1 edge case?
  • Were any tests deleted without a clear reason?
# View changed test files
git diff --name-only main...HEAD | grep -E "test|spec"

[BLOCKING]: happy path has no tests at all. [MINOR]: some minor edge cases missing.


E. Security checklist (required)

  • Complete every item in .ai/context/security-checklist.md using [x] (including N/A items as [x] <item>: N/A — <reason>)
  • For each N/A item, is there a short reason?
  • Are there any unresolved findings from the checklist?

[BLOCKING]: any unresolved finding, or any checklist item left blank (not completed with [x], including N/A-with-reason entries).


Step 3 — Summarize verdict

Output format:

## PR Review: <task-name>

**Verdict:** ✅ APPROVE | 🔄 REQUEST CHANGES | 💬 COMMENT ONLY

---

### Blocking issues (must fix before merging)
<!-- Only present if verdict is REQUEST CHANGES -->
- [BLOCKING] <dimension> — <specific description> | <file:line if available>

### Minor issues (can fix in a follow-up PR)
- [MINOR] <dimension> — <description>

### Notes
<!-- Observations that are not issues, or positive highlights -->
-

---
Spec: `.ai/tasks/<task-name>.md`
Diff: <number of changed files> files, +<lines added>/-<lines removed>

Verdict rules:

  • ✅ APPROVE — no blocking issues
  • 🔄 REQUEST CHANGES — ≥1 blocking issue, must fix before merging
  • 💬 COMMENT ONLY — no blocking issues but something worth noting

Step 4 — If there are blocking issues

Do not fix them yourself. Report clearly, let the agent/implementer decide:

  • Fix in the current PR → re-run review after fixing
  • Create a follow-up task for minor issues → note in .ai/tasks/ or create an issue

What is NOT reviewed here

  • Style preferences not in conventions.md → do not flag
  • Architectural opinions outside the task scope → do not flag (that is ADR work)
  • Performance that has not been measured as a problem → do not flag
  • Absolute test coverage % → only check test plan items, do not require 100%

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.