Review a pull request in a pane, usually someone else's. Read the diff, check correctness, the repo's own rules, fit, reuse and behaviour claims against a strict evidence bar, re-check earlier threads, and post the review only on an explicit go. Use when somebody asks you to review a PR.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Review?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/kbarendrecht-review)
---
name: review
description: Review a pull request in a pane, usually someone else's. Read the diff, check correctness, the repo's own rules, fit, reuse and behaviour claims against a strict evidence bar, re-check earlier threads, and post the review only on an explicit go. Use when somebody asks you to review a PR.
---
# Review a pull request
You are in a pane somebody is watching, on a detached worktree at the PR's head.
`$ORCH_PR` is the PR. `$ORCH_UPSTREAM` is the checkout's base, a fallback for when
the PR does not name its own. `$ORCH_UPSTREAM_REMOTE` is the remote the PR lives
on. `$ORCH_LANGUAGE` is the language to write in when the PR's own conversation
does not settle it. Typed by hand, outside the orchestrator, take the number from
the arguments and ask `gh` for the rest.
**This tree is for reading and for running things.** Never commit, push, check out
another ref, or reset it. A fix you want to propose goes into a comment as code.
**Reviewing never posts.** Findings go to the pane. Posting is the last step, and
only after the person picks `Approve` ([Post](#post)).
## Gather
```bash
gh pr view $ORCH_PR --json number,title,body,author,baseRefName,headRefOid,files,url
gh pr diff $ORCH_PR > "$TMPDIR/pr.diff" # never --patch: it numbers hunks per commit
```
- The base is `<remote>/<baseRefName>`; `$ORCH_UPSTREAM` only when that is empty.
- Read the changed files at the head from this tree, and the old side with
`git show <base>:<path>`. Read ±20 lines around every hunk before claiming
anything: guards and fallbacks hide just outside the diff.
- The existing conversation: the review threads (with `isResolved`, `isOutdated`,
every comment and its author), the review bodies and the PR comments.
`gh api user --jq .login` is you.
```bash
gh api graphql -f query='
query($owner:String!,$repo:String!,$num:Int!){
repository(owner:$owner,name:$repo){ pullRequest(number:$num){
reviewThreads(first:100){ nodes{ id isResolved isOutdated path line
comments(first:30){ nodes{ databaseId author{login} body } } } }
reviews(first:100){ nodes{ author{login} body state commit{oid} submittedAt } } } } }
' -F owner=<owner> -F repo=<repo> -F num=$ORCH_PR
```
**The intent.** The PR body says what it is for. A linked story or issue says what
it must do: find it the way this repo links them (a ref in the branch name, the
title or the body) and read it with the repo's tracker skill, if it has one. An
acceptance criterion the diff does not implement is a finding. A behaviour the
description declares intentional is context, not a finding.
## Learn this repo's rules
This skill carries no rules about code. The repo does, and you find them:
- Agent and contributor guidance: `CLAUDE.md` and `AGENTS.md` at the root and in
every directory the diff touches, `.claude/rules/`, `.cursor/rules/`,
`.github/copilot-instructions.md`, `CONTRIBUTING*`, the PR template.
- Enforced rules: the linter, formatter and type-checker configs. A suggestion of
yours must pass them, or name the suppression it needs.
- How the repo tests: read the CI workflow to learn the test command, rather than
guessing at a task runner.
- **The repo's own review guidance wins.** If it has a review skill, a
`REVIEW.md`, or review standards in its guidance, follow them where they differ
from this file.
A rule is a finding only when **the changed lines** break it. Process advice
aimed at the author (how to commit, when to ask) is not reviewable from a diff.
## Re-review
Threads from an earlier round mean this is a re-review, and those threads are the
first output. For every unresolved thread, yours or a colleague's, read its replies
and the code at that place **now**:
| Verdict | Bar | Disposition |
|---|---|---|
| Addressed | the mechanism is gone from the current code | yours: reply naming the fix, then resolve |
| Not addressed | it survives; cite the current `file:line` | reply that it stands, leave it open |
| Disputed | the author contested it | say whether the reply refutes it; refuted → resolve yours silently |
- An outdated thread is a lost anchor, not a fix. A commit message saying "fixed"
is not evidence either.
- A colleague's thread is never replied to or resolved by you: its verdict goes to
the person in the pane.
- Your own last review's `commit{oid}` against the head says what changed since.
Not an ancestor any more means a rebase: judge every verdict against the full diff.
Show the verdict table before the new findings.
## Find
Five passes over the diff. For a large diff (more than about 400 changed lines or
15 files) and an agent that can start subagents, give each pass its own subagent
with the hunks and this file's [evidence bar](#evidence-bar); otherwise run them
in order yourself. A subagent's finding is a claim: check its premise in the code
before you keep it.
1. **Correctness.** Trace each change: input, the call that breaks, what is seen.
Every changed file gets this pass, the small ones too.
2. **The repo's rules**, as found above, against the changed lines only.
3. **Fit.** Does the change sit where the repo's documented structure says it
belongs? Only against structure the repo documents or that sibling code shows
consistently; an undocumented preference of yours is not a finding.
4. **Reuse.** For each genuinely new helper, method, component or test utility,
search for an existing one that does the same. Found → an advisory naming it.
5. **Claims.** Try to break every behaviour claim the diff makes, in code,
comments, tests, commit messages and the PR body, with a second case the claim
did not name. False → a finding with the counterexample. Wider than its evidence
→ an advisory with the narrowest true wording.
**Tests**: does a test assert the outcome, not only that something ran? When the
repo's CI shows how to run the affected tests and they run in a few minutes, run
them here. A failure is evidence; a pass is not proof.
## Evidence bar
- **Critical is broken now, not "could break".** Cite the path: input → broken
call → observable failure. Cannot replace "could" with "does" → downgrade or drop.
- **A failure that rests on a data state needs a producer of that state**: a write
path, a fixture, a migration. None found → an advisory question, never critical.
- **A deterministic mechanism with a probabilistic failure** (a race, a timeout a
slow run blows) is an advisory: name the margin and how to reproduce it.
- **A behaviour change applied consistently across the diff is presumed
intentional**: one confirm-intent question per mechanism, not a finding per site.
- **Pre-existing defects** (the old side of the hunk has them) are at most an
advisory starting "Pre-existing:", never critical against this PR.
- **A third-party claim needs the dependency's own types or docs.** A repo grep
cannot prove what a library or service does. Unverifiable → do not post it.
- **An advisory needs one of**: a failing scenario, a concrete code change, or an
existing pattern in this repo it should follow. None → drop it.
- **A convention advisory needs a consequence.** "Consistency" alone is not one.
- **A proposed change ships as code.** Cannot write it → drop it. More than one
viable shape → name each with its cost; do not pick for the author.
- **Never repeat an earlier comment**, resolved or outdated ones included, even
reworded. Build on it or leave it.
- **Zero findings is a valid outcome.**
## Present
Number the findings across both tiers; the numbers are how the person steers
("drop 3, make 5 a question").
```markdown
## <n> findings: <x> critical, <y> advisory
### Critical
#### 1. <the claim, in plain words>
- **Where**: <path>:<line>
- **Tone**: hard | suggestion | question
- **Breaks**: <what goes wrong>
- **Fix**: <the change, as code>
### Advisory
#### 2. <the claim>
- **Where**: …
- **Tone**: question
- **Breaks**: …
- **Open**: <the question you want answered>
```
`Tone` is apart from severity: `hard` must change, `suggestion` is a better way,
`question` is the author's call or you are unsure. A `question` takes `Open`, the
others take `Fix`, never both.
Comment text says what breaks and what to do. No library internals you read to get
there, no "I ran", no CI status, no rebase or push talk.
## Post
1. **Ask for the event and the cut** with `AskUserQuestion`: `Comment`,
`Request changes`, `Approve`, and which findings go. One critical finding alone
never makes it `Request changes`; that is the person's call.
2. **Draft exactly what posts**: the event, the summary body, and every inline
comment with its `path:line`, in `$ORCH_LANGUAGE` unless the PR's conversation
is in another language. Each inline comment anchors to a line inside a hunk of
`pr.diff`: count from the `@@ -a,b +c,d @@` header (`c` is the first new-side
line). A line outside every hunk takes no inline comment; fold it into the body.
3. **Ask for the go** with one `AskUserQuestion`: `Approve` posts all of it, `Hold`
posts nothing. A change comes back through the tool's Other field: apply it,
show the new draft, ask again. An agent with no question tool asks the same in
one line and waits for the answer.
4. **Right before posting, read `headRefOid` again.** Moved → the anchors and the
findings are from an older diff: say so and go back to [Find](#find) for what
changed.
5. **Post it as one review**, then the thread replies, each as its own call:
```bash
gh api -X POST repos/<owner>/<repo>/pulls/$ORCH_PR/reviews --input review.json
# review.json: {"commit_id":"<headRefOid>","event":"COMMENT|REQUEST_CHANGES|APPROVE",
# "body":"…","comments":[{"path":"…","line":<n>,"side":"RIGHT","body":"…"}]}
gh api -X POST repos/<owner>/<repo>/pulls/$ORCH_PR/comments -F in_reply_to=<databaseId> -f body="…"
gh api graphql -f query='mutation($id:ID!){resolveReviewThread(input:{threadId:$id}){thread{isResolved}}}' -f id=<thread id>
```
Resolve only your own threads, and only after the reply that names the fix. Report
the review's URL when it is done.