Loading...
Loading...
Use this skill when addressing, responding to, or resolving PR review comments on GitHub pull requests. Triggers on "address PR comments", "respond to review", "handle review feedback", "reply to PR comments", "fix review comments", or when the user wants to process open review threads on their PR. Uses the gh CLI to fetch unresolved comments, make code changes where agreed, and post batch replies with a humble, thankful tone.
npx skill4agent add absolutelyskilled/absolutelyskilled address-pr-commentsghghgh auth statusgh pr view --json number,title,url -q '.number'Gotcha: This only works if the current branch has an open PR. If it fails, ask the user for the PR number or URL.
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments --paginateidbodypathlineoriginal_linediff_hunkin_reply_to_iduser.logingh api repos/{owner}/{repo}/pulls/{pr_number}/reviews --paginatein_reply_to_idin_reply_to_idGotcha: Thefield links replies to their parent comment. Comments without this field are root comments. Always check the full thread before deciding a comment is unaddressed.in_reply_to_id
pathGotcha: Multiple comments may affect the same file or even the same lines. Process them carefully to avoid conflicting edits. Read the file fresh before each edit if multiple comments target the same file.
Good catch! Updated [brief description of change]. Thanks for the review!Thanks for flagging this - you're right. Fixed in the latest push.Great suggestion! Refactored to [what was done]. Appreciate the feedback.Thanks for the suggestion! I considered this, but went with [current approach] because [reason]. Happy to discuss further if you see issues with this approach.Appreciate the review! The current implementation is intentional here - [brief reason]. Let me know if you think there's still a concern.| # | File | Comment (summary) | Action | Reply (draft) |
|---|------|-------------------|--------|---------------|
| 1 | src/api.ts:42 | Missing null check | Agreed - Fixed | "Good catch! Added null check..." |
| 2 | src/utils.ts:15 | Use lodash instead | Deferred | "Thanks! Kept native impl because..." |gh api repos/{owner}/{repo}/pulls/{pr_number}/comments \
-method POST \
-f body="Good catch! Updated the null check. Thanks for the review!" \
-F in_reply_to={parent_comment_id}Gotcha: Useto thread the reply under the original comment. Do NOT create a new top-level review comment - always reply in the existing thread. Thein_reply_tovalue should be thein_reply_toof the root comment in the thread.id
| Error | Cause | Resolution |
|---|---|---|
| gh CLI not installed | Ask user to install: |
| gh not authenticated | Run |
| Wrong repo or PR doesn't exist | Verify PR number and repo |
| Invalid | Verify the comment ID exists and belongs to the PR |
| No unaddressed comments | All comments already replied to | Inform the user - nothing to do |
| Mistake | Why it's wrong | What to do instead |
|---|---|---|
| Agreeing with everything | Wastes effort, may introduce bad changes | Exercise judgment - defer when current approach is better |
| Being defensive in replies | Creates friction, poor collaboration | Stay humble: "Thanks for the suggestion" even when deferring |
| Posting replies before user approval | User loses control over what's posted | Always batch and present for approval first |
| Replying as top-level comments | Breaks the review thread structure | Always use |
| Ignoring diff context | May misunderstand what the reviewer is pointing at | Always read |
references/references/gh-api-reference.md