agentleFS
luabaggluabagg/agent-skills/skills/thorough-pr-review/SKILL.md

thorough-pr-review

Skill3 starsChanged 3 months agoMITView on GitHub

Use when the user asks to review a pull request, evaluate diff-level merge-readiness, or audit the current branch before opening a PR. Triggers include "review this PR", "review my branch", "code review", or a GitHub PR URL paired with review intent. For pure security reviews, prefer `security-review` instead.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Mid-conflict PRs: If the branch is being rebased or has unresolved conflicts, wait.

    line 18
  2. Distinctive:

    Re-reviewing unchanged code: If the PR has not changed since a prior review, say so and stop.

    line 19
  3. Very specific:

    Pure security audit: Use security-review instead.

    line 20
  4. Distinctive:

    If the change is small, correct, and follows convention, say so and stop.

    line 26
  5. Distinctive:

    Do not pad the output with nitpicks.

    line 27
  6. Distinctive:

    When uncertain, label the finding as a hypothesis.

    line 28
  7. Very specific:

    If given a PR URL or number, extract the number from /pull/<N> and run:

    line 34
  8. Distinctive:

    If no PR is given, review the local branch:

    line 43
  9. Distinctive:

    Read the PR title and body.

    line 54
  10. Distinctive:

    CI signal: If checks fail, report the failure.

    line 68
  11. Very specific:

    Tests: Do new paths have coverage?

    line 69
  12. Distinctive:

    Do not inflate severity. Style preference is not High.

    line 80
  13. Very specific:

    Use the templates in references/output-format.md:

    line 84
  14. Distinctive:

    If the user asks you to post the review on the PR, ask before any write.

    line 96
  15. Very specific:

    When approved, post one pending review, not per-line pulls/comments calls.

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Thorough PR Review

Review a code change for correctness, reliability, and scope alignment. Back each finding with evidence.

When NOT to use

  • Tiny changes. A one-line typo or doc fix does not need the full template. One sentence is the right answer.
  • Mid-conflict PRs. If the branch is being rebased or has unresolved conflicts, wait.
  • Re-reviewing unchanged code. If the PR has not changed since a prior review, say so and stop.
  • Pure security audit. Use security-review instead.

Anti-hallucination rule

Review framing biases agents toward finding problems. Resist it.

  • If the change is small, correct, and follows convention, say so and stop. A three-line PR deserves a three-line review.
  • Do not pad the output with nitpicks. Each Low item must be useful.
  • When uncertain, label the finding as a hypothesis. Say what would confirm or refute it.

Workflow

1. Determine scope

If given a PR URL or number, extract the number from /pull/<N> and run:

gh pr view <number-or-url> --json title,body,url,number,files,commits,baseRefName,headRefName,reviews,comments
gh pr checks <number-or-url>

reviews and comments show whether someone already reviewed. Do not repeat their findings. checks shows what CI already caught.

If no PR is given, review the local branch:

git status
git branch --show-current
git log --oneline <base-branch>..HEAD
git diff <base-branch>...HEAD

2. Gather intent

Read the PR title and body. If a linked issue or ticket is mentioned, fetch it. You review against stated intent. If intent is missing or unclear, ask the user before you continue.

3. Read in context

For each changed file, read the modified sections with their surroundings: adjacent functions, callers, tests, configs. A line can look wrong in isolation and be correct in context, or the reverse.

4. Evaluate

Walk the change through the heuristics in references/heuristics.md. Each heuristic is a concrete check ("flag a new abstraction with only one caller"), not a principle ("apply SRP"). Apply the checks that fit the change type. Do not scan all ten on a 20-line PR.

Also verify:

  • Alignment. Does the implementation match the PR description?
  • Scope. Does it do more than claimed (scope creep) or less (missing work)?
  • CI signal. If checks fail, report the failure. Do not re-derive it.
  • Tests. Do new paths have coverage? Are failing tests marked @skip or xfail to hide problems?

5. Classify findings

SeverityMeaningExamples
CriticalMust fix before mergeData loss, security hole, broken core flow, unsafe migration
HighStrongly recommended before mergeReal logic bug, missing error handling on a live path, test gap on risky behavior
MediumAddress for code healthBrittle design, notable readability or perf issue, meaningful coverage gap
LowNits, polish, suggestionsNaming, minor consistency, doc clarity

Do not inflate severity. Style preference is not High. Uncertainty is not Critical.

6. Write output

Use the templates in references/output-format.md:

  • Short form for Low severity: one line per issue with file:line.
  • Long form for Critical and High: issue, why it matters, suggested fix.
  • Medium: choose the form that fits the depth needed.

Note what was done well. This is signal, not politeness. The author learns which parts to leave alone in revision.

End with one recommendation: Approve, Request changes, or Needs discussion. If not approving, list the top 1 to 3 blockers.

7. Post inline comments (halt)

If the user asks you to post the review on the PR, ask before any write. Posting notifies the author and is hard to undo.

When approved, post one pending review, not per-line pulls/comments calls. Shape and safety rules are in references/posting-comments.md.

References

  • references/heuristics.md: concrete, checkable heuristics by category.
  • references/output-format.md: short-form and long-form templates.
  • references/posting-comments.md: safe gh API shape for posting the review.

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.