review-prlisted
Install: claude install-skill sgomez/developer-skills
# Review PR
Reviews the change's diff, posts the review, marks it ready.
**Contract doc.** Change mechanics come from the repo's
`docs/agents/code-host.md` — read it first if present. The commands below
are the **GitHub factory defaults** (`gh`), used verbatim when that doc is
absent or confirms GitHub; when it defines a different mechanic for an
operation (checkout, read feedback, post review, mark ready), the doc
wins. "PR" below means whatever the code host calls a reviewable change.
## Invoke
```
/review-pr # reviews PR for current branch
/review-pr 42 # reviews PR #42
```
## Flow
### 1. Identify and check out the PR
If no ref given, get the current branch's change metadata — GitHub default:
```bash
gh pr view --json number,title,headRefName,baseRefName,state
```
Refuse if PR is closed or merged.
If the current branch is not the PR branch (the /developer pipeline runs this
in a fresh worktree), first confirm **where you are**:
```bash
git rev-parse --path-format=absolute --git-dir --git-common-dir # two different paths = linked worktree
```
`--path-format=absolute` is not optional. Without it git answers with whatever
form is shortest from your cwd, so in the primary checkout's *root* both print
`.git` (equal, correct) but from any *subdirectory* they print an absolute path
and `../.git` — different strings for the same repo, which reads as "linked
worktree" and lets the checkout below run against the user's checkout.
If both paths are equal y