Home / Market / pr address feedback

pr address feedback

Walk through PR review comments one-by-one, deciding for each whether to act on the feedback or reply with reasoning, and build an approvable resolution plan before changing anything. Use when the user wants to address, respond to, or triage PR review feedback.

skill★ 417940 dlgithubMITInstall in CosmosUpstream Source

Documentation & Preview

--- name: pr-address-feedback description: 'Walk through PR review comments one-by-one, deciding for each whether to act on the feedback or reply with reasoning, and build an approvable resolution plan before changing anything. Use when the user wants to address, respond to, or triage PR review feedback.' argument-hint: "[PR number or URL] (defaults to current branch's PR)" user-invocable: true

---

Let's look at each review comment on this pull request one-by-one and make a plan to either take action on the feedback or reply with reasoning.

PR target: use the PR number/URL I passed with this command, if any; otherwise the PR for the current branch.

You are in plan mode. Until I approve the final plan, do NOT edit files, commit, push, resolve threads, or post anything to GitHub. Read-only commands (gh, git log/diff/show, viewing files) are fine.

The PR may live on github.com or on another GitHub host (e.g. GitHub Enterprise Server). Take the host from the PR's url and pass --hostname <host> to every gh api call (or export GH_HOST=<host> once). gh api defaults to github.com even inside an Enterprise Server checkout.

1. Gather the feedback

2. Present each item (one per turn)

> CRITICAL — the item must be visible before you ask. I cannot see your thinking/reasoning, tool output, or SQL rows. The only things I see are your assistant message text and the short ask_user prompt. So for every item you MUST write the full item block below as normal assistant message text in the same response, immediately before the ask_user call. Never call ask_user for an item until that block has been written out. Summarizing the item only in your thinking does not count. > > This block is exempt from any general brevity / word-limit guidance — completeness here matters more than being short. Do not paraphrase the comment or skip the diff to save space.

Write each item using exactly this template (fill every section; write "n/a" rather than dropping one):

---
### Item N of M — @reviewer · [`path:line`](COMMENT_URL)
Thread: [open on GitHub](COMMENT_URL) · status: open | outdated

**Feedback**
> full text of the first comment, verbatim (keep its code blocks / suggestions)
>
> **@replier:** full text of each reply, in order

**Diff context** (from the review's `diffHunk`, trimmed to ~10 lines around the commented line)

...


**Current code** — `path` Lstart–Lend (always include; this is what I'm deciding against)

214 | ...


**Evidence / related context**
- `other/file.go:123` — why it matters (with a short snippet if it helps)
- Related comment: [@who on path:line](url) — how it interacts with this one

**Assessment**: is the reviewer right? What's the trade-off?

**Recommendation**: **Act** — exact files + short sketch of the change · or · **Reply** — draft reply in my voice, short and friendly:
> draft reply text

Rules for the block:

Then call ask_user to get my decision:

Keep a running record of each item and decision (for example in the session SQL database: comment id, url, path, line, decision, planned change, reply text) so nothing gets lost and items can be re-rendered.

3. Build the resolution plan

When every item is decided, write a single plan that lists, for each item: the comment link, the decision, the code change (if acting), the exact reply text to post (if replying, or to confirm an action), and whether the thread will be resolved (see defaults in §4). End the plan with the list of reviewers whose review will be re-requested. Then call exit_plan_mode so I can review and approve it.

4. Rules for carrying out the approved plan

  1. Commit, then git push.
  2. Re-read the PR's headRefOid (gh pr view <n> --json headRefOid) and confirm each referenced commit is reachable from it: git fetch <base remote> refs/pull/<n>/head, then git merge-base --is-ancestor <sha> FETCH_HEAD. If it isn't, stop and fix that before posting.
  3. Only then post the replies. Use the full 40-character SHA (or a https://{host}/{owner}/{repo}/pull/{n}/commits/{sha} link, using the PR's host) so GitHub links it.