agentleFS
JeanKadangJeanKadang/DOC-GitHub-Practice-Skills/skills/github-pr-review/SKILL.md

github-pr-review

Skill1 starsChanged 45 days agoMITView on GitHub

Use when reviewing someone else's pull request, checking out a contributor's branch to test it, or handling a PR that came from a fork — before approving, requesting changes, or leaving line comments.

  • Reads credentials

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use git-commit, code-review and 2 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.
  • MicrosoftSkill

    git-commit

    Stage user-selected paths, confirm the exact staged set, and create one local Conventional Commit, or generate a commit message for staged changes without committing. Use when you want a guarded commit or a ready-to-paste message.

    Also in 4 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

  • BlockSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

    Also in 3 projects that use this

  • SentrySkill

    skill-creator

    Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 17 edited versions we read keep these.

  • 4

    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. Very specific:

    Does it match a filed issue?: If the PR closes nothing and fixes something real, the issue is missing — say so (see github-issue-first).

    line 23
  2. Distinctive:

    keep the issue open;

    line 45
  3. Distinctive:

    do not check the criterion.

    line 46
  4. Distinctive:

    Don't block on style a linter should catch: If formatting keeps coming up in reviews, the fix is a linter in CI, not a reviewer repeating …

    line 89
  5. Distinctive:

    Maintainers can push to the fork branch: if the contributor left "allow edits by maintainers" on — useful for a last-mile fix, but push a …

    line 123

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

Reviewing pull requests

Merging conventions live in github-hygiene; this skill covers the review that happens before a merge is even on the table. The goal of a review is a decision — approve, request changes, or comment — backed by evidence that you actually ran or read the thing.

Read the PR before reading the diff

gh pr view <N>                     # title, body, linked issue, checks, reviewers
gh pr diff <N>                     # the change itself
gh pr checks <N>                   # CI state, per leg

Three questions, in order:

  1. Does it match a filed issue? If the PR closes nothing and fixes something real, the issue is missing — say so (see github-issue-first). If it closes an issue, does it do what the issue asked, and only that? Read the full issue body; a closing reference is not proof its acceptance criteria passed.
  2. Is the change bigger than its stated scope? Unrelated refactors bundled into a fix are the most common reason a PR should be split.
  3. How was it verified? The PR body should say. "Tests pass" without a new test on a bugfix PR means the bug can silently return.

Review the closing issue as part of the PR

For every issue the PR proposes to close, evaluate every acceptance criterion. Record the review in this shape:

CriterionEvidenceResult
Exact criterion text or concise identifierDiff, test, CI run, document, screenshot, or reproductionMet / Unmet / Unevaluated

The PR may carry Closes #N only when every in-scope criterion is Met. If a criterion is Unmet or Unevaluated:

  • request removal of the closing keyword or replacement with Refs #N;
  • keep the issue open;
  • do not check the criterion; and
  • identify the missing evidence or work precisely.

A sound partial PR can still be approved after it changes Closes to Refs. Green CI proves only what the CI jobs exercised; it does not automatically prove each issue criterion. Scope removal requires an explicit issue decision and rationale before approval, not a checkbox made to look delivered.

Run it, don't just read it

For anything beyond a typo, check the branch out. This is the difference between a review and a skim.

gh pr checkout <N>                 # works for fork PRs too — sets up the remote
<run the repo's test suite>
git checkout <default-branch>      # switch back: `gh pr checkout` left you on the PR's branch

gh pr checkout puts a contributor's code on your machine. Treat it as untrusted: read the diff before running the test suite or any build script, and look specifically at changes to CI workflows, package.json scripts, hooks, and anything that executes at install time. A PR that edits .github/workflows/ is a privilege change, not a code change — review it as such.

Leaving the review

gh pr review <N> --approve  -b "<why it's good to go>"
gh pr review <N> --request-changes -b "<what must change, specifically>"
gh pr review <N> --comment  -b "<observations, no verdict>"
gh pr comment <N> -b "<general discussion, not a review verdict>"

Pick the verdict deliberately — --comment is not a soft "request changes". A PR sitting with only comments looks unreviewed to the author.

VerdictUse when
Request changesCorrectness bug, security issue, missing test for a fixed bug, breaks a documented contract, scope needs splitting, or Closes #N remains while an in-scope criterion is unmet/unevaluated
CommentQuestions you need answered before deciding; observations that don't block
ApproveYou'd merge it as-is. Approving "with nits" means the nits are genuinely optional

Don't block on style a linter should catch. If formatting keeps coming up in reviews, the fix is a linter in CI, not a reviewer repeating themselves — file it.

Separate blocking from non-blocking explicitly in the body. Prefix optional remarks with nit: so the author knows what actually holds up the merge.

Anything you find that is out of scope for this PR becomes an issue, not a review comment demanding it be fixed here. Review scope is the diff in front of you; github-issue-first handles the rest.

Approving is not merging

Approval and merge are separate decisions. Never merge straight off your own approval — github-hygiene's rule (ask the maintainer once per batch) still applies. On a repo with branch protection, approve and let the author or maintainer merge.

Never approve your own PR to satisfy a required-review rule, and never use an admin override to merge past one. If you are the only reviewer available, say the PR is unreviewed rather than manufacturing an approval.

Fork PRs

Contributions from forks behave differently and the differences bite:

  • The fork's GITHUB_TOKEN is read-only. Workflows triggered by pull_request from a fork cannot write comments, push, or read secrets — a workflow that works on branch PRs may appear broken on fork PRs. That is expected, not a defect in the contributor's PR.
  • Secrets are not available to fork PR workflows. Any job needing them will skip or fail; don't ask the contributor to "fix" it.
  • Never "fix" this with pull_request_target plus a checkout of the PR head. That combination runs untrusted code with a write token and repo secrets — it is the standard GitHub Actions exfiltration path. See github-security-response.
  • Maintainers can push to the fork branch if the contributor left "allow edits by maintainers" on — useful for a last-mile fix, but push a commit rather than rewriting their history.
  • Ask for a rebase, don't rebase for them, unless the branch is stale enough that CI can't run.

Submitting a PR from a fork, syncing it with upstream, or responding to review on your own PR is github-contributing; this section covers reviewing someone else's fork PR, not submitting your own.

Common mistakes

MistakeFix
Approving without checking the branch outgh pr checkout <N> and run the suite for anything non-trivial
Running a contributor's test suite before reading the diffRead first — install scripts and workflow edits execute code
--comment when you mean "this can't merge"Use --request-changes; comments read as "reviewed, no objection"
Blocking on formattingAdd a linter to CI and file the issue
Demanding out-of-scope fixes in reviewFile an issue; keep the review to the diff
Approving own PR to clear branch protectionSay it's unreviewed instead
Treating Closes #N as proof the issue is completeEvaluate every criterion and cite evidence; use Refs #N for partial work
Treating green CI as evidence for criteria it never exercisedMap each criterion to a specific test, diff, document, or reproduction
Treating a fork PR's failing secret-dependent job as the contributor's bugFork PRs get no secrets and a read-only token by design
Reaching for pull_request_target to give fork CI more powerDon't — it's the classic exfiltration path

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.