From claude-code-tools
Address review/issue comments on the open GitHub PR for the current branch. Fetches all comments and review threads, summarizes what needs attention, and helps apply fixes. Use when responding to PR feedback, resolving review comments, or when user mentions "address comments" or "fix review feedback".
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-tools:gh-address-commentsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Fetch and address review comments on the open PR for the current branch using the `gh` CLI.
Fetch and address review comments on the open PR for the current branch using the gh CLI.
# Fetch all comments for current branch's PR
${SKILL_DIR}/scripts/fetch-comments.sh
# Fetch comments for specific PR
${SKILL_DIR}/scripts/fetch-comments.sh 123
# Reply to a review thread after fixing
${SKILL_DIR}/scripts/reply-to-thread.sh "PRRT_threadId" "Fixed in this commit"
Run the fetch script to get all PR comments:
COMMENTS=$(${SKILL_DIR}/scripts/fetch-comments.sh)
Present a numbered list of actionable items:
review_threads entry (inline comments on specific lines)conversation_comments entry (general PR comments)isResolved: true)Example summary format:
## PR Comments Needing Attention
1. [src/app.ts:42] Missing null check before accessing property
2. [src/utils.ts:15-20] Consider extracting to helper function
3. [General] Add tests for edge cases
Which comments would you like me to address? (e.g., "1,3" or "all")
Ask which numbered comments to address. Options:
1,3allnoneFor each selected comment:
After applying fixes, reply to the review threads to acknowledge:
# For each addressed thread (use the thread id from fetch-comments.sh)
${SKILL_DIR}/scripts/reply-to-thread.sh "$THREAD_ID" "Fixed in this commit"
Suggested reply formats:
"Fixed in commit abc123" - Reference the fix commit"Addressed by [description of change]" - Describe the fix"Will address in follow-up PR" - For deferred itemsFetches all PR comments using GitHub GraphQL API.
Usage:
${SKILL_DIR}/scripts/fetch-comments.sh [PR_NUMBER]
Output:
{
"pull_request": {
"number": 123,
"url": "https://github.com/owner/repo/pull/123",
"title": "Add new feature",
"state": "OPEN",
"owner": "owner",
"repo": "repo"
},
"conversation_comments": [
{
"id": "IC_...",
"body": "Please add tests",
"author": "reviewer",
"createdAt": "2024-01-15T10:00:00Z"
}
],
"reviews": [
{
"id": "PRR_...",
"state": "CHANGES_REQUESTED",
"body": "Good start, but needs some changes",
"author": "reviewer",
"submittedAt": "2024-01-15T10:00:00Z"
}
],
"review_threads": [
{
"id": "PRRT_...",
"isResolved": false,
"isOutdated": false,
"path": "src/app.ts",
"line": 42,
"comments": [
{
"id": "PRRC_...",
"body": "Missing null check here",
"author": "reviewer",
"createdAt": "2024-01-15T10:00:00Z"
}
]
}
]
}
Reply to a PR review thread after addressing feedback.
Usage:
${SKILL_DIR}/scripts/reply-to-thread.sh <thread_id> <body>
Arguments:
| Argument | Description |
|---|---|
thread_id | The review thread ID from fetch-comments.sh (e.g., PRRT_kwDO...) |
body | The reply message text |
Output:
{
"id": "PRRC_...",
"body": "Fixed in commit abc123",
"url": "https://github.com/owner/repo/pull/123#discussion_r12345",
"author": "your-username",
"createdAt": "2024-01-15T10:30:00Z"
}
Example:
# After fixing an issue, reply to acknowledge
${SKILL_DIR}/scripts/reply-to-thread.sh "PRRT_kwDOExample123" "Fixed by adding null check"
The script returns JSON errors:
{
"error": true,
"message": "gh CLI not authenticated. Run 'gh auth login' first.",
"code": "AUTH_REQUIRED"
}
Error codes:
| Code | Description |
|---|---|
GH_NOT_INSTALLED | gh CLI not installed |
AUTH_REQUIRED | Run gh auth login |
JQ_NOT_INSTALLED | jq not installed |
NOT_GIT_REPO | Not in a git repository |
NO_PR | No PR found for current branch |
API_ERROR | GitHub API error |
gh CLI installed and authenticated (gh auth login)jq for JSON processingAdapted from openai/skills/gh-address-comments
npx claudepluginhub nilpath/nilpath-marketplace --plugin claude-code-toolsReads and responds to PR review comments or issue feedback systematically using the GitHub CLI. Useful for ensuring all feedback on a pull request is addressed.
Fetches GitHub PR review comments via gh CLI and Python script, creates task checklists for threads, links commits to reviews, and blocks completion until all resolved. Use for systematic PR feedback handling.
Reads open GitHub PR review comments, triages by severity, applies code fixes, and drafts replies. Use when addressing PR feedback or code review.