← ClaudeAtlas

respond-to-commentslisted

Work through review comments on a GitHub PR. Use when asked to respond to PR comments or review feedback
malone-c/skills · ★ 0 · Code & Development · score 73
Install: claude install-skill malone-c/skills
# Respond to PR comments Answer every review comment on a PR that has not been answered yet. One comment at a time: investigate, decide, fix if accepted, reply. ## 1. Resolve the target ```bash PR="${1:-$(gh pr view --json number -q .number)}" REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner) ME=$(gh api user -q .login) ``` If `gh pr view` finds no PR for the current branch, stop and say so. ## 2. Collect comments Three sources, all of them: ```bash gh api "repos/$REPO/pulls/$PR/comments" --paginate # inline, threaded via in_reply_to_id gh api "repos/$REPO/issues/$PR/comments" --paginate # top-level conversation gh api "repos/$REPO/pulls/$PR/reviews" --paginate # review summary bodies ``` Skip resolved and outdated inline threads — those points are settled: ```bash gh api graphql -f query=' query($owner:String!,$name:String!,$pr:Int!){repository(owner:$owner,name:$name){ pullRequest(number:$pr){reviewThreads(first:100){nodes{ isResolved isOutdated comments(first:50){nodes{databaseId}}}}}}}' \ -f owner="${REPO%/*}" -f name="${REPO#*/}" -F pr="$PR" ``` ## 3. Filter to unanswered Every reply this skill posts ends with a hidden marker naming the comment it answers: ```html <!-- responded-to: 1234567 --> ``` Collect those ids from all comments authored by `$ME`. A comment is unanswered if its id is not in that set. Then drop everything that is not actually review feedback: - **Status automation.** Preview deploy links, coverage reports,