/address-pr-comments:address-pr-comments-human <pr-number-or-comment-url>from address-pr-comments
Addresses PR comments with human approval before pushing changes or posting replies. Supports targeting a single comment URL or all unresolved threads on a PR.
Ships in address-pr-comments. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Parse $ARGUMENTS to determine the mode.
Codex: if the invocation text above is not populated, use the text after the skill name. If unavailable, infer the PR number or comment URL from the current request.
https://github.com/{owner}/{repo}/pull/{number}#discussion_r{id} or #pullrequestreview-{id}
owner, repo, pr_number, and comment_anchor (the fragment after #)Do NOT push commits or post replies until the user approves. Write drafts first, then after approval: push and post.
Use GraphQL to get the true resolution status of every thread. Do NOT guess resolution based on replies.
Get the PR details: gh pr view {pr_number} (use -R {owner}/{repo} if the URL points to a different repo than cwd)
Fetch all review threads with resolution status using GraphQL:
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviews(last: 50) {
nodes {
id, databaseId, state, author { login }, body, url
}
}
reviewThreads(last: 100) {
nodes {
isResolved
comments(first: 50) {
nodes {
id, databaseId, author { login }, body, path, line, url
}
}
}
}
}
}
}
' -f owner='{owner}' -f repo='{repo}' -F pr={pr_number}
Also fetch general issue-style comments: gh api repos/{owner}/{repo}/issues/{pr_number}/comments
Filter to actionable items:
If single-comment mode (URL with #discussion_r{id} or #pullrequestreview-{id}):
discussion_r{id}: match against comment databaseId fields in reviewThreads — the target thread is the one containing a comment with that databaseIdpullrequestreview-{id}: match against review databaseId fields in reviewsisResolved == true (tell the user it's already resolved)If all-comments mode (PR number only):
isResolved == true — these are already resolved in GitHubCHANGES_REQUESTED that have not been superseded by a newer APPROVED or DISMISSED review from the same authorClassify each actionable item as review_thread_comment, issue_comment, or top_level_review. Retain its author, URL, database ID, and any file/line metadata. Do not assume every item has a pull-request review comment ID.
For each comment that needs addressing, create a beads (bd create) task.
Include in the description:
html_url field)Load project conventions (if available):
If the CODE_CONVENTIONS environment variable is set and points to a readable file, read it now. These are project-specific patterns and gotchas to keep in mind when implementing fixes — they prevent introducing new violations while fixing old ones.
For each task (one at a time, in order):
bd update <task-id> --status=in_progressFix: address review feedback on <file> — <what changed>)human-in-loop-drafts/pr-{number}/{item_type}-{database_id}.md and the exact proposed reply body to a sibling human-in-loop-drafts/pr-{number}/{item_type}-{database_id}-reply.md. Do NOT post via gh api.# Comment by @{author}
**Item Type:** {review_thread_comment|issue_comment|top_level_review}
**Database ID:** {database_id}
**File:** {file}:{line}
**Comment:** {comment text}
**Link:** {html_url}
## Code Changes
{`git show --stat` output for the commit, or "No changes — explanation only"}
## Commit Message
{full commit message}
## Proposed Reply
{the reply you would post}
bd close <task-id>bd dolt pushhuman-in-loop-drafts/pr-{number}/git log --oneline origin/HEAD..HEADWhen the user approves (or asks you to proceed):
git pushreview_thread_comment: gh api --method POST repos/{owner}/{repo}/pulls/{pr_number}/comments/{comment_id}/replies -F body=@<reply-file>issue_comment or top_level_review: ensure the reply mentions the author and links the original item, then run gh api --method POST repos/{owner}/{repo}/issues/{pr_number}/comments -F body=@<reply-file>human-in-loop-drafts/pr-{number}/ directory (prefer moving it to trash when practical). Remove human-in-loop-drafts/ itself only if it is empty, and report what was removed.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jtsternberg/claude-plugins --plugin address-pr-comments2 skills in this plugin