review
Installation
SKILL.md
Review
Review adversarially. Try to break the change and its chosen approach, ask whether a smaller change would do, and take the goal as given. Look hardest at compatibility, data loss, observability gaps, partial failure, races, security, stale state, unsafe retries or rollback, and violations of documented conventions.
If you wrote or changed the target in this session, hand this skill and the target to a fresh subagent and relay its report.
Don't comment on, approve, or request changes on a PR; draft any comment for the user, with the line to put it on.
Snapshot
Read and run everything in a snapshot of the target's head, never in the user's checkout. In the checkout, run only the commands below; even git status and git diff can rewrite its index.
- Clone the checkout into a new temporary directory with
git clone --shared --no-checkout. Resolve refs to SHAs in the checkout withgit rev-parse, because the snapshot'sorigin/<branch>is the checkout's local branch. - Check out the head:
- For a PR, fetch
pull/<number>/headfrom the PR's repository URL and confirm it matchesheadRefOid. Pass the PR URL to everygh prcommand, becauseghcan't find the repository from the snapshot. If the checkout isn't a clone of that repository, clone the repository instead. - For uncommitted changes, check out
HEAD, then list the changed paths in the checkout withgit diff-index --name-only HEADandgit ls-files -o --exclude-standard. Copy each into the snapshot, keeping symlinks as links, or delete it there if the checkout no longer has it. - For a merge commit, read the change with
git show --first-parent.
- For a PR, fetch
- Install dependencies only with the repository's locked install command, such as
npm ci. If a check needs ignored config such as.env, list it as unverified instead of copying the config. - Record the head SHA. Before reporting, look it up again, and for uncommitted changes rerun both path lists and compare every path on the old or new lists with its snapshot copy. If anything changed, update the snapshot and review again.