with one click
pr-comment
handling GitHub PR comments with proper replies
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
handling GitHub PR comments with proper replies
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | pr-comment |
| description | handling GitHub PR comments with proper replies |
| argument-hint | comment link (e.g. https://github.com/wharflab/tally/pull/134#discussion_r2815672223) |
You are handling a GitHub PR review comment. Follow this procedure exactly:
The user will provide a URL in this format:
https://github.com/<owner>/<repo>/pull/<PR_NUMBER>#discussion_r<COMMENT_ID>
Extract:
owner and repo from the URLPR_NUMBER - digits between /pull/ and #COMMENT_ID - digits after discussion_rUse this command to fetch the comment:
gh api repos/<owner>/<repo>/pulls/comments/<COMMENT_ID> \
--jq '
"id: \(.id)
pr_number: \(.pull_request_url | split("/") | last)
author: \(.user.login)
created_at: \(.created_at)
file: \(.path)
line: \(.start_line // .line)
--- BEGIN_BODY ---
\(.body)
--- END_BODY ---"'
Display this information to the user.
CRITICAL RULES:
After applying all changes:
Stage the changed files
Create a commit with this format:
fix: address PR review comment
<brief description of what was changed>
Addresses: https://github.com/<owner>/<repo>/pull/<PR_NUMBER>#discussion_r<COMMENT_ID>
Push to the current branch
Capture the short commit SHA (7 chars)
Reply DIRECTLY to the specific comment (not a new review, not a top-level comment):
gh api repos/<owner>/<repo>/pulls/<PR_NUMBER>/comments/<COMMENT_ID>/replies \
-X POST -f body='✅ Addressed in <short-sha>. Thanks @<author>!' --jq '"💬 Replied to comment \(.in_reply_to_id)"'
Replace:
<short-sha> with the 7-character commit hash<author> with the comment author’s username, dropping [bot] suffix if anyIMPORTANT: the above API WORKS! If you are getting 404 or similar error - verify that you've built the URL correctly, don't fallback to post a generic comment on PR!
Show the user:
If any step fails: