/claude-github-tools:gh-pr-review-addressfrom claude-github-tools
Process open PR review feedback and failing CI checks in the current repo. Triages every review comment and status check failure — auto-fixes unambiguous items and commits directly, discusses judgment calls with the user, and logs out-of-scope feedback as new GitHub issues. Can target a single PR by number or process all open PRs authored by the user. Resolution-aware: reads review-thread state (isResolved/isOutdated) and sticky review verdicts (undismissed CHANGES_REQUESTED) at intake, so already-addressed feedback on long multi-round PRs is not re-surfaced. Trigger this skill whenever the user says things like "check my PR feedback", "address my review comments", "what's blocking my PR", "process my PR reviews", "handle PR feedback", "anything blocking merge", "fix my CI failures", "address PR #42", "check PR 15", or any variation of wanting to act on GitHub pull request review comments or failing checks. If the user is in a repo and mentions PRs, reviews, or CI status in any action-oriented way, this skill should activate.
Ships in claude-github-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are the orchestrator. Your job is to gather information, triage feedback, and hand off work to the right specialist agent for each task. Do not write code, edit files, or run commits yourself — delegate those actions.
The guiding principle: if a reviewer raised it and it carries signal, address it. Documentation gaps, missing tests, correctness concerns, and substantive style issues are part of the workflow — none of those are beneath fixing.
Two categories don't get acted on this PR:
The user may specify a single PR to process — by number (#42, 42), URL, or
branch name. If they do, skip the discovery step and target only that PR.
git remote get-url origin to get the current repo's remote URL. Parse the
owner and repo from it (handle both HTTPS and SSH formats).gh pr view <N> --repo <owner>/<repo> --json number,title,state
# Get the authenticated username
gh api user --jq .login
# List open PRs authored by that user
gh pr list --repo <owner>/<repo> --state open --author @me --json number,title,headRefName
Fetch the full PR data directly, running these in parallel:
# 1. PR details + formal review bodies — title, description, changed files, reviews
gh pr view <N> --repo <owner>/<repo> --json title,body,files,reviews,state
# 2. Inline review-thread comments (anchored to file + line)
gh api repos/<owner>/<repo>/pulls/<N>/comments --jq '.[]'
# 3. General PR-conversation comments (SEPARATE source — where bots post)
gh api repos/<owner>/<repo>/issues/<N>/comments --jq '.[]'
# 4. Mergeable state — fetch the literal value; do not interpret
gh pr view <N> --repo <owner>/<repo> --json mergeable,mergeStateStatus
For item 4: if mergeable is UNKNOWN, wait ~5 seconds and re-run that command once. If still UNKNOWN after one retry, proceed with UNKNOWN noted explicitly — do not interpret it as clean.
These commands return three distinct finding streams — keep them as separate lists through triage, never merge them into one:
reviews[].body text from #1 (a reviewer's formal
review summary).Why #2 and #3 are both required: get_pull_request_comments returns ONLY inline
review-thread comments (anchored to a file + line). General PR-conversation comments —
where automated review bots like claude-action-runner, coderabbitai, and copilot[bot]
post substantial multi-finding reviews — live in the issue_comments API, because GitHub
treats a PR as a special issue sharing the same number (PR # = issue #). Fetching only inline
comments silently misses these. Treat any review by an automated reviewer as a high-priority
signal even when it arrives as a single conversation comment.
Why the formal review body is not canonical: bot reviewers (Codex, CodeRabbit,
Copilot) increasingly post their actual findings as inline comments (#2) while the
formal review body (#1) carries only a generic "Here are some automated review
suggestions" preamble — no severity tags, no findings text. An empty or preamble-only
review body does NOT mean "no findings" — the findings are in the inline stream. Never
let the review-body text gate whether you inspect the inline list; the two streams are
independent. (Incident: a P1 inline comment was silently dropped because the review body
was treated as canonical — glitchwerks/claude-configs PR #833 / commit be03d7f.)
Determining what's unresolved is a data step, not a guess — see Step 2.5, which computes resolution state across three independent axes before triage. Do NOT decide "resolved" from the REST comment fetches alone: they carry no resolution state, and using them alone makes you re-triage every comment from every past round (the exact failure this skill exists to avoid).
The mergeable field returned by the Step 2 query above will be "CONFLICTING"
if there are conflicts, "MERGEABLE" if clean, or "UNKNOWN" if GitHub is still
computing (the Step 2 instructions already call for a retry once and returning the
literal UNKNOWN rather than interpreting it).
Sanity check on recently-pushed branches. GitHub can return a stale or ambiguous
mergeable value on a freshly-pushed branch where the merge computation hasn't finished.
A false "clean" here leads you to merge a conflicted PR. So when mergeable reads clean
on a recently-pushed branch, verify by running:
gh pr view <N> --repo <owner>/<repo> --json mergeable,mergeStateStatus
If mergeStateStatus is anything other than CLEAN / HAS_HOOKS / UNSTABLE — especially
DIRTY (conflict), BLOCKED (waiting on CI/reviews), or BEHIND (out of date with base) —
treat the earlier mergeable result as suspect and re-triage.
If conflicts exist, flag them as a blocking item for triage in Step 3. Merge conflicts are higher priority than review comments — a conflicted PR can't merge regardless of review status.
Also fetch the PR's check suite / status check results. Use
gh pr checks <N> --json name,state,conclusion (there is no MCP equivalent for
this). Look for any checks with conclusion of failure, action_required,
or cancelled.
For each failing check, capture:
lint, test, build)gh run view <run-id> --log-failed to get the relevant log lines)Failing CI checks are just as blocking as review comments — treat them as additional items to triage in the next step.
Do this before triage. The Step 2 REST fetches (pulls/N/comments,
issues/N/comments) carry no resolution state — used alone they make you
re-triage every comment from every past round. "Addressed?" is not one signal
but three independent axes. Compute all three, then Step 3 triages only the
reconciled OPEN set.
Anchor everything to the current head SHA:
HEAD_SHA=$(gh pr view <N> --repo <owner>/<repo> --json headRefOid --jq .headRefOid)
PY="${CLAUDE_PLUGIN_DATA}/venv/Scripts/python.exe"
[ -f "$PY" ] || PY="${CLAUDE_PLUGIN_DATA}/venv/bin/python"
isResolved / isOutdated live ONLY in the GraphQL reviewThreads API, never
in REST. Fetch them, extracting the nodes array server-side with --jq so
the dumped file is directly the list the script expects — not the full
response envelope:
gh api graphql -f owner=<owner> -f repo=<repo> -F number=<N> --jq \
'.data.repository.pullRequest.reviewThreads.nodes' -f query='
query($owner:String!,$repo:String!,$number:Int!){
repository(owner:$owner,name:$repo){
pullRequest(number:$number){
reviewThreads(first:100){
nodes{
id isResolved isOutdated path line originalLine
comments(first:20){ nodes{ databaseId author{login} createdAt body } }
}
}
}
}
}' > .tmp/pr<N>-threads.json
databaseId on each comment node is the same value as that comment's REST
id from the Step 2 inline-comments fetch (pulls/<N>/comments) — it's the
join key that lets later steps (§ Gating bots: reply + resolve) match a
specific suppressed comment to its exact position in a thread, rather than
guessing from path/line/author alone. body is included so the same
fetch can also detect an existing reply (see § Reply and resolve are
independently retryable).
Paginate past 100 with the pageInfo cursor rather than silently truncating
(the --jq filter above still applies per page; merge the nodes arrays
across pages before writing the file).
Also fetch the PR's commits (with dates), then merge each commit's per-file
patches into the same record — the resolution-state script needs files
present on every commit object, so this MUST be one merged file, not two
separate fetches left unjoined:
# commits (with dates) on the PR
gh api repos/<owner>/<repo>/pulls/<N>/commits --jq \
'[.[] | {sha:.sha, date:.commit.committer.date}]' > .tmp/pr<N>-commits.json
# merge each commit's file patches into the same record (loop + python,
# since jq is not guaranteed on every host)
"$PY" -c "
import json, subprocess
commits = json.load(open('.tmp/pr<N>-commits.json'))
for c in commits:
out = subprocess.run(
['gh', 'api', f'repos/<owner>/<repo>/commits/{c[\"sha\"]}', '--jq',
'[.files[] | {filename, patch}]'],
capture_output=True, text=True, check=True,
)
c['files'] = json.loads(out.stdout)
json.dump(commits, open('.tmp/pr<N>-commits.json', 'w'))
"
# reviews
gh api repos/<owner>/<repo>/pulls/<N>/reviews --jq \
'[.[] | {user:{login:.user.login}, state:.state, submitted_at:.submitted_at, commit_id:.commit_id}]' \
> .tmp/pr<N>-reviews.json
Do NOT hand-classify threads by reading isOutdated/patches/review states
yourself — scripts/gh-pr-review-address.py resolution-state computes all
three axes deterministically from the fetched JSON:
"$PY" -c "
import json
threads = json.load(open('.tmp/pr<N>-threads.json')) # nodes list
commits = json.load(open('.tmp/pr<N>-commits.json')) # with files/patch merged in
reviews = json.load(open('.tmp/pr<N>-reviews.json'))
print(json.dumps({'threads': threads, 'commits': commits, 'reviews': reviews}))
" | "$PY" "${CLAUDE_PLUGIN_ROOT}/scripts/gh-pr-review-address.py" resolution-state
It returns one JSON object:
{
"threads": [{"id": "...", "classification": "RESOLVED|CANDIDATE-ADDRESSED|OPEN", "path": "...", "line": 42}],
"sticky_blockers": ["<reviewer login>", ...]
}
What each classification means (the script's rules, for reference — you don't need to re-derive them, just act on the output):
RESOLVED — isResolved == true on the thread. Drop from triage; never
re-surface.CANDIDATE-ADDRESSED — thread unresolved but isOutdated == true, or a
commit after the thread's first comment touched its path near its
line. Gets a confirming thread reply, not a re-fix.OPEN — unresolved and untouched since the comment. Genuinely actionable.sticky_blockers — reviewer logins whose latest review is
CHANGES_REQUESTED with no later APPROVED from that same reviewer.
New commits do NOT clear this — it's the axis the skill historically
missed entirely; a PR with every inline thread resolved can still be
hard-blocked here. Surface as the top blocking item.Before weighting a blocking review, verify it targets a commit actually in head (not a stale review on an abandoned push) — the script does not fetch this itself, check separately:
HEAD_SHA=$(gh pr view <N> --repo <owner>/<repo> --json headRefOid --jq .headRefOid)
gh api repos/<owner>/<repo>/compare/<review_commit>...<HEAD_SHA> --jq .status
# identical / ahead => review commit is an ancestor of head (current)
# diverged => stale review on an abandoned commit; do not weight
Counts MUST add up: total threads = RESOLVED + unresolved, and
unresolved = CANDIDATE-ADDRESSED + OPEN (the script's per-thread
classification field lets you tally this directly — if a number looks off,
re-check the input JSON rather than guessing).
The OPEN set Step 3 triages = (script-classified OPEN threads) ∪
(un-addressed conversation / review-body findings from Step 2). RESOLVED
and CANDIDATE-ADDRESSED threads generate no fix-up work —
CANDIDATE-ADDRESSED gets a confirming reply at most. sticky_blockers
entries are carried into Step 3 as the highest-priority items.
This shares the reviewThreads query with Step 4.5 but runs at the opposite
end: Step 2.5 reads resolution state to scope triage; Step 4.5 writes
resolution state after fix-up commits land.
Do this yourself — triage is analysis, not implementation.
Triage only the OPEN set from Step 2.5. Do not re-triage threads classified RESOLVED (Axis A) — re-surfacing already-resolved feedback as new work is the exact failure this skill exists to avoid. CANDIDATE-ADDRESSED threads (Axis B) get at most a confirming thread reply, not a fix-up commit. STICKY BLOCKER verdicts (Axis C) enter triage as the highest-priority blocking items even when every inline thread is resolved — the PR cannot merge until that reviewer re-reviews.
Triage walks all three Step 2 finding streams — review-body, inline, and conversation — and treats each as its own list:
Then apply the suppression filter first, then evaluate the surviving items on the two axes that follow.
Skip findings that match any of these patterns. Suppression never generates a fix-up commit, and for non-gating bots and all human reviewers it is otherwise fully silent — no reply, no resolve. Findings authored by a gating bot are the exception — see § Gating bots: reply + resolve, not fully silent below. Either way, every suppressed item is counted and listed in the Step 5 summary so the user can override.
Bot-specific patterns — run the script, don't pattern-match by hand:
scripts/gh-pr-review-address.py suppression-candidates applies the
bot-specific lookup table deterministically (claude-action-runner[bot]'s
findings.low tier, coderabbitai[bot]'s Nitpick:/Nit: prefix,
chatgpt-codex-connector[bot]'s P3-or-lower tag, and
copilot-pull-request-reviewer[bot]'s style-vs-correctness heuristic) so
you don't re-derive these regexes by eye every run:
PY="${CLAUDE_PLUGIN_DATA}/venv/Scripts/python.exe"
[ -f "$PY" ] || PY="${CLAUDE_PLUGIN_DATA}/venv/bin/python"
echo '{"comments": [{"comment_id": 1001, "author_login": "coderabbitai[bot]", "body": "..."}]}' \
| "$PY" "${CLAUDE_PLUGIN_ROOT}/scripts/gh-pr-review-address.py" suppression-candidates
Feed it the inline finding stream (Step 2 item #2) as
{"comments": [...]}, where each comment object has comment_id,
author_login, and body keys (as in the example above). It returns one
object per comment with comment_id, author_login, suppress_candidate
(bool), and matched_rule (string, or null when not suppressed). Treat
suppress_candidate: true as a strong
signal, not an auto-suppress — the cross-bot judgment pass below still
applies on top of it, and a candidate can still be kept if it's actually
substantive (see "Always keep" below). The script only covers the inline
stream; conversation-stream findings (Step 2 item #3) have no per-comment
comment_id to feed it and go straight to the cross-bot judgment pass.
Cross-bot pattern (apply to any review source, including human reviews):
Suppress findings that are purely cosmetic — i.e. the reviewer would accept either form as correct, and the change has no impact on behavior, correctness, performance, or security. Concrete examples that get suppressed:
x.append(y) vs x += [y])Always keep (never suppress), regardless of how the bot tagged it:
When in doubt: keep the finding. The cost of one extra fix-up commit is lower than the cost of shipping a real issue past review because it was tagged "nit."
Some bots gate their own review verdict on all actionable comments
reaching a resolved state — including ones the bot itself tagged
nit/trivial. coderabbitai[bot] is the confirmed case: it holds
CHANGES_REQUESTED open until every thread it opened is resolved,
regardless of the severity it assigned. A finding suppressed above but
never resolved leaves that thread open forever from the bot's point of
view — it has no way to know the skip was intentional, so its verdict
never clears even after every substantive finding is fixed and pushed.
Root-caused on glitchwerks/claude-configs PR #1106 (2026-07-18): a
suppressed "add subprocess timeout" nit, left unresolved, alone kept
mergeStateStatus: BLOCKED for ~35 minutes with no re-review.
Gating bot set: a subset of Step 4.5's bot allow-list (§ Bot
allow-list) — reuse that same allow-list mechanism rather than maintaining
a second list, but do not assume every member gates. Seed the gating set
with just coderabbitai[bot], the only member with confirmed
gate-on-full-resolution behavior (#1106). Add another allow-listed bot to
the gating set only once it's confirmed to behave the same way — an
unconfirmed bot stays covered by the ordinary "suppress and leave open"
path below, so "never force-resolve nits from a non-gating bot" (a few
paragraphs down) still has teeth for chatgpt-codex-connector[bot] and
copilot-pull-request-reviewer[bot] until each is individually confirmed.
Scope: inline findings only. This path resolves a GraphQL review thread, so it only applies to suppressed findings from the inline stream (Step 2 item #2), which are anchored to a thread. Suppressed findings from the conversation stream (Step 2 item #3 — where a bot's multi-finding summary posts as an issue comment) have no thread to resolve and always land in the ordinary "suppress and leave open" bucket, regardless of the bot that authored them.
Correlating a suppressed finding to its thread. (path, line, author) is
not a unique key: a thread can hold comments from more than one author (a
human's opening comment followed by a bot's later nit, or the reverse), and a
single file/line can carry more than one distinct finding from the same bot.
Matching on that triple risks attaching the reply to the wrong comment.
Instead, carry forward the identifiers you already have at the moment a
finding is suppressed in Step 3:
id (comment_id), from the Step 2
inline-comments fetch (pulls/<N>/comments)id, found by matching comment_id
against a comment node's databaseId in the Step 2.5 Axis A fetch
(databaseId is the same value as the REST comment id — the join key
between the two APIs)Gating-bot authorship is checked on this specific suppressed comment, never on the thread's first comment — a thread mixing a human's comment with a bot's nit (or the reverse) must not have the wrong one decide whether the gating path fires.
For each inline finding suppressed above whose specific comment's author is in the gating set:
Reply on the same thread (not a top-level PR conversation comment — it must attach to the thread the bot is gating on) explaining the skip:
gh api repos/<owner>/<repo>/pulls/<N>/comments/<comment_id>/replies \
-f body='Suppressed as cosmetic/nit per project convention — not applying this suggestion.'
<comment_id> is the specific suppressed comment's REST id, carried
forward from Step 3 as described above — not the thread's first comment.
Before posting, check for an existing reply first — see § Reply and
resolve are independently retryable below; skip straight to step 2 if one
is already there.
Resolve the thread via the same resolveReviewThread GraphQL
mutation documented in Step 4.5 § Procedure, step 3, using the thread's
GraphQL node id carried forward from Step 3. Only run this once the reply
is confirmed present (either just posted, or found already there).
The reply and the resolve are two separate writes; either can fail without
the other. If the reply succeeds but the resolveReviewThread mutation
fails (network blip, API error), nothing marks the reply as already posted —
a naive retry on a later run would post a second, duplicate reply before
attempting resolve again.
Guard against this explicitly:
body matches the
suppression-reply text above among the thread's comments (the body field
added to the Step 2.5 Axis A fetch covers this, or fall back to a fresh
pulls/<N>/comments filtered to in_reply_to_id == <comment_id>). If one
already exists, do not post again — go straight to resolve.[resolved]; reply landed but
resolve did not → [pending] (retry resolve-only next run); the reply
itself did not land → [failed] (retry from the reply step next run).Step 3 only decides which suppressed findings qualify. The reply and resolve above are write actions, not analysis — they execute after triage completes, at the same point Step 4.5 runs (whether or not Step 4.5 itself has any Mode A/B fix-detected threads to process), not during this Step 3 pass. This keeps Step 3 itself read-only, consistent with "triage is analysis, not implementation" above and "do not write code, edit files, or run commits yourself" in § Your role in this skill.
This is a separate path from Step 4.5's Mode A/B resolution, not a
variant of it. Mode A/B resolves a thread because a landed commit fixed the
finding (isOutdated-driven). This path resolves a thread because the
finding was never going to be fixed and the bot needs to see that decision
made explicit. Keep the two apart in bookkeeping — Step 5 reports them on
separate lines (see Step 5 below).
Do not force-resolve nits from a bot that is not in the gating set, or from a human reviewer. Only gating-bot-authored inline threads get the reply+resolve treatment; everything else suppressed above stays untouched — this matches Step 4.5's existing rule against ever resolving a human-authored thread.
scripts/run.py:42, in the same thread: comment 1001 ("Nitpick:
consider extracting this into a helper function") and comment 1002
("Nit: rename tmp to buffer") — both authored by coderabbitai[bot].Nitpick: / Nit: prefix,
CodeRabbit's bot-specific-patterns row) — no fix-up commit is generated
for either. Each carries forward its own comment_id (1001, 1002)
and author login, plus the shared thread's GraphQL node id (matched via
databaseId).coderabbitai[bot] is in the gating set, so the reply+resolve path fires
once triage is done, once per suppressed comment: reply on 1001 via
.../comments/1001/replies, reply on 1002 via .../comments/1002/replies
— each checked first for an existing reply — then resolveReviewThread
once on the shared thread's node id (a second resolve call on an
already-resolved thread is a no-op).[resolved] under the suppressed-findings
line, not [left open].isResolved == true for that thread — it drops out of the
unresolved set and is never re-triaged.The PR has a stated purpose from its title and description. Feedback is out of scope if it addresses something genuinely unrelated to that purpose — a different system, pre-existing code the PR didn't touch, or a separate feature entirely.
Feedback is in scope if it relates to any code, documentation, or behavior introduced or touched by this PR — even if the comment feels minor.
Auto-fixable — the fix is unambiguous and can be delegated with confidence:
Needs discussion — requires a judgment call before delegating:
When uncertain whether something is auto-fixable, default to discussing it rather than guessing.
Process in this order: merge conflicts first (nothing else matters if the PR can't merge), then CI failures (they often block everything else), then auto-fixable review comments, then discussion items, then out-of-scope items.
debuggerIf the PR has merge conflicts, spawn a debugger agent with:
main)If the conflicts are complex (touching the same logic in multiple places, or conflicting with a large refactor on the base branch), present the conflict summary to the user first and confirm the resolution strategy before delegating.
debuggerFor each failing check with a clear error, spawn a debugger agent with:
For CI failures that need discussion (ambiguous cause, flaky tests, environment issues), present them to the user the same way you would a review comment that needs discussion — show the failure, explain what you see, propose an approach, and wait for confirmation before delegating.
code-writerSpawn a code-writer agent with a precise brief that includes:
The PR number and branch name
Each file to change and exactly what to change (quote the review comment)
The commit message to use:
review: address PR #N feedback
- fix typo in UserService.validate() comment
- add null check in parseConfig() per review
- update README with new env var
Instruction to push to the PR branch when done
Report the commit hash back to the user once the agent completes.
If the fix is a pure bug (incorrect behavior, not just a code style issue),
spawn a debugger agent instead.
For each one, present it clearly:
Wait for the user to confirm or redirect. Once confirmed, delegate to code-writer
(or debugger) exactly as above with the agreed approach.
gh-create-issue skillFor each out-of-scope item:
gh issue list --repo <owner>/<repo> --search '<keywords>' --state all --json number,title,state
gh-create-issue skill to create a well-formed
issue. Include in the brief: what the reviewer said, why it's deferred from this
PR, and the relevant PR number for context.Run this only after Step 4 fix-up commits have actually landed on the PR branch. GitHub does not auto-resolve review threads when the addressing code lands — threads can be marked Outdated (when their anchor lines move) but only a human or bot can flip them to Resolved. Left alone, addressed threads stay "Open" in the PR UI, the "Files changed" tab keeps flagging conversations that are actually handled, and branch-protection rules that gate on "all conversations resolved" can't be satisfied without manual clicks.
If no fix-up commits were pushed (everything was suppressed, out-of-scope, or pending discussion), skip this step — there is nothing left for this step to mark resolved.
This step is not the only path that resolves threads. Step 3's suppression filter has its own independent resolve trigger for gating-bot nits (§ Gating bots: reply + resolve, not fully silent) that fires whether or not any fix-up commit landed — see that section for the reply-then-resolve procedure. Everything below in this step (Mode A/B) covers only threads resolved because a fix was actually detected in a landed commit.
| Mode | Resolves | Default |
|---|---|---|
| B (conservative) | Unresolved bot threads where isOutdated == true | ✅ default |
| A (aggressive) | All unresolved bot threads, regardless of isOutdated | opt-in only |
Default to Mode B. Mode B combines two independent signals — GitHub already
flagged the thread's anchor as moved (isOutdated) and the skill just pushed
a fix addressing it — which together give strong confidence the resolution is
correct. Only run Mode A when the user explicitly asks (a flag or a follow-up
prompt), since it resolves threads GitHub has not yet flagged as outdated.
Only ever resolve threads authored by a configured review bot. The
default allow-list (_DEFAULT_BOT_ALLOWLIST in the script):
chatgpt-codex-connector[bot]claude-action-runner[bot]coderabbitai[bot]copilot-pull-request-reviewer[bot]The resolver allow-list matches Step 3's suppression set, so suppressed findings from those review bots can also be auto-resolved via Step 4.5.
The allow-list is configurable at the function level
(filter_resolvable_threads's bot_allowlist parameter) and through the
CLI's --bot-allowlist flag. Pass comma-separated logins; a supplied list
overrides rather than extends the default. Never resolve a thread authored
by a non-bot (human) reviewer, in either mode.
Enumerate the PR's review threads with their resolution state, outdated flag, and first-comment author:
gh api graphql -F owner=<owner> -F repo=<repo> -F number=<N> --jq \
'.data.repository.pullRequest.reviewThreads.nodes[]' -f query='
query($owner:String!, $repo:String!, $number:Int!) {
repository(owner:$owner, name:$repo) {
pullRequest(number:$number) {
reviewThreads(first:100) {
nodes {
id
isResolved
isOutdated
comments(first:1) { nodes { author { login } } }
}
}
}
}
}'
If the PR has more than 100 review threads, paginate with the pageInfo
cursor rather than silently processing only the first page.
Filter — pipe the raw nodes[] array into
scripts/gh-pr-review-address.py resolvable-threads instead of
hand-checking isResolved/isOutdated/author per thread:
PY="${CLAUDE_PLUGIN_DATA}/venv/Scripts/python.exe"
[ -f "$PY" ] || PY="${CLAUDE_PLUGIN_DATA}/venv/bin/python"
echo "{\"threads\": $THREAD_NODES_JSON}" \
| "$PY" "${CLAUDE_PLUGIN_ROOT}/scripts/gh-pr-review-address.py" \
resolvable-threads --mode B
$THREAD_NODES_JSON is the nodes[] array from step 1, unmodified (each
node already carries id, isResolved, isOutdated, and
comments.nodes[0].author.login — the exact shape the script expects).
Pass --mode A only when the user explicitly asked for the aggressive
mode. The script applies the same three conditions as before
(isResolved == false, first-comment author in the bot allow-list —
default list matches Step 3's — and, Mode B only, isOutdated == true)
and returns {"resolvable_thread_ids": [...]}.
Resolve each surviving thread by its node id:
gh api graphql -F threadId="<THREAD_NODE_ID>" -f query='
mutation($threadId:ID!) {
resolveReviewThread(input:{threadId:$threadId}) {
thread { isResolved }
}
}'
Confirm the mutation returns isResolved: true for each.
When pushing a fresh PR body, comment, or release notes via gh pr create,
gh pr edit, gh issue create, or gh release create, use a single-quoted
HEREDOC fed through command substitution:
gh pr create --title "fix: handle stale rollup" --body "$(cat <<'EOF'
## Summary
- One bullet per discrete change
- Use the body for detail, the title stays short (<70 chars)
## Test plan
- [ ] Lint clean
- [ ] Tests green
Closes #123
🤖 *Generated by Claude Code*
EOF
)"
Rules:
EOF and )" MUST be at column zero. Indented closing markers
are a shell parse error, not a content issue — there is no error message
pointing at the indent; the body just turns into garbled output.<<'EOF' (not <<EOF). Single quotes suppress
$variable and $(cmd) expansion inside the body. With unquoted EOF,
any $(date) / $VAR mention in the prose runs as a command — silently
corrupting the body or, worse, executing arbitrary substitutions..tmp/<scratch>.md and pass --body-file <path> instead — or for
raw gh api calls, --input <payload.json>. The HEREDOC route is for
human-readable PR/issue bodies, not arbitrary large payloads.gh ... --body-file <path> after writing the body via Out-File. Avoid
Set-Content -NoNewline — it can corrupt multi-line bodies on Windows.After all PRs are processed, give the user a concise recap:
N threads: X resolved, Y candidate-addressed, Z open; sticky blockers: <reviewer(s)> or none.
Counts must reconcile. This makes explicit that resolved history was NOT
re-triaged, and names any sticky CHANGES_REQUESTED verdict as the true blocker.[resolved] — inline finding from a gating-set bot: reply confirmed
posted and thread resolved via the resolveReviewThread GraphQL mutation[pending] — inline finding from a gating-set bot: reply confirmed
posted, but the resolve mutation has not yet succeeded (see § Reply and
resolve are independently retryable) — will retry resolve-only next run[failed] — inline finding from a gating-set bot: the reply write
itself did not succeed — will retry from the reply step next run[left open] — everything else: non-gating-set bot, human reviewer, or
a conversation-stream finding (no thread exists to resolve) — untouchedKeep the summary scannable — the user should be able to confirm everything was handled at a glance.
When the Step 3 triage produces more than ~5 items, or when fetched review-bot output is substantial (CodeRabbit / Copilot reviews routinely exceed 40 lines), save the triage matrix and the raw review-bot output to <repo>/.tmp/<YYYY-MM-DD>-pr<N>-triage.md before delegating in Step 4. The chat reply lists item counts by category (auto-fixable / discussion / out-of-scope), names the top blocker, and points to the file. For the Step 5 final summary, the same discipline applies — save the recap if it would exceed 40 lines.
Write long artifacts to .tmp/<name>.md under the repo root rather than inlining them in chat. Pass them to gh commands via --body-file <path>. This keeps the conversation scannable and sidesteps shell-escaping and encoding problems with large strings.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
8 skills in this plugin
/address-feedbackUnattended goal-loop that drives a single PR to green-and-merged by repeatedly addressing reviewer feedback (CodeRabbit and other review bots) and failing CI checks, waiting for asynchronous re-review between rounds, then auto-merging once quiescent. Composes the one-pass gh-pr-review-address skill (a first-party sibling in this same plugin) and wraps it in a self-pacing loop.
Invoked as `/loop /address-feedback [<PR#|branch>]` — dynamic /loop mode supplies the cross-tick engine; each firing runs ONE tick. A bare /address-feedback runs a single tick and then tells you to wrap it in /loop.
Trigger this skill whenever the user says "address feedback until done", "loop on PR feedback", "keep addressing my PR", "auto-merge when clean", "drive this PR to merge", "handle PR feedback until it's mergeable", or any variation of wanting a PR taken all the way to merged without babysitting each review round.
/gh-create-issueCreates well-formed GitHub Issues through a structured discovery process. Trigger this skill whenever the user types /gh-create-issue, says "create a GitHub issue for...", "log this as an issue", "make a ticket for...", "add this to the backlog", or any similar request to track or file work in GitHub. This skill investigates the codebase and checks for overlapping issues/PRs before writing anything — always use it proactively so issues are well-scoped before they're created.
/gh-quick-winsSurface low-blast-radius backlog items in the current GitHub repo, ranked by impact. Trigger this skill whenever the user types /gh-quick-wins, says "show me quick wins", "what can I knock out", "low effort items", "low blast radius backlog", "what's the easiest thing to ship", "what's small enough to do quickly", "what's the most actionable issue right now", or any similar request for a filtered, ranked view of the backlog that emphasises bounded-risk, high-impact work. Hybrid: deterministic script exclusion pass + LLM ranking by impact / blast-radius.
/gh-refresh-issuesFetch open issues from the active GitHub repo and display them grouped by milestone, with a Labels column. Trigger this skill whenever the user types /gh-refresh-issues, says "show me open issues", "what's open", "refresh issues", "list issues", "what issues are there", "show me issues and PRs", "what's open including PRs", or any similar request to see the current open-issue backlog. Optionally accepts a label filter as an argument (e.g. /gh-refresh-issues bug filters to only bug-labeled issues). Pass `--prs` to combine open PRs with issues in the same milestone-grouped view.
/gh-release-statusRelease status snapshot for the current GitHub repo — what's unreleased, diff against the last release, changes since the last release, release status, what shipped since the last release, what's in main but not yet tagged. Shows the most recent releases table plus a per-area file-change breakdown between the latest release tag and the default branch. Trigger this skill whenever the user types /gh-release-status, asks "what's unreleased", "what are the changes since the last release", "show the release status", "diff against last release", "what shipped since the last release", "what's in main that hasn't been released", "what's between the last tag and HEAD", or any similar request about what has changed since the most recent release. Hybrid: deterministic script output + a single LLM prose step.
/gh-summaryRoadmap snapshot of the current GitHub repo — epics, milestones with descriptions and completion percentages, critical/blocked issues, recent releases, plus a short LLM-written summary of recently updated issues. Trigger this skill whenever the user types /gh-summary, says "show me the roadmap", "roadmap summary", "what's the state of the repo", "completion rates", "critical issues", "blocked work", "recent releases", "summarize this repo", "high-level overview", "what's making progress", or any similar request for a high-altitude view of the repo's open work. Hybrid: deterministic script output + a one-paragraph LLM summary of recent issue activity.
claude-github-tools@glitchwerks is listed by glitchwerks/claude-plugins — review the source before installing
npx claudepluginhub glitchwerks/claude-plugins --plugin claude-github-tools