From gh-pr-tasks
Performs a full code review on a GitHub pull request — analyzes the diff, drafts inline review comments, presents for user approval, and submits. Use when the user asks to review a PR, give feedback on a PR, or examine a PR for issues.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gh-pr-tasks:pr-reviewThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Full review-giving workflow for a GitHub pull request. Reads the code, drafts inline review comments, and submits after user approval.
Full review-giving workflow for a GitHub pull request. Reads the code, drafts inline review comments, and submits after user approval.
First, invoke the pr-check-deps skill to validate the environment. If it reports a failure, stop and show the remediation instructions.
Step 1: Resolve the PR
The user provides a PR number, URL, or you can ask them. Determine the repo:
gh repo view --json nameWithOwner -q .nameWithOwner
Fetch PR metadata:
gh pr view <PR_NUMBER> -R <owner/repo> --json number,title,headRefName,baseRefName,url,author,body,additions,deletions,changedFiles
Report to the user: "Reviewing PR #N: by @author (<additions>+/<deletions>-, <changedFiles> files)"
Step 2: Verify branch
Check the current branch and compare it to the PR branch:
git rev-parse --abbrev-ref HEAD
git fetch origin <headRefName>
Compare the local HEAD against the remote PR branch:
git rev-list --left-right --count HEAD...origin/<headRefName>
There are three possible states:
A) Current branch matches <headRefName> and is up to date: Proceed to the next step.
B) Current branch matches <headRefName> but is behind the remote: Inform the user their branch is behind and use AskUserQuestion with options:
git pull origin <headRefName> to update the local branch.C) Current branch does NOT match <headRefName>: Inform the user and use AskUserQuestion with options:
git checkout <headRefName> (or git checkout -b <headRefName> origin/<headRefName> if the branch doesn't exist locally). Then pull to ensure it's up to date.Step 3: Read the PR diff
gh pr diff <PR_NUMBER> -R <owner/repo>
Step 4: Read changed files for context
For each file in the diff, read the full file to understand the surrounding context.
Focus on understanding:
Step 5: Draft inline comments
For each issue found, prepare an inline comment with:
path: file path relative to repo rootline: the line number in the diff (use the NEW file line numbers)body: the review comment text — be specific, constructive, and explain whyStep 6: Draft overall summary
Write a review summary covering:
Choose a recommended event:
APPROVE — code is good, no blocking issuesCOMMENT — observations/questions but not blockingREQUEST_CHANGES — issues that should be fixed before mergeStep 7: Show the draft review
Present each inline comment with the surrounding code context so the user can evaluate. Then show the overall summary and recommended event.
Use AskUserQuestion to let the user:
Iterate until the user approves.
Step 8: Submit the review
See gh-pr-review CLI reference for exact commands.
# Start pending review
gh pr-review review --start -R <owner/repo> <PR_NUMBER>
# Returns: { "id": "PRR_..." }
# Add each inline comment
gh pr-review review --add-comment \
--review-id <PRR_...> \
--path <file> \
--line <line> \
--body "<comment>" \
-R <owner/repo> <PR_NUMBER>
# Submit with event and summary
gh pr-review review --submit \
--review-id <PRR_...> \
--event <EVENT> \
--body "<summary>" \
-R <owner/repo> <PR_NUMBER>
Report: "Review submitted on PR #N: "
npx claudepluginhub jeremygiberson/gh-pr-tasks-plugin --plugin gh-pr-tasksReviews a pull request for code quality and correctness. Use when asked to review a PR or when running as an automated PR reviewer.
Reviews GitHub pull requests end-to-end using the gh CLI. Covers diff analysis, commit history, CI checks, and severity-leveled feedback submission.
Reviews pull requests requested by peers on GitHub/GitLab, gathering context, delegating to agents for errors/types/tests, proposing style-matched comments before submission.