一键导入
pr-comment
handling GitHub PR comments with proper replies
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
handling GitHub PR comments with proper replies
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| 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: