getting-pr-review-comments
Use when needing Claude bot review recommendations from PR - automatically waits for workflows (including Claude review) to complete, then extracts recommendations and returns concise summary without loading full review into context
Best use case
getting-pr-review-comments is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when needing Claude bot review recommendations from PR - automatically waits for workflows (including Claude review) to complete, then extracts recommendations and returns concise summary without loading full review into context
Teams using getting-pr-review-comments should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/getting-pr-review-comments/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How getting-pr-review-comments Compares
| Feature / Agent | getting-pr-review-comments | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when needing Claude bot review recommendations from PR - automatically waits for workflows (including Claude review) to complete, then extracts recommendations and returns concise summary without loading full review into context
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Getting PR Review Comments
## Overview
Retrieve Claude Code review bot comments from a PR and extract actionable recommendations.
**Core principle:** Run in subagent to save context. Return only recommendations, not full comment.
**Automatic dependency:** This skill automatically waits for workflows (including Claude review) to complete before fetching comments.
## CRITICAL: Scope Guardrails
**This skill ONLY extracts and reports review recommendations. It NEVER fixes issues.**
When you find review recommendations:
- ✅ Extract the recommendations from the Claude bot comment
- ✅ Format them as a numbered list with severity and location
- ✅ Return the concise summary
- ❌ DO NOT investigate the recommendations
- ❌ DO NOT read the code files mentioned
- ❌ DO NOT propose fixes
- ❌ DO NOT make any code changes
**Why:** This skill runs in a subagent to save tokens. Addressing recommendations should happen in main
context with user approval, not automatically in the subagent. Return the recommendations and let the
caller decide what to do.
## When to Use
Use when you need:
- Claude bot's review recommendations for a PR
- Code review feedback after workflows complete
- Action items from automated review
**When NOT to use:**
- Need human reviewer comments (different workflow)
## Workflow
### Step 0: Wait for Workflows to Complete (Automatic)
Before fetching review comments, ensure all workflows are complete (Claude review is a workflow job).
**Skill location:** `~/.claude/skills/awaiting-pr-workflows/SKILL.md`
Read and execute the `awaiting-pr-workflows` skill's workflow to:
- Check for unpushed commits
- Verify PR exists and commit correlation
- Wait for workflows to start (up to 30s)
- Wait for workflows to complete (up to 20 minutes)
Once all workflows (including Claude Code Review) are complete, proceed to Step 1 below.
### Step 1: Get PR Issue Comments (Not Review Comments)
**Important:** Claude bot posts general PR comments, not inline code review comments.
Use the `comments` field from `gh pr view`, not `gh api .../pulls/.../comments`.
```bash
# Get PR comments (issue-level comments, not inline review comments)
gh pr view $PR_NUM --json comments \
--jq '.comments[] | {author: .author.login, body: .body, createdAt: .createdAt}'
```
### Step 2: Filter for Most Recent Claude Bot Comment
**Critical:** Only use the MOST RECENT comment from Claude bot.
The bot may post multiple iterations during review - we only want the latest.
```bash
# Get only the most recent Claude bot comment
gh pr view $PR_NUM --json comments \
--jq '.comments
| map(select(.author.login == "claude"))
| sort_by(.createdAt)
| reverse
| .[0]'
```
**Common bot usernames to check:**
- `claude` (most common in this repo)
- `github-actions[bot]`
- `claude-code-bot`
- `anthropic-claude[bot]`
### Step 3: Extract Recommendations
Parse the comment body for:
- **Recommendation blocks** - Usually markdown sections like "## Recommendations" or "### Suggestions"
- **File references** - Format: `file.ts:123` or `file.ts#L123`
- **Severity markers** - "⚠️", "❌", "💡", or labels like "[HIGH]", "[MEDIUM]"
## Return Format
**Return to main context:**
```markdown
Claude Code Review Recommendations for PR #{number}:
1. **[Severity]** File:Line - Brief description
- Detailed recommendation
- Link to comment
2. **[Severity]** File:Line - Brief description
- Detailed recommendation
- Link to comment
[Total: N recommendations]
[Review comment URL: https://...]
```
## Example Implementation
```bash
#!/bin/bash
# Run this in subagent
PR_NUM=$1
# Get only the most recent Claude bot comment
LATEST_COMMENT=$(gh pr view $PR_NUM --json comments \
--jq '.comments
| map(select(.author.login == "claude"))
| sort_by(.createdAt)
| reverse
| .[0]')
# Extract the body from the most recent comment
COMMENT_BODY=$(echo "$LATEST_COMMENT" | jq -r '.body')
# Parse and extract recommendations from the body
# Look for sections like "## 🔴 Critical Issues", "## ⚠️ Warnings", etc.
# Format as numbered list with severity, location, and description
# (Actual parsing depends on Claude bot's comment format)
# Return concise summary (limit to key recommendations)
```
## Common Mistakes
**Returning all Claude bot comments instead of just the latest**
- **Problem:** Bot may post multiple review iterations; returning all creates confusion
- **Fix:** Sort by `createdAt`, reverse, take `.[0]` to get only most recent
**Loading full comment into main context**
- **Problem:** Claude reviews can be 10k+ tokens
- **Fix:** Extract just the recommendations in subagent
**Not waiting for review to complete**
- **Problem:** Review job may still be running
- **Fix:** Use `awaiting-pr-workflows` first
**Returning raw JSON/markdown**
- **Problem:** Hard to parse in main context
- **Fix:** Format as numbered list with clear structure
**Using inline review comments API instead of PR comments**
- **Problem:** `gh api repos/.../pulls/.../comments` returns inline code comments, not bot summaries
- **Fix:** Use `gh pr view --json comments` for issue-level comments
## Quick Reference
| Task | Command |
|------|---------|
| List all PR comments | `gh pr view $PR --json comments` |
| Get most recent Claude comment | `gh pr view $PR --json comments --jq '.comments \| map(select(.author.login == "claude")) \| sort_by(.createdAt) \| reverse \| .[0]'` |
| Extract comment body | `jq -r '.body'` |
| Parse recommendations | Look for "## 🔴 Critical Issues", "## ⚠️ Warnings", "## 💡 Suggestions" sections |
## Use Subagents
**CRITICAL:** Always run in subagent.
```
Use Task tool with subagent_type='general-purpose'.
Give them this skill and the PR number.
They return just the recommendations.
```
**Why:** Saves 100k+ tokens by not loading full review into main context.Related Skills
jetbrains-marketplace-reviews
Fetch and visualize reviews for any JetBrains Marketplace plugin. Use when (1) analyzing plugin review trends, (2) getting review statistics for a time period, (3) visualizing rating distributions, (4) monitoring user feedback. Triggers on requests like "get JetBrains reviews", "copilot plugin feedback", "JetBrains marketplace reviews", "visualize plugin ratings", "analyze JetBrains plugin reviews".
ethics-reviewer
This skill should be used when the user mentions "dark patterns", "accessibility", "a11y", "privacy", "tracking", "analytics", "notifications", "user data", "GDPR", "consent", "manipulation", "sustainability", "performance budget", or when building user-facing features that collect data, send notifications, display urgency, or gate access. Addresses ethical constraints in software design — manipulation, accessibility, privacy, and sustainability.
error-debugging-multi-agent-review
Use when working with error debugging multi agent review
datahub-connector-pr-review
This skill should be used when the user asks to "review my connector", "check my datahub connector", "review connector code", "audit connector", "review PR", "check code quality", or any request to review/check/audit a DataHub ingestion source. Covers compliance with standards, best practices, testing quality, and merge readiness.
cursor-rules-review
Audit Cursor IDE rules (.mdc files) against quality standards using a 5-gate review process. Validates frontmatter (YAML syntax, required fields, description quality, triggering configuration), glob patterns (specificity, performance, correctness), content quality (focus, organization, examples, cross-references), file length (under 500 lines recommended), and functionality (triggering, cross-references, maintainability). Use when reviewing pull requests with Cursor rule changes, conducting periodic rule quality audits, validating new rules before committing, identifying improvement opportunities, preparing rules for team sharing, or debugging why rules aren't working as expected.
cpm:review
Adversarial review of epic docs and stories. Agents from the party roster examine planning artifacts through their professional lens, challenging assumptions, spotting gaps, and flagging risks. Triggers on "/cpm:review".
contract-review-pro
专业合同审核 Skill,基于《合同审核方法论体系》提供合同类型指引和详细审核服务
codex-reviewer
Use OpenAI's Codex CLI as an independent code reviewer to provide second opinions on code implementations, architectural decisions, code specifications, and pull requests. Trigger when users request code review, second opinion, independent review, architecture validation, or mention Codex review. Provides unbiased analysis using GPT-5-Codex model through the codex exec command for non-interactive reviews.
codex-review
Two-pass adversarial review of design documents and implementation plans using OpenAI Codex CLI. Invokes Codex to review plans section-by-section (pass 1), then holistically (pass 2), feeding critique back for revision. Use when you have a design doc, architecture plan, or implementation plan that should be stress-tested before execution.
code-reviewer
Elite code review expert specializing in modern AI-powered code analysis, security vulnerabilities, performance optimization, and production reliability. Masters static analysis tools, security scanning, and configuration review with 2024/2025 best practices. Use PROACTIVELY for code quality assurance.
code-review-agent
Comprehensive security and quality code review agent that checks for OWASP vulnerabilities, GDPR compliance, accessibility standards, and code quality issues.
book-review
Review any part of the book using parallel specialist agents