Fetch all unresolved comments. Separate human comments from bot/automated comments (Copilot, github-actions, etc.).
Present this plan to the human — what will be changed, what needs discussion, and what is stale. Wait for explicit approval before proceeding. This is the first approval gate; complete it before moving to step 4.
Write a markdown triage file to /tmp/{PR_NUMBER}.md (where {PR_NUMBER} is the numeric PR number from the PR URL or gh pr view output). If the file already exists from a prior run, overwrite it entirely. The file MUST contain a table with these columns:
| Author | Thread ID | File:Line | Summary | Agent Assessment | Decision | |——–|———–|———–|———|——————|———-|
list-unresolved-threads.shDecision: leave this column blank — the human fills it in. Valid values the human may enter: implement |
ignore |
discuss |
defer |
Tell the human the file path and instruct them to open it, fill in the Decision column, and return it. Do not implement or resolve any bot threads until the human returns the filled-in file. If the human never returns the file or says to skip, proceed without addressing bot comments.
Once the human returns the filled-in file, act on each thread according to its Decision value:
implement: Make the code change. Then reply inside the thread referencing the commit SHA where the fix landed, and resolve the thread.ignore: Reply inside the thread explaining that the suggestion was reviewed and intentionally not adopted (one sentence why). Then resolve the thread.discuss: Reply inside the thread with the agent’s assessment and any relevant context to move the conversation forward. Do not resolve — leave the thread open for human follow-up.defer: Reply inside the thread explaining that the suggestion is valid but being deferred (include a ticket link or note if one exists). Then resolve the thread.Take actions based on human input from both approval gates. For discussion-type comments, post a reply inside the review thread (not as a top-level PR comment) using gh api repos/{owner}/{repo}/pulls/{pull_number}/comments -X POST -f body="..." -f in_reply_to={comment_id}, where {comment_id} is the numeric ID of the original inline comment (from the gh api .../pulls/{pr}/comments response). Never use gh pr comment for thread replies — that posts at the top level.
Identity disclosure (required on every posted comment): Any comment posted on behalf of the human MUST begin with:
_Posted by {your identity} on behalf of @<github-handle>._(using your identity from CLAUDE.md), then the reply body. Never omit this line.
/critique to ensure changes are reviewed, committed, and pushed.Attempt to resolve addressed PR comment threads. The gh CLI still has no native resolve command, so use the helper scripts in this skill’s folder:
# List unresolved threads (tab-separated: id, path:line, author, snippet)
$HOME/.claude/skills/address-pr-comments/list-unresolved-threads.sh <pr-number|pr-url> [--repo OWNER/REPO]
# Resolve specific threads by ID
$HOME/.claude/skills/address-pr-comments/resolve-threads.sh <thread-id> [<thread-id>...]
# Or resolve every unresolved thread on a PR
$HOME/.claude/skills/address-pr-comments/resolve-threads.sh --all <pr-number|pr-url> [--repo OWNER/REPO]
Always use the absolute paths above — these scripts live in $HOME/.claude/skills/, not in the user’s repo. Only resolve threads whose feedback you actually addressed. Skip discussion-type threads that are still waiting on a human reply. Resolution requires triage/write permission on the repo — report any failures to the human.
gh pr checks. If any checks are failing, invoke /resolve-ci-failures to investigate and fix them.