Skip to content
Agent Orchestration
Skill

/handling-pr-comments

Address PR review feedback systematically — fetch inline comments, review bodies, handle outside-diff-range comments, resolve threads with proper attribution

From plugin
metaswarm
43214 skills23 agents16 commands2 hooks

Claude Code

$ npx -y skills add dsifry/metaswarm --skill handling-pr-comments --agent claude-code

SKILL.md

handling-pr-comments.SKILL.md
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 |

Read more
@dsifry
Ships withmetaswarm

A self-improving multi-agent orchestration framework for Claude Code, Gemini CLI, and Codex CLI.

43214 skills23 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
432
Star history of dsifry/metaswarm on GitHub, a chart by star-history.com

Other skills on metaswarm.

brainstorming-extension

brainstorming-extensio…

Loads the assumption ledger and misreadings checklist at the start of brainstorming, and enforces the design review gate when a…

@dsifry@dsifryInstall Skill
create-issue

create-issue

Create comprehensive GitHub issues with TDD plans, acceptance criteria, and agent instructions for autonomous PR lifecycle…

@dsifry@dsifryInstall Skill
design-review-gate

design-review-gate

Automatic review gate that runs when brainstorming commits a project-sized design doc - spawns PM, Architect, Designer, Security,…

@dsifry@dsifryInstall Skill
external-tools

external-tools

Delegate implementation and review tasks to external AI CLI tools (Codex, Gemini) with cross-model adversarial review

@dsifry@dsifryInstall Skill
handoff

handoff

Analyze the current session and write a self-contained handoff document so a fresh agent can resume the work with full context —…

@dsifry@dsifryInstall Skill
migrate

migrate

Migrate from npm-installed metaswarm to the marketplace plugin — removes redundant files with safety checks

@dsifry@dsifryInstall Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw4d395k
@steipete@steipeteInstall Skill
jira-tickets

jira-tickets

Read and update Jira tickets through Orca's saved Jira connections. Use when a task comes from Jira or the user asks for Jira…

orca2d128k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip3d114k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

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.