Loading...
Loading...
Fetch review comments from an existing GitHub pull request and implement the requested changes. Use when user says 'address PR feedback', 'implement review comments', 'fix the PR review', 'reviewer asked for changes', or 'my PR got comments'. Do NOT use for initial PR creation (use create-pr) or for writing your own review (use review-diff).
npx skill4agent add thommann/skills implement-feedback-from-prghgh auth statusCLAUDE.mdskills/workflow/review-diff/SKILL.mdreview-diff# Current branch's PR (if one exists)
gh pr view --json number,title,url
# Or by number if the user gave one
PR=<number>
gh pr view "$PR" --json number,title,urlPR=<number>
# PR-level "conversation" comments (top-level on the PR)
gh api "repos/{owner}/{repo}/issues/$PR/comments" > /tmp/pr-conversation.json
# Review comments (inline on specific lines)
gh api "repos/{owner}/{repo}/pulls/$PR/comments" > /tmp/pr-inline.json
# Review summaries with verdicts (approved / changes requested)
gh api "repos/{owner}/{repo}/pulls/$PR/reviews" > /tmp/pr-reviews.jsonjq -r '.[] | "[\(.user.login)] \(.body)"' /tmp/pr-conversation.json
jq -r '.[] | "[\(.user.login)] \(.path):\(.line // .original_line) — \(.body)"' /tmp/pr-inline.json
jq -r '.[] | select(.body != null and .body != "") | "[\(.user.login)] \(.state) — \(.body)"' /tmp/pr-reviews.json| Bucket | What to do |
|---|---|
| Must change — reviewer is correct, apply the change | Implement, commit separately, reply to the thread linking the commit |
| Question — reviewer asked something | Answer in-thread; no code change needed |
| Discuss — reviewer suggested an alternative worth considering | Reply with your reasoning; if you agree, move to "must change"; if not, explain why |
| Out of scope — valid point but outside this PR's goal | Reply acknowledging, link to a follow-up issue you create |
| Nit / optional — formatting, personal preference | Apply if easy, otherwise acknowledge |
git add <file>
git commit -m "fix: address review feedback on <file> — <one-line summary>"git pushgh issue create --title "Follow-up: <one-line>" --body "$(cat <<EOF
Raised in #<PR-number>:
> <quote from the comment>
<your proposed scope>
EOF
)"id/tmp/pr-inline.jsongh api -X POST "repos/{owner}/{repo}/pulls/$PR/comments/<comment-id>/replies" \
-f body="Addressed in <commit-sha>. <optional note>."gh api -X POST "repos/{owner}/{repo}/issues/$PR/comments" \
-f body="Addressed in <commit-sha>. <optional note>."gh pr comment "$PR" --body "All feedback addressed in <range-of-commits>. Re-requesting review."
gh pr review-request "$PR" --reviewer <reviewer-login> # if the project uses review-request# Every must-change comment has a commit that references it
git log --oneline origin/main..HEAD | grep -i "review\|feedback"
# Lint/tests still pass after the changes (pull from CLAUDE.md Quick Reference)
# CI has re-run on the latest commit
gh pr checks "$PR"| Mistake | Correction |
|---|---|
| Squashing review fixes into the original commits | Keep them separate. The PR reviewer needs to see what changed since they last looked. |
| Silently ignoring a comment | Reply to every comment. "Deferred to follow-up #123" is a valid reply; silence is not. |
| Applying changes you disagree with without pushback | If the reviewer is wrong, reply explaining why. Healthy reviews are dialogues, not dictations. |
| Missing reviews posted as top-level PR comments | Fetch all three comment APIs ( |