Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
gupsammy avatar

Get Pr Comments

  • 32 installs
  • 269 repo stars
  • Updated June 11, 2026
  • gupsammy/claudest

Fetch and flatten all GitHub PR comments—issue, review, and inline—so your agent can triage feedback without clicking through the UI.

About

get-pr-comments packages a small Python utility that uses the GitHub CLI to pull every comment surface on a pull request—issue conversation, review summaries, and inline review lines—and emit JSON or plain text your coding agent can scan. Solo and indie builders use it when a PR has dozens of bot findings plus human notes and manually copying from the GitHub UI is error-prone. The script documents explicit usage examples with repo overrides, relies on subprocess calls to gh with timeouts, and normalizes paginated API payloads so nothing is silently truncated on busy reviews. It assumes gh is installed and authenticated for the target repository. This is an integration skill, not a code review methodology: you still decide what to fix, but you start from one organized feed. Ideal in Ship review before merge or when responding to re-review after CI updates. Intermediate users comfortable with gh auth and Python 3 execution get the most value.

  • Python CLI: fetch_pr_comments.py with PR number and optional --repo OWNER/REPO
  • Output modes: json or text for agent consumption
  • Covers issue-level comments, review bodies, and inline review comments via gh api
  • Paginates GitHub API responses with --slurp flattening for complete threads
  • Detects bot authors via login suffix heuristics for filtering noise

Get Pr Comments by the numbers

  • 32 all-time installs (skills.sh)
  • Ranked #354 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/gupsammy/claudest --skill get-pr-comments

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs32
repo stars269
Security audit2 / 3 scanners passed
Last updatedJune 11, 2026
Repositorygupsammy/claudest

What it does

Fetch and flatten all GitHub PR comments—issue, review, and inline—so your agent can triage feedback without clicking through the UI.

Files

SKILL.mdMarkdownGitHub ↗

Get PR Comments

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.

Pre-Flight Context

  • Current branch: !git rev-parse --abbrev-ref HEAD
  • Repo: !gh repo view --json nameWithOwner --jq .nameWithOwner 2>/dev/null || echo "unknown"
  • Current branch PR: !gh pr view --json number,title --jq '"\(.number) — \(.title)"' 2>/dev/null || echo "none"

Workflow

1. Identify the PR

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.

2. Fetch comments

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.

3. Present results

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 jqgh 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.

4. Suggest next steps

After presenting comments, offer context-appropriate actions:

  • If must-fix items exist: "Want me to address these must-fix items?"
  • If inline comments reference specific files: "Want me to read the referenced

files and check if these issues are already resolved?"

  • If the PR is the user's: "Want me to respond to any of these comments?"

Related skills

FAQ

Is Get Pr Comments safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Git & Pull Requestsgitintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.