local-review
Installation
SKILL.md
Local Code Review
Run the same review locally that the GitHub auto-review actions run on PRs (Claude / Codex / Pi). The review policy lives in REVIEW.md.
Why a subagent: the review MUST run in a fresh context — not inline in the current session. If the user has been iterating on the diff, the main session has absorbed their reasoning and rationalizations, so it anchors and misses things CI catches. A subagent starts cold, like CI does.
Steps
-
Determine the PR scope (cheap, do this in the main session):
- If an argument is provided, treat it as a PR number or branch.
- Otherwise, detect from the current branch vs
main. - Confirm the PR/branch exists (
gh pr view <n>orgit rev-parse <branch>).
-
Delegate the review to a fresh-context subagent with a self-contained prompt. The prompt MUST include:
- The PR number or branch name to review.
- The instruction to read
REVIEW.mdfirst for the policy, thenAGENTS.mdfiles in directories touched by the diff. - The exact output format (see below).
- Whether
--commentwas requested (so the subagent emits inline-comment payloads if needed). - Any "Additional reviewer instructions" the user provided.