pr-reviewlisted
Install: claude install-skill omznc/loadout
# PR review
Review one change as a careful maintainer does. Find the defects that the
author's own tests cannot find. The tests check the author's assumptions, and
the defects are in those assumptions.
The review is read-only. Do not edit, commit, push, comment or approve. Post to
GitHub only when the caller gives `--post` (see "Report").
## 0. Use the repository's own copy first
Look for `.agents/skills/pr-review/SKILL.md` and
`.claude/skills/pr-review/SKILL.md` in the repository root. If one exists, read
it and follow it in place of this file. It holds the rules, the commands and
the callers of that repository.
## 1. Pin the target
Find the default branch: `git symbolic-ref --short refs/remotes/origin/HEAD`.
If that fails, use `origin/main`, then `origin/master`.
Resolve the argument to one commit and one base:
- A PR number: `gh pr view <n> --json headRefOid,baseRefName,body,title`.
Fetch the head commit: `git fetch origin pull/<n>/head`.
- A branch: its head, against the default branch.
- Nothing: the current branch head, against the default branch.
Find the base with `git merge-base <head> origin/<base>`. Write the short head
SHA at the top of the report ("At `abc1234`: ..."). A later round then reviews
only the commits after that SHA. If an earlier review on the PR names a SHA,
read that review first. Review only `git log <old>..<head>`. Do not raise a
finding again that the author already answered.
Do not review in the main checkout. Run `git worktree add -