From workflow-skills
Systematic 5-phase workflow for handling PR review comments. Fetches review threads via gh api (not gh pr view), triages by priority, executes fixes via sub-agent, posts inline GitHub replies, and commits. Invoke when asked to "address PR feedback", "respond to review comments", or "handle PR review".
How this skill is triggered — by the user, by Claude, or both
Slash command
/workflow-skills:address-pr-feedbackThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Systematic workflow for triaging and resolving GitHub PR review comments. This skill covers the full cycle: fetch, plan, fix, reply, and finalize.
Systematic workflow for triaging and resolving GitHub PR review comments. This skill covers the full cycle: fetch, plan, fix, reply, and finalize.
Before starting, confirm:
42)owner/repo format (e.g., DataDog/my-repo)If not provided, ask: "Which PR number and repo should I address feedback for?"
Use the full REST API to get pull request review comment IDs. These are the IDs needed for inline replies and are different from the general PR comment IDs returned by gh pr view.
gh api repos/<owner>/<repo>/pulls/<number>/comments \
--jq '[.[] | {id: .id, path: .path, line: .line, body: .body, user: .user.login, url: .html_url, diff_hunk: .diff_hunk}]'
Also fetch general (non-inline) PR comments:
gh api repos/<owner>/<repo>/issues/<number>/comments \
--jq '[.[] | {id: .id, body: .body, user: .user.login}]'
Save to ~/workspace/work-artifacts/<TICKET-ID>/pr-<number>-review.md (create directory if needed):
# PR #<number> Review Notes
**PR**: <url>
**Date**: <YYYY-MM-DD>
**Reviewer(s)**: <list>
## Triage
### P0 — Must Fix (correctness, security, blocking)
- [ ] Comment ID `<id>` [@<user>, `<file>:<line>`]: <summary>
### P1 — Should Fix (important improvements, style violations)
- [ ] Comment ID `<id>` [@<user>, `<file>:<line>`]: <summary>
### P2 — Nice to Have (suggestions, optional improvements)
- [ ] Comment ID `<id>` [@<user>, `<file>:<line>`]: <summary>
### Acknowledged (no change needed — explain why)
- Comment ID `<id>`: <reason for no-change>
## Reply Drafts
For each comment, draft a reply here before posting:
### Comment <id>
**Fix**: <what will be done>
**Reply**: "<draft reply text>"
Present the triage to the user and get approval before proceeding to Phase 2.
For P0 and P1 items, outline the fix approach:
For P2 and Acknowledged items, draft a reply explaining why no change is being made (or that a follow-up ticket has been created).
Present the fix plan to the user. Confirm before executing.
Launch a sub-agent (general-purpose) to implement the changes:
"Implement the following PR feedback fixes for PR # in /. Changes needed: [paste P0/P1 fix list from review notes]. Follow existing code conventions, use TypeScript, run tests after changes."
Monitor and verify:
npm test / npm run test for JS/TSpytest for PythonCommit using Conventional Commits. Stage specific files only:
git add <specific files>
git commit -m "fix(<scope>): <description addressing review feedback>"
Do not include Claude attribution in commits. Do not use --no-verify.
For each comment addressed (P0, P1, P2, Acknowledged), post an inline reply using the pull request review comment ID obtained in Phase 1.
Important: Use the review comment ID (from /pulls/<number>/comments), not the issue comment ID:
gh api repos/<owner>/<repo>/pulls/comments/<comment-id>/replies \
--method POST \
--field body="<reply text>"
Reply guidelines:
After posting all replies, verify they appear correctly:
gh pr view <number> --repo <owner>/<repo> --comments
Push the branch:
git push
Update the review notes file with final status (mark all items complete).
If all reviewers' concerns are addressed, re-request review:
gh pr edit <number> --repo <owner>/<repo> --add-reviewer <reviewer-username>
(Only do this if the user confirms.)
Report to user:
~/workspace/work-artifacts/ — create the directory if it doesn't exist.pr-<number> as the directory name: ~/workspace/work-artifacts/pr-<number>/.npx claudepluginhub arosenkranz/claude-code-config --plugin workflow-skillsReads open GitHub PR review comments, triages by severity, applies code fixes, and drafts replies. Use when addressing PR feedback or code review.
Processes PR review feedback by analyzing comments, implementing fixes, committing, pushing, replying on GitHub, and resolving threads. Triggered by /pr-respond or relevant queries.
Fetches and filters PR review comments, extracts outside-diff-range feedback from review bodies, and resolves threads with proper attribution. Useful when addressing CodeRabbit, Cursor, or human reviewer feedback.