← ClaudeAtlas

review-prlisted

Reviews a change (PR/MR) diff against main, posts inline review comments and a summary, then marks it ready for review. Tracker- and host-agnostic — GitHub via gh is the factory default; docs/agents/code-host.md overrides. Use when user says "review pr", "review this pr", "/review-pr", or wants to run automated review on a pull request.
sgomez/developer-skills · ★ 4 · Code & Development · score 72
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