Agent skill

Fetch PR Comments

by openshift-eng in openshift-eng/ai-helpers

Fetch new review comments from a GitHub PR, filtered to trusted users (org members + allowed bots).

Apache-2.0Auto-check passed

Install Fetch PR Comments

skills CLI
$ npx skills add openshift-eng/ai-helpers --skill fetch-pr-comments -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install openshift-eng/ai-helpers fetch-pr-comments --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/openshift-eng/ai-helpers.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/github/skills/fetch-pr-comments .claude/skills/fetch-pr-comments && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fetch-pr-comments
GitHub stars
120
Token cost
~1.2k tokens
SKILL.md length
348 words
Files
2
Skills in repo
118
Repo updated
First seen
Licence
Apache-2.0

At a glance

Fetch new review comments from a GitHub PR, filtered to trusted users (org members + allowed bots).

  • Works in 2 steps: gh CLI: Authenticated with gh auth login → Repository read access: The token must…
  • Monitoring a PR for feedback
  • SKILL.md covers When to Use This Skill, Prerequisites, Implementation and How It Works, plus 2 more sections
  • Runs Shell scripts from its folder; calls jq, bash and gh

What it does

Fetch PR Comments is an agent skill from openshift-eng/ai-helpers. Fetch new review comments from a GitHub PR, filtered to trusted users (org members + allowed bots). Use when monitoring a PR for feedback, checking for new review comments, or building a review-response workflow.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `fetch_pr_comments.sh`).

It works with GitHub. The repository describes itself as: Developer productivity tools for Claude Code & other AI assistants. The licence is Apache-2.0.

When your agent uses it

  • Monitoring a PR for feedback
  • Checking for new review comments
  • Building a review-response workflow

Example prompts

  • “/fetch-pr-comments”

Requirements

  • A Bash shell

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. gh CLI: Authenticated with gh auth login
  2. Repository read access: The token must have permission to read PR comments and check org membership

What it can do on your machine

Read from SKILL.md and the folder at commit a627176. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • jq
    • bash
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fetch PR Comments loads about 1.2k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 348 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from openshift-eng/ai-helpers at commit a627176, republished under its Apache-2.0 licence (© openshift-eng). 348 words, ~1,153 tokens.

Download SKILL.mdSave it as .claude/skills/fetch-pr-comments/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
fetch-pr-comments
description
Fetch new review comments from a GitHub PR, filtered to trusted users (org members + allowed bots). Use when monitoring a PR for feedback, checking for new review comments, or building a review-response workflow.

Fetch PR Comments

Fetch all comments from a GitHub pull request, filtered to trusted users only. Trusted users are GitHub org members and explicitly allowed bots. Untrusted comments are silently excluded.

This skill fetches from all three GitHub comment endpoints (inline review comments, review summaries, and PR conversation comments), providing a complete picture of PR feedback.

When to Use This Skill

Use this skill when you need to:

  • Check a PR for new review comments that need attention
  • Monitor a PR for feedback during an agentic workflow
  • Build a review-response loop that only processes trusted feedback
  • Fetch all actionable PR comments in a single call

Prerequisites

  1. gh CLI: Authenticated with gh auth login
  2. Repository read access: The token must have permission to read PR comments and check org membership

Implementation

Basic usage
bash
result=$(bash "${CLAUDE_PLUGIN_ROOT}/skills/fetch-pr-comments/fetch_pr_comments.sh" \
  --repo owner/repo \
  --pr 123)
With custom trusted bots and exclusions
bash
result=$(bash "${CLAUDE_PLUGIN_ROOT}/skills/fetch-pr-comments/fetch_pr_comments.sh" \
  --repo owner/repo \
  --pr 123 \
  --trusted-bots "coderabbitai,dependabot" \
  --exclude-ids "12345,67890")
Parameters
ParameterRequiredDescription
--repoYesGitHub repository in owner/repo format
--prYesPull request number
--trusted-botsNoComma-separated bot logins to trust (default: coderabbitai)
--exclude-idsNoComma-separated comment IDs to skip (already processed)
Output

JSON on stdout:

json
{
  "inline_comments": [
    {"id": "123", "user": "reviewer", "path": "pkg/server.go", "body": "This needs a nil check"}
  ],
  "reviews": [
    {"id": "456", "user": "reviewer", "state": "CHANGES_REQUESTED", "body": "See inline comments"}
  ],
  "issue_comments": [
    {"id": "789", "user": "coderabbitai[bot]", "body": "Static analysis found..."}
  ],
  "all_ids": ["123", "456", "789"],
  "total": 3,
  "formatted": {
    "inline": "**reviewer** on `pkg/server.go`:\nThis needs a nil check\n---",
    "reviews": "**reviewer** (CHANGES_REQUESTED):\nSee inline comments\n---",
    "issue_comments": "**coderabbitai[bot]**:\nStatic analysis found...\n---"
  }
}
Using in a polling loop

The all_ids and --exclude-ids fields enable stateful polling across iterations:

bash
PROCESSED_IDS=""

while true; do
  sleep 300

  result=$(bash "${CLAUDE_PLUGIN_ROOT}/skills/fetch-pr-comments/fetch_pr_comments.sh" \
    --repo owner/repo --pr 123 --exclude-ids "$PROCESSED_IDS")

  total=$(echo "$result" | jq -r '.total')
  if [[ "$total" -gt 0 ]]; then
    # Process comments...
    new_ids=$(echo "$result" | jq -r '.all_ids | join(",")')
    PROCESSED_IDS="${PROCESSED_IDS:+$PROCESSED_IDS,}$new_ids"
  fi
done
Using formatted output for Claude prompts

The formatted fields provide ready-to-use text:

bash
inline=$(echo "$result" | jq -r '.formatted.inline')
reviews=$(echo "$result" | jq -r '.formatted.reviews')
issue_comments=$(echo "$result" | jq -r '.formatted.issue_comments')

How It Works

  1. Fetches from three GitHub API endpoints:
    • repos/{repo}/pulls/{pr}/comments — inline code review comments
    • repos/{repo}/pulls/{pr}/reviews — review summaries (CHANGES_REQUESTED, etc.)
    • repos/{repo}/issues/{pr}/comments — PR conversation thread
  2. Identifies all unique comment authors
  3. Checks each author against the trusted bots list and org membership (gh api orgs/{org}/members/{login})
  4. Filters comments to trusted authors only
  5. Excludes already-processed comment IDs
  6. Filters out APPROVED and PENDING reviews (no actionable content)
  7. Returns structured JSON with both raw data and pre-formatted text

Trust Model

A user is trusted if they match ANY of:

  • Their login matches a --trusted-bots entry (with or without [bot] suffix)
  • They are a member of the repository's GitHub organization

All other commenters are silently excluded.

See Also

  • Related Skill: check-pr-ci-status — Check CI status and detect new failures
  • Related Skill: upload-screenshot — Upload images to GitHub for PR comments
  • Related Command: /utils:address-reviews — Full review-addressing workflow

© openshift-eng, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in plugins/github/skills/fetch-pr-comments of openshift-eng/ai-helpers.

  • SKILL.md
  • fetch_pr_comments.sh

Open the folder on GitHubat commit a627176

Compare with similar skills

Fetch PR Comments next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fetch PR Comments compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fetch PR Comments this skillopenshift-eng/ai-helpers120—~1.2kAutomated safety check: PassApache-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Diagnosing Superpowers Sessionsobra/superpowers296k3 repos~1.7kAutomated safety check: PassMIT
GitHub Deep Researchbytedance/deer-flow83k5 repos~1.3kAutomated safety check: PassMIT
Greplooponyx-dot-app/onyx32k4 repos~3.3kAutomated safety check: PassMIT
Update V8 Versionopeninterpreter/openinterpreter69k2 repos~845Automated safety check: PassApache-2.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Investigates a session where Superpowers went wrong, reads the transcripts on disk and produces an evidence-cited report, optionally prepared as a bug report for the maintainers.

    296k GitHub starsUsed in 3 repos~1.7k tokens
    Agent WorkflowsAuto-check passed
  • GitHub Deep Research

    bytedance/deer-flow

    Researches a GitHub repository over four rounds using the GitHub API and web search, then writes a structured markdown report with timeline, metrics and Mermaid diagrams.

    83k GitHub starsUsed in 5 repos~1.3k tokens
    Research & ScienceAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed
  • Update V8 Version

    openinterpreter/openinterpreter

    Bumps the pinned v8 and rusty_v8 versions in Codex, validates the release-candidate path with the v8-canary check, and traces failures to upstream build changes.

    69k GitHub starsUsed in 2 repos~845 tokens
    DevOps & CloudAuto-check passed
  • Last30days

    mvanhorn/last30days-skill

    Research what people actually say about any topic in the last 30 days.

    64k GitHub stars~7.8k tokensUpdated today
    Research & ScienceAuto-check: notes

More from openshift-eng/ai-helpers

All 118 skills in this repo
  • Investigate CI Reliability

    openshift-eng/ai-helpers

    Find and independently validate actionable reliability defects across OpenShift release jobs and presubmits, then export portable issue handoffs.

    120 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Address Review PR

    openshift-eng/ai-helpers

    Fetch and address all PR review comments — categorize by priority, make code changes, post replies, and push.

    120 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Categorize Activity Types

    openshift-eng/ai-helpers

    Categorize Jira issues into Red Hat Sankey Activity Type categories using MCP Jira tools.

    120 GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Has Review Work

    openshift-eng/ai-helpers

    Decide whether a GitHub PR has unanswered authorized review comments or new required CI failures worth a follow-up agent.

    120 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Must Gather Analyzer

    openshift-eng/ai-helpers

    Analyze OpenShift must-gather diagnostic data including cluster operators, pods, nodes, and network components.

    120 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Payload Autodl JSON

    openshift-eng/ai-helpers

    Schema for the autodl JSON data file produced by payload-analysis for database ingestion — you must use this skill whenever generating the autodl JSON file

    120 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Fetch PR Comments

What does Fetch PR Comments do?

Fetch new review comments from a GitHub PR, filtered to trusted users (org members + allowed bots). Fetch PR Comments is an agent skill from openshift-eng/ai-helpers. Fetch new review comments from a GitHub PR, filtered to trusted users (org members + allowed bots).

When should I use Fetch PR Comments?

Fetch PR Comments fits situations like: monitoring a PR for feedback; checking for new review comments; building a review-response workflow.

How do I install Fetch PR Comments in Claude Code?

Run `npx skills add openshift-eng/ai-helpers --skill fetch-pr-comments -a claude-code`. Or copy the skill folder (plugins/github/skills/fetch-pr-comments in openshift-eng/ai-helpers) into .claude/skills/fetch-pr-comments in your project. Claude Code loads it when a task matches its description.

How do I install Fetch PR Comments in Codex?

Run `npx skills add openshift-eng/ai-helpers --skill fetch-pr-comments -a codex`. Or copy the skill folder (plugins/github/skills/fetch-pr-comments in openshift-eng/ai-helpers) into .agents/skills/fetch-pr-comments in your project. Codex loads it when a task matches its description.

Can I use Fetch PR Comments in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add openshift-eng/ai-helpers --skill fetch-pr-comments -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fetch-pr-comments, .gemini/skills/fetch-pr-comments, .github/skills/fetch-pr-comments and .opencode/skills/fetch-pr-comments in your project.

What does Fetch PR Comments need to run?

Going by SKILL.md and its folder, Fetch PR Comments needs a shell for the scripts in its folder and the command-line tools its instructions call (jq, bash and gh). Our summary lists: A Bash shell.

Does Fetch PR Comments access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Fetch PR Comments safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Fetch PR Comments use?

Fetch PR Comments is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fetch PR Comments use?

About 1.2k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fetch PR Comments?

Skills that share tags, products or a category with Fetch PR Comments: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Diagnosing Superpowers Sessions (obra/superpowers, 296k stars), GitHub Deep Research (bytedance/deer-flow, 83k stars) and Greploop (onyx-dot-app/onyx, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fetch PR Comments?

openshift-eng (a GitHub organization) maintains it in openshift-eng/ai-helpers, which has 120 GitHub stars. The repository holds 118 skills in this directory. The repository was last updated on October 6, 2026.

Source: openshift-eng/ai-helpers on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.