一键导入
review-pr-comments
This is used to review comments on an active pull request and decide whether to accept, iterate, or reject the changes suggested in each comment.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
This is used to review comments on an active pull request and decide whether to accept, iterate, or reject the changes suggested in each comment.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | review-pr-comments |
| description | This is used to review comments on an active pull request and decide whether to accept, iterate, or reject the changes suggested in each comment. |
We have received comments on the current active pull request. Together, we will go through each comment one by one and discuss whether to accept the change, iterate on it, or reject the change.
activePullRequest tool from the GitHub Pull Requests toolset to get the details of the active pull request including the comments. If not, use the GitHub MCP server or GitHub CLI to get the details of the active pull request. Fetch both top level comments and inline comments.This guide explains how to reply directly to inline review comments on GitHub pull requests.
When available, prefer the GitHub MCP server tool add_reply_to_pull_request_comment over manual API or CLI calls.
Use add_reply_to_pull_request_comment with:
ownerrepopullNumbercommentIdbodyThis posts a threaded reply directly on the review comment.
To reply to an inline PR comment, use:
POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies
With body:
{
"body": "Your reply message"
}
gh api repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies \
-X POST \
-f body="Your reply message"
Get PR comments: First fetch the PR review comments to get their IDs:
gh api repos/{owner}/{repo}/pulls/{pull_number}/comments
Identify comment IDs: Each comment has an id field. For threaded comments, use the root comment's id.
Post replies: For each comment you want to reply to, use add_reply_to_pull_request_comment when available. If it is not available, fall back to:
gh api repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies \
-X POST \
-f body="Fixed in commit abc123"
For accepted changes:
For rejected changes:
For questions:
comment_id is the numeric ID from the comment object, NOT the node_idTo resolve (mark as resolved) PR review threads, use the GraphQL API:
Get thread IDs: Query for unresolved threads:
gh api graphql -f query='
query {
repository(owner: "{owner}", name: "{repo}") {
pullRequest(number: {pull_number}) {
reviewThreads(first: 50) {
nodes {
id
isResolved
comments(first: 1) {
nodes { body path }
}
}
}
}
}
}'
Resolve threads: Use the resolveReviewThread mutation:
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "PRRT_xxx"}) {
thread { isResolved }
}
}'
Resolve multiple threads at once:
gh api graphql -f query='
mutation {
t1: resolveReviewThread(input: {threadId: "PRRT_xxx"}) { thread { isResolved } }
t2: resolveReviewThread(input: {threadId: "PRRT_yyy"}) { thread { isResolved } }
}'
The thread ID starts with PRRT_ and can be found in the GraphQL query response.
Note: This skill now prefers the GitHub MCP server for replying to PR review comments. Resolving review threads may still require GraphQL or another fallback until MCP support is available. See: https://github.com/github/github-mcp-server/issues/1323 https://github.com/github/github-mcp-server/issues/1768