From hoopit-dev
Review and resolve all review comments on a GitHub PR — fetch comments, evaluate each one, apply fixes where needed, and reply to resolve them.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hoopit-dev:review-github-commentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- The `gh` CLI must be authenticated.
gh CLI must be authenticated.Ask the user for the PR URL if not provided. Extract the <owner>/<repo> and <pr_number> from the URL.
Fetch the raw comments:
gh api repos/<owner>/<repo>/pulls/<pr_number>/comments --paginate
Then check which threads are actually unresolved via GraphQL (the REST comments API has no resolved field):
gh api graphql -f query='
{
repository(owner: "<owner>", name: "<repo>") {
pullRequest(number: <pr_number>) {
reviewThreads(first: 50) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
databaseId
}
}
}
}
}
}
}'
Cross-reference databaseId with the REST comment IDs to build a map of comment_id → isResolved. Process only threads where isResolved: false.
Read the comment — understand the reviewer's finding, suggestion, or question.
Locate the relevant code — use the path and line/original_line fields to find the file and line(s) in the local codebase.
Evaluate the comment — determine whether:
Take action based on evaluation:
Replying to a comment (works for both replies and disagreements):
gh api repos/<owner>/<repo>/pulls/<pr_number>/comments \
--field in_reply_to=<comment_id> \
--field body="Your reply text here."
Note:
in_reply_tomust be an integer. Do not use-f(string flag) — use--fieldso it is sent as a number.
Resolving a thread requires the GraphQL mutation (the REST API has no resolve endpoint). Use the id field from the GraphQL thread query above:
gh api graphql -f query='
mutation {
resolveReviewThread(input: { threadId: "<PRRT_...node_id>" }) {
thread { isResolved }
}
}'
After processing all comments:
fix: address PR review comments
Resolved comments from coderabbitai on PR #<pr_number>.
Print a summary table of all processed comments:
| # | File | Reviewer | Action | Resolved? |
|---|---|---|---|---|
| 1 | path/to/file | coderabbitai | Applied fix | ✅ Yes |
| 2 | path/to/other | coderabbitai | Invalid — explained why | ✅ Yes |
| 3 | path/to/another | coderabbitai | Shared findings, needs discussion | ❌ No |
Only resolve a comment thread if one of the following is true:
- You implemented a code change that addresses the comment.
- You determined the comment is invalid/not applicable and explained why.
In all other cases, reply with your findings but leave the thread unresolved.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub hoopit/skills --plugin hoopit-dev