/claude-coding:get-pr-comments [PR number or URL]from claude-coding
Fetches and organizes all comments on a GitHub pull request, grouping by human vs bot and extracting actionable items like must-fix and optional feedback.
Ships in claude-coding. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Fetch, organize, and present all comments on a GitHub pull request — issue-level comments, review bodies, and inline review comments — grouped by human vs bot, with actionable items (must-fix, optional) extracted from structured reviews and inline comments.
!git rev-parse --abbrev-ref HEAD!gh repo view --json nameWithOwner --jq .nameWithOwner 2>/dev/null || echo "unknown"!gh pr view --json number,title --jq '"\(.number) — \(.title)"' 2>/dev/null || echo "none"Parse $ARGUMENTS for a PR number or URL. If present, use it directly.
If no arguments provided, check the pre-flight "Current branch PR" value. If it contains a PR number (not "none"), use the detected PR.
If no PR detected, list open PRs:
gh pr list --state open --limit 10 --json number,title,headRefName --jq '.[] | "\(.number)\t\(.title)\t(\(.headRefName))"'
If the list is empty, report "No open PRs found for this repository" and stop. If only one open PR exists, use it directly. Otherwise present options via AskUserQuestion.
Run the fetch script with the resolved PR number (default text output is
pre-formatted and token-efficient; use --output json only for programmatic
consumers):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/get-pr-comments/scripts/fetch_pr_comments.py <PR_NUMBER>
Exit 0 = proceed. Exit 2 = gh auth or network error — report to user.
The script output is already formatted for presentation. If the output starts with "0 human, 0 bot", report "No comments on this PR yet" and skip to Step 4.
Otherwise, relay the script output directly. The output is structured as: actionable items (must-fix, optional) first, then human comments, then bot comments (truncated). Do not reformat or reparse — present as-is.
If must-fix items are listed, check whether a subsequent review already
resolved them by querying both issue comments and formal PR reviews. Pipe
to external jq — gh api rejects --slurp combined with --jq in
current versions, and --paginate --slurp yields an array-of-pages that
must be flattened with [.[][]]:
# Latest issue-level comment (paginated — PRs may exceed 30 comments):
gh api repos/{owner}/{repo}/issues/<PR_NUMBER>/comments --paginate --slurp \
| jq -r '[.[][]] | last | .body // ""'
# Latest formal PR review body (approvals and review-body sign-offs land here,
# not in issue comments):
gh api repos/{owner}/{repo}/pulls/<PR_NUMBER>/reviews --paginate --slurp \
| jq -r '[.[][] | select(.body != "")] | last | .body // ""'
If either output contains phrases like "ready to merge", "all issues fixed", "lgtm", "approved", or similar resolution language, surface that summary first with a note that the listed must-fix items may already be resolved. Then present the full script output.
After presenting comments, offer context-appropriate actions:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/clean-branchesThis skill should be used when the user says "clean up branches", "delete merged branches", or "prune stale branches". Use whenever the user mentions branch cleanup, pruning, or stale branch deletion — even if they don't say "clean-branches" explicitly.
/commitThis skill should be used when the user says "commit my changes", "commit this", "create a commit", "git commit", "save my work", or mentions committing code.
/make-changelogThis skill should be used when the user asks to "create a changelog", "generate a changelog", "update my changelog", "fill in the changelog", "add a changelog", "CHANGELOG is missing entries", "changelog is out of date", "what's missing from my changelog", "changelog from git history", "write changelog", "release notes", or says "my project needs a CHANGELOG".
/make-readmeThis skill should be used when the user asks to "create a README", "generate a README", "make a readme", "write a README for my project", "need a README", "add a README", "document my project", "set up project docs", "readme with badges".
/push-prThis skill should be used when the user wants to create a pull request, or submit code for review. Triggers on "push a PR", "create a PR", "open a pull request", "make a PR", "submit for review"./update-claudemdThis skill should be used when the user says "update CLAUDE.md", "refresh CLAUDE.md", "sync CLAUDE.md with the codebase", "reorganize CLAUDE.md", "optimize project instructions", or when CLAUDE.md is stale, verbose, or out of sync.npx claudepluginhub gupsammy/claudest --plugin claude-codingOther plugins' skills for the same job