Evaluates pending (unsubmitted) PR review comments on the current branch, classifies each as actionable or needing discussion, then addresses them in separate commits after user confirmation.
Ships in pr-pending-feedback. 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.
None: SKILL.md is the whole skill.
The goal: look at every comment on the pending (unsubmitted) review the current user has drafted on the PR for the current branch, evaluate each one independently, split them into ones that can simply be addressed and ones that need discussion, work through the discussion comments one at a time, and — only after all discussions are resolved and the user confirms — dispatch a sub-agent per comment to fix it, one commit per comment.
These comments are the user's own. Never recommend skipping a comment. Every comment either gets addressed directly, or — if there's any ambiguity, subjectivity, design call, or doubt about applicability — gets opened up for discussion so the user can decide. "Skip" is only ever an outcome the user explicitly chooses during discussion, never something this skill proposes on its own.
Pending reviews are private to their author until submitted, so this skill only sees comments authored by the currently authenticated gh user.
pr_number=$(gh pr view --json number --jq .number)
pr_url=$(gh pr view --json url --jq .url)
repo=$(gh repo view --json nameWithOwner --jq .nameWithOwner)
base_branch=$(gh pr view --json baseRefName --jq .baseRefName)
me=$(gh api user --jq .login)
If gh pr view fails, stop and tell the user there is no open PR for the current branch.
List reviews on the PR and find one in PENDING state authored by the current user:
gh api "repos/$repo/pulls/$pr_number/reviews" --jq \
".[] | select(.state==\"PENDING\" and .user.login==\"$me\") | {id, body, submitted_at, html_url}"
If there is no pending review, stop and tell the user there is no pending review on this PR for them. If there are multiple pending reviews (rare), list them and ask which to use.
Capture the id as review_id.
gh api "repos/$repo/pulls/$pr_number/reviews/$review_id/comments"
Each comment includes path, line (or original_line), body, diff_hunk, and html_url. Also note the pending review's top-level body from Step 2 — it may contain general feedback worth addressing too.
For each pending comment, read the referenced file(s) at the relevant lines to understand the current code. Then classify it as exactly one of:
address — clearly actionable, unambiguous, and you're confident how to do it. It can be acted on without further input.discuss — anything else. If the comment is ambiguous, subjective, a design call, possibly stale/already-done, out of scope, or you have any doubt about whether or how to act on it, it needs the user's input first.Never classify a comment as skip. These are the user's own comments — if you think one might not be worth doing, that is itself a reason to discuss it, not to skip it. Skipping is only ever a decision the user makes during the discussion in Step 5.
For every address comment (and any discuss comment the user resolves into an action in Step 5), also tag how it will be handled:
simple — a localized, mechanical, single-location change with no branch-wide pattern implications and no test reasoning needed (e.g. a typo, a rename at one site, a small wording tweak, an obvious guard clause). These are handled inline in the main loop with Edit (Step 7), no sub-agent.involved — anything that articulates a general rule to apply branch-wide, touches multiple files, needs judgment, or requires running/reasoning about tests. These get a dedicated sub-agent (Step 7).When in doubt between simple and involved, treat it as involved.
Evaluate each comment on its own merits; do not let one comment's classification influence another's.
Do not present any triage table or list at this stage. Do not show the user the full set of comments yet. Move straight on to working through the discussion comments.
For each comment classified as discuss, ask the user about it one question at a time — present a single comment, wait for the reply, then move to the next. Do not batch them.
For each discussion comment, present:
diff_hunk if needed). Always include this so the user has the context in front of them.1. address it a particular way, 2. address it a different way, 3. skip it, etc.). Always include skipping as one of the numbered options when it's a sensible choice.Per the user's global preference, present the options as a numbered plain-text list. Do not use the AskUserQuestion tool — print the question as normal output and end your turn so the user can reply in their own words.
Stop and wait for the user's reply after each discussion comment before moving to the next one. Record the resolution for each (address in a specific way, or skip).
If there are no discussion comments, skip straight to Step 6.
Only after every discussion comment has been resolved, present a single consolidated list/table of all comments and how each will be handled:
#1, #2).End with a plain-text prompt like:
This is the plan. Reply to confirm and I'll address each comment — simple ones inline, involved ones via a sub-agent — committing each fix separately. Let me know if you want to change anything.
Stop and wait for the user's reply. Do not proceed to Step 7 without explicit confirmation. Do not use the AskUserQuestion tool for this — just print the prompt as normal output and end your turn so the user can reply in their own words.
Work through the comments the user confirmed to address (skipped comments are left alone) sequentially, not in parallel — each creates a commit on the same branch, and parallel edits would conflict. Handle each according to its simple/involved tag from Step 4:
Edit. Make the smallest change that addresses the comment, then create exactly one git commit for it (same commit discipline as a sub-agent: one commit per comment, concise message, no ticket prefix, do not push). The same comment-discipline rule applies: do not add code comments explaining the change or that it was made in response to the review. If, once you look closely, a "simple" comment turns out to imply a branch-wide pattern or otherwise isn't trivial after all, escalate it to a sub-agent instead.Either way, the result is one commit per addressed comment, so the final report (Step 8) is the same regardless of how each was handled.
For involved comments, the prompt for each sub-agent should include:
order.sc_id instead of order.id", "prefer Foo.bar over Foo.baz", "rename X to Y"), search the entire diff on the current branch for other instances of the same pattern and apply the same change there too. Pass the PR's actual base branch ($base_branch from Step 1 — may not be main, e.g. for stacked PRs) and tell the sub-agent to use git diff <base_branch>...HEAD to scope the search to lines this branch introduced or touched. Do not modify code outside the branch's diff.Example skeleton:
Agent({
subagent_type: "general-purpose",
description: "Address pending comment #<n>",
prompt: "Working directory: <cwd>.\n\nAddress this pending PR review comment (drafted by the user themself, not yet submitted):\n\n<comment body>\n\nFile: <path>:<line>\nComment URL: <url>\nPR: <pr_url>\n\nDiff hunk for context:\n<diffHunk>\n\nMake the smallest change that resolves the feedback. If the comment expresses a general rule or pattern (not just a one-off fix at this line), also apply it to any other matching instances within this branch's diff against its base branch (use `git diff <base_branch>...HEAD` with the PR's actual base branch substituted in to find the touched code). Do not modify code outside this branch's diff. Do not add code comments that explain this change or why it was made in response to the review. Only add a comment if it clarifies confusing code, a non-obvious edge case, or complex behavior for a reader unaware of this PR; never comment obvious code. Run the relevant tests for the changed files. Create exactly one git commit with a concise message (no ticket prefix — this isn't the first commit of the branch, per the repo's git conventions). Do not push. Do not address any other feedback. Report back with the commit SHA and a one-line summary."
})
After each comment is addressed — inline or by a sub-agent — verify with git log --oneline -1 that a new commit landed, then proceed to the next.
If a comment can't be addressed (e.g. tests failed, or a sub-agent reports unclear intent), stop and surface the problem to the user before continuing with remaining comments.
After all comments are addressed, output a summary:
Addressing feedback often changes what the PR does, leaving its description out of date. Offer to fix that — but only if both of these hold:
pr_author=$(gh pr view --json author --jq .author.login)
If $pr_author != $me, skip this step entirely — do not offer, do not mention it.gh pr view --json body --jq .body) and compare it against the changes just made in Step 7. If everything the description says still holds and nothing it should mention is now missing, the description is up to date — skip this step silently. Only proceed if a confirmed fix made a concrete claim in the description wrong, incomplete, or misleading.If both hold, propose a minimal edit: the smallest set of changes that brings the description back in line with the code — fix the specific sentences/bullets that the addressed comments invalidated, and add anything now missing. Do not rewrite, restructure, or restyle the description; leave everything still-accurate untouched.
Show the user the proposed new description (or a diff of just the changed lines) and ask a single plain-text yes/no question, e.g.:
Addressing the feedback made the PR description out of date. Here's a minimal update — apply it? (yes/no)
Wait for explicit confirmation. Do not use the AskUserQuestion tool — print the prompt as normal output and end your turn. If the user confirms, apply it:
gh pr edit "$pr_number" --body "<updated description>"
Screenshots: if the description embeds screenshots (e.g.  images, or an attachments/screenshots section) and any addressed comment changed UI or other visible output those screenshots likely depict, you cannot regenerate them — so just remind the user to re-capture and re-upload them, naming the specific screenshots that are probably now stale. Skip this reminder when the addressed comments didn't change anything the screenshots would show.
Ask the user a single yes/no question, choosing the wording based on whether the whole review can be deleted cleanly. The review can be deleted cleanly only if every comment in the pending review was addressed — i.e. nothing was skipped during discussion, and no un-addressed comments exist (e.g. comments added since, or the review body left un-actioned).
If all comments were addressed, offer to delete the whole review:
All comments were addressed. Do you want to delete the pending review? (yes/no)
If some comments were skipped or otherwise left un-addressed, offer to delete only the addressed ones (leaving the rest pending):
Do you want to delete the addressed comments? (yes/no — the skipped/un-addressed ones will stay pending.)
Wait for explicit confirmation. Do not delete anything without the user saying so. Do not use the AskUserQuestion tool for this — print the prompt as normal output and end your turn so the user can reply in their own words.
If the user confirms, delete accordingly:
gh api -X DELETE "repos/$repo/pulls/$pr_number/reviews/$review_id"
gh api -X DELETE "repos/$repo/pulls/comments/<comment_id>"
Never delete a comment the user chose not to address — those must remain pending. Only delete the whole review when every comment in it was addressed.
After deletion, report which comments/reviews were deleted.
gh-authenticated user. Pending reviews by others are not visible via the API.CLAUDE.md (e.g. Chore: prefix for non-user-facing changes, no ticket code on subsequent commits, one thing per commit).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/pr-pending-feedback:pr-pending-feedbackfrom pr-pending-feedback
npx claudepluginhub ryanb/dotfiles --plugin pr-pending-feedbackOther plugins' skills for the same job