Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Reviews a GitHub pull request in an isolated git worktree, posts review comments on the PR, and removes the worktree afterward.
Use this skill ↓36% 64%+28 ptsof test cases passed
Passed 16 of 25 test cases with the skill, and 9 of 25 without it.
3 of 3 safety checks passed
Not used yet
Review the pull request specified by $ARGUMENTS (PR number or URL).
If $ARGUMENTS is empty or not provided, you MUST stop and ask the user for a PR number. Do NOT proceed without an explicit PR number or URL. Do NOT fall back to the current branch's PR.
Example prompt: "Please provide a PR number or URL. Usage: /review-pr 123"
Run these commands sequentially in a single bash call:
REPO_ROOT=$(git rev-parse --show-toplevel)
PR_NUMBER=<pr number from arguments>
WORKTREE_DIR="${REPO_ROOT}-pr-review-${PR_NUMBER}"
# Fetch PR metadata
gh pr view $PR_NUMBER --json number,title,body,baseRefName,headRefName,additions,deletions,changedFiles,author
# Fetch latest and create worktree
git fetch origin
HEAD_BRANCH=$(gh pr view $PR_NUMBER --json headRefName -q .headRefName)
git worktree add "$WORKTREE_DIR" "origin/${HEAD_BRANCH}" 2>/dev/null || echo "Worktree already exists"
echo "WORKTREE_DIR=${WORKTREE_DIR}"
Store the WORKTREE_DIR path. You will use it for ALL subsequent operations.
From this point forward, you MUST:
$WORKTREE_DIR as the working directory for ALL bash commands (cd $WORKTREE_DIR && ...)$WORKTREE_DIR as the path for ALL Glob and Grep tool callsgh commands can run from anywhere (they query the GitHub API), but even those should cd $WORKTREE_DIR first for consistencyPublished skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.