/handling-pr-comments
Address PR review feedback systematically — fetch inline comments, review bodies, handle outside-diff-range comments, resolve threads with proper attribution
Claude Code
$ npx -y skills add dsifry/metaswarm --skill handling-pr-comments --agent claude-code
Codex
$ npx skills add dsifry/metaswarm --skill handling-pr-comments -a codex -y
Cursor
$ npx skills add dsifry/metaswarm --skill handling-pr-comments -a cursor -y
Gemini CLI
$ npx skills add dsifry/metaswarm --skill handling-pr-comments -a gemini-cli -y
GitHub Copilot
$ npx skills add dsifry/metaswarm --skill handling-pr-comments -a github-copilot -y
OpenCode
$ npx skills add dsifry/metaswarm --skill handling-pr-comments -a opencode -y
Windsurf
$ npx skills add dsifry/metaswarm --skill handling-pr-comments -a windsurf -y
SKILL.md
handling-pr-comments.SKILL.mdname: handling-pr-comments
description: Address PR review feedback systematically — fetch inline comments, review bodies, handle outside-diff-range comments, resolve threads with proper attribution
handling-pr-comments
Use when addressing PR review feedback, after receiving review comments from CodeRabbit, Cursor, or human reviewers - ensures systematic responses to each comment thread with proper attribution and thread resolution.
When to Activate
Activate this skill when ANY of these conditions are true:
- User asks to "address PR comments" or "handle review feedback"
- User mentions CodeRabbit, Cursor bot, or reviewer comments
- User is working on fixes requested in a PR review
- User asks to "check PR comments" or "respond to reviewers"
- After making fixes to address review feedback
CRITICAL: The Complete Workflow
**Most developers forget steps 4-6. This skill ensures they happen.**
Phase 1: Discover and Filter Comments
Run the filtering script to identify actionable comments:
# Filter actionable vs non-actionable comments
bin/pr-comments-filter.sh <PR_NUMBER>
This script:
- Filters out non-actionable comments (confirmations, acknowledgments, fingerprinting)
- Categorizes actionable comments by priority (Critical → Low)
- Shows comment IDs and details for processing
Phase 2: Triage Actionable Comments
The filter script categorizes by priority:
| Priority | Marker | Action | | --------------- | -------------------------------------------------------- | ---------------- | | CRITICAL | `_⚠️ Potential issue_ \| _🔴 Critical_` | Fix immediately | | HIGH | `_⚠️ Potential issue_ \| _🟠 Major_` | Fix before merge | | MEDIUM | `_🟡 Minor_` or `_🛠️ Refactor suggestion_ \| _🟠 Major_` | Should fix | | LOW | `_🔵 Trivial_` / `_🧹 Nitpick_` | Fix if quick | | HUMAN | Non-bot comments | Always process |
For each actionable comment, further categorize as:
1. **Bug/Issue** - Must fix 2. **Enhancement** - Should fix 3. **Nitpick** - Nice to fix 4. **Question** - Needs clarification 5. **Intentional** - Decline with explanation 6. **Out-of-Scope** - See Phase 2b
Phase 2b: Extract "Outside Diff Range" Comments from Review Bodies (CRITICAL)
**COMMONLY MISSED**: CodeRabbit posts "Outside diff range" comments in the **review body**, not as inline threads. These are actionable feedback that MUST be addressed.
# Extract Outside diff range comments from review bodies
PR_NUMBER=<number>
OWNER=$(gh repo view --json owner -q .owner.login)
REPO_NAME=$(gh repo view --json name -q .name)
echo "=== OUTSIDE DIFF RANGE COMMENTS ==="
gh api "repos/$OWNER/$REPO_NAME/pulls/$PR_NUMBER/reviews" --paginate | \
jq -r '.[] | select(.body | test("Outside diff range"; "i")) |
"Review ID: \(.id)\n\(.body)\n---"'**These comments are NOT in threads** - they cannot be replied to inline. You must:
1. Parse the file paths and line numbers from the review body 2. Address the feedback in your code 3. Commit and push 4. Leave a general PR comment acknowledging you addressed them
Phase 2c: Handle Other Out-of-Scope Comments
List the out-of-scope comments:
PR_NUMBER=<number>
OWNER=$(gh repo view --json owner -q .owner.login)
REPO_NAME=$(gh repo view --json name -q .name)
echo "=== UNRESOLVED THREADS OUTSIDE THE CURRENT DIFF ==="
# isOutdated: the code changed since the comment. line == null on a line
# comment (not a FILE-level one): it no longer maps to a line in the PR diff.
gh api graphql --paginate -F owner="$OWNER" -F repo="$REPO_NAME" -F pr="$PR_NUMBER" -f query='
query($owner:String!, $repo:String!, $pr:Int!, $endCursor:String) {
repository(owner:$owner, name:$repo) { pullRequest(number:$pr) {
reviewThreads(first:100, after:$endCursor) {
pageInfo { hasNextPage endCursor }
nodes { id isResolved isOutdated subjectType path line originalLine
comments(first:100) { nodes { author { login } body } } } } } } }' |
jq -r '.data.repository.pullRequest.reviewThreads.nodes[]
| select((.isResolved | not) and (.isOutdated or (.line == null and .subjectType != "FILE")))
| "\(.id) \(.path):\(.originalLine) outdated=\(.isOutdated)\n"
+ ([.comments.nodes[] | "[\(.author.login)] \(.body)"] | join("\n\n")) + "\n---"'
echo "=== GENERAL PR DISCUSSION COMMENTS ==="
gh api "repos/$OWNER/$REPO_NAME/issues/$PR_NUMBER/comments" --paginate |
jq -r '.[] | "\(.id) \(.user.login):\n\(.body)\n---"'The listings print every comment in full, including replies on each thread: a request can sit in a later reply or after a long introduction.
This lists comments that:
- No longer map to a line in the PR diff (`line` is null)
- Are marked "outdated" by GitHub (GraphQL `isOutdated` flag)
- Are general PR discussion comments
**IMPORTANT**: Treat out-of-scope comments as **IN SCOPE** by default.
Evaluation Process
Use **ultrathink** to evaluate each out-of-scope comment:
ultrathink: Analyze this out-of-scope review comment:
- What is the reviewer asking for?
- How complex is this change? (lines of code, files affected)
- Does it require refactoring other systems?
- Can I complete this in under 30 minutes?
- Are there any risks or dependencies?
Recommend: FIX_NOW or CREATE_ISSUE
Decision Matrix
| Criteria | Action | | --------------------------------------------- | ----------------------------------------- | | Simple fix (< 30 min, < 3 files, no refactor) | **FIX_NOW** - Make the change immediately | | Medium complexity (unclear scope) | **ASK_USER** - Present options | | Major refactor (multiple systems, risky) | **CREATE_ISSUE** - Document for follow-up |
Read more
name: handling-pr-comments description: Address PR review feedback systematically — fetch inline comments, review bodies, handle outside-diff-range comments, resolve threads with proper attribution
handling-pr-comments
Use when addressing PR review feedback, after receiving review comments from CodeRabbit, Cursor, or human reviewers - ensures systematic responses to each comment thread with proper attribution and thread resolution.
When to Activate
Activate this skill when ANY of these conditions are true:
- User asks to "address PR comments" or "handle review feedback"
- User mentions CodeRabbit, Cursor bot, or reviewer comments
- User is working on fixes requested in a PR review
- User asks to "check PR comments" or "respond to reviewers"
- After making fixes to address review feedback
CRITICAL: The Complete Workflow
**Most developers forget steps 4-6. This skill ensures they happen.**
Phase 1: Discover and Filter Comments
Run the filtering script to identify actionable comments:
# Filter actionable vs non-actionable comments bin/pr-comments-filter.sh <PR_NUMBER>
This script:
- Filters out non-actionable comments (confirmations, acknowledgments, fingerprinting)
- Categorizes actionable comments by priority (Critical → Low)
- Shows comment IDs and details for processing
Phase 2: Triage Actionable Comments
The filter script categorizes by priority:
| Priority | Marker | Action | | --------------- | -------------------------------------------------------- | ---------------- | | CRITICAL | `_⚠️ Potential issue_ \| _🔴 Critical_` | Fix immediately | | HIGH | `_⚠️ Potential issue_ \| _🟠 Major_` | Fix before merge | | MEDIUM | `_🟡 Minor_` or `_🛠️ Refactor suggestion_ \| _🟠 Major_` | Should fix | | LOW | `_🔵 Trivial_` / `_🧹 Nitpick_` | Fix if quick | | HUMAN | Non-bot comments | Always process |
For each actionable comment, further categorize as:
1. **Bug/Issue** - Must fix 2. **Enhancement** - Should fix 3. **Nitpick** - Nice to fix 4. **Question** - Needs clarification 5. **Intentional** - Decline with explanation 6. **Out-of-Scope** - See Phase 2b
Phase 2b: Extract "Outside Diff Range" Comments from Review Bodies (CRITICAL)
**COMMONLY MISSED**: CodeRabbit posts "Outside diff range" comments in the **review body**, not as inline threads. These are actionable feedback that MUST be addressed.
# Extract Outside diff range comments from review bodies
PR_NUMBER=<number>
OWNER=$(gh repo view --json owner -q .owner.login)
REPO_NAME=$(gh repo view --json name -q .name)
echo "=== OUTSIDE DIFF RANGE COMMENTS ==="
gh api "repos/$OWNER/$REPO_NAME/pulls/$PR_NUMBER/reviews" --paginate | \
jq -r '.[] | select(.body | test("Outside diff range"; "i")) |
"Review ID: \(.id)\n\(.body)\n---"'**These comments are NOT in threads** - they cannot be replied to inline. You must:
1. Parse the file paths and line numbers from the review body 2. Address the feedback in your code 3. Commit and push 4. Leave a general PR comment acknowledging you addressed them
Phase 2c: Handle Other Out-of-Scope Comments
List the out-of-scope comments:
PR_NUMBER=<number>
OWNER=$(gh repo view --json owner -q .owner.login)
REPO_NAME=$(gh repo view --json name -q .name)
echo "=== UNRESOLVED THREADS OUTSIDE THE CURRENT DIFF ==="
# isOutdated: the code changed since the comment. line == null on a line
# comment (not a FILE-level one): it no longer maps to a line in the PR diff.
gh api graphql --paginate -F owner="$OWNER" -F repo="$REPO_NAME" -F pr="$PR_NUMBER" -f query='
query($owner:String!, $repo:String!, $pr:Int!, $endCursor:String) {
repository(owner:$owner, name:$repo) { pullRequest(number:$pr) {
reviewThreads(first:100, after:$endCursor) {
pageInfo { hasNextPage endCursor }
nodes { id isResolved isOutdated subjectType path line originalLine
comments(first:100) { nodes { author { login } body } } } } } } }' |
jq -r '.data.repository.pullRequest.reviewThreads.nodes[]
| select((.isResolved | not) and (.isOutdated or (.line == null and .subjectType != "FILE")))
| "\(.id) \(.path):\(.originalLine) outdated=\(.isOutdated)\n"
+ ([.comments.nodes[] | "[\(.author.login)] \(.body)"] | join("\n\n")) + "\n---"'
echo "=== GENERAL PR DISCUSSION COMMENTS ==="
gh api "repos/$OWNER/$REPO_NAME/issues/$PR_NUMBER/comments" --paginate |
jq -r '.[] | "\(.id) \(.user.login):\n\(.body)\n---"'The listings print every comment in full, including replies on each thread: a request can sit in a later reply or after a long introduction.
This lists comments that:
- No longer map to a line in the PR diff (`line` is null)
- Are marked "outdated" by GitHub (GraphQL `isOutdated` flag)
- Are general PR discussion comments
**IMPORTANT**: Treat out-of-scope comments as **IN SCOPE** by default.
Evaluation Process
Use **ultrathink** to evaluate each out-of-scope comment:
ultrathink: Analyze this out-of-scope review comment: - What is the reviewer asking for? - How complex is this change? (lines of code, files affected) - Does it require refactoring other systems? - Can I complete this in under 30 minutes? - Are there any risks or dependencies? Recommend: FIX_NOW or CREATE_ISSUE
Decision Matrix
| Criteria | Action | | --------------------------------------------- | ----------------------------------------- | | Simple fix (< 30 min, < 3 files, no refactor) | **FIX_NOW** - Make the change immediately | | Medium complexity (unclear scope) | **ASK_USER** - Present options | | Major refactor (multiple systems, risky) | **CREATE_ISSUE** - Document for follow-up |
A self-improving multi-agent orchestration framework for Claude Code, Gemini CLI, and Codex CLI.
Other skills on metaswarm.
More skills from other plugins.
agentmail
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
adr-create
Create a new Architecture Decision Record with sequential numbering and AgentDB registration
Questions about handling-pr-comments.
- Which coding agents can use handling-pr-comments?
- handling-pr-comments installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

