Skip to content
Back to skills

Address Pr Comments

ASecurity

Address unresolved PR review comments end to end. Fetch every open thread and any findings left outside threads, evaluate each one (agree or disagree, with a reason), apply the agreed fixes, run the project's checks, commit and push, reply on disagreements, then resolve the threads. With `--local`, works through the findings a local OCR review (`ocr-review --local`) saved for the current branch instead, and commits without pushing. Use when the user says "address PR comments", "fix review fee...

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 24, 2026
ai-agentsbashnodegit

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 27, 2026

npx -y skills add artberri/skills --skill address-pr-comments --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Address Pr Comments?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Address Pr Comments
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/artberri-address-pr-comments/badge)](https://www.skillsdirectory.com/skills/artberri-address-pr-comments)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: address-pr-comments
description: Address unresolved PR review comments end to end. Fetch every open thread and any findings left outside threads, evaluate each one (agree or disagree, with a reason), apply the agreed fixes, run the project's checks, commit and push, reply on disagreements, then resolve the threads. With `--local`, works through the findings a local OCR review (`ocr-review --local`) saved for the current branch instead, and commits without pushing. Use when the user says "address PR comments", "fix review feedback", "respond to the review", "resolve PR threads", "check PR comments", "address the local OCR findings", or shares a PR that has open review threads.
argument-hint: "[pr-number | url] [--local]"
---

# Address PR comments

## Prerequisites

- `gh` CLI authenticated (`gh auth status`), except in local mode
- Node.js 18+

If either is missing, tell the user and stop.

The commands below run `scripts/pr-threads.mjs` from this skill's folder: replace `<skill-dir>` with the absolute path of the folder this `SKILL.md` is in.

## Input

A PR number, URL, or nothing: infer it from the current branch if omitted. `--local` selects local mode, as does a branch with no PR when `node <skill-dir>/scripts/pr-threads.mjs local-list` finds open findings.

## Local mode

Local findings come from `ocr-review --local`, saved for the current branch on this machine: there is no PR, no thread and nobody to reply to. The workflow below applies with these changes:

- **Step 1:** gather the findings with `node <skill-dir>/scripts/pr-threads.mjs local-list`. There are no review bodies or PR body to read. If it lists nothing, say so and stop.
- **Step 3:** the **Source** column is `Local OCR` and the item number is the finding's `FINDING_ID`. Confirming means the fixes are committed locally, not pushed, and every finding marked closed.
- **Step 5:** commit, but don't push. Pushing is the user's call, or the next step of `deliver`.
- **Steps 6 and 7:** instead of replying and resolving, close each finding with a note: `node <skill-dir>/scripts/pr-threads.mjs local-resolve <FINDING_ID> "<note>"`. For an agreed one, the note says what changed and in which commit; for a disagreed one, why the code is right. Both get closed, since no other reviewer is waiting on them. Leave an item the user excluded open.
- **Step 8:** offer `/ocr-review --local --incremental`.

## Workflow

### 1. Resolve the PR and gather the feedback

```bash
PR=$(gh pr view --json number -q .number 2>/dev/null || echo "")
node <skill-dir>/scripts/pr-threads.mjs list $PR
gh pr view $PR --json body,reviews
```

`list` prints every unresolved inline thread: thread ID, file and line (or just the file for a file-level comment), author, the full comment and any replies. A thread marked `outdated` points at code that has changed since; check whether it still applies.

Reviewers also leave findings outside threads: in a review's summary body (for example, findings in files the PR doesn't change) or in a block they keep in the PR description (a score plus a list of open findings). Read the review bodies and the PR body, and treat each concrete finding there as its own item. A finding in a summary or block that duplicates an open thread is the same item; don't count it twice. A confidence score is context, not an action item.

If there are no unresolved threads and no findings outside threads, tell the user and stop.

### 2. Evaluate each item

For each item, read the referenced file and line in the source code. If the project documents how to handle review feedback (in `AGENTS.md`, `CLAUDE.md` or `CONTRIBUTING.md`), apply that. Otherwise:

- Evaluate the suggestion on its own merits, not on who made it.
- State **agree** or **disagree** with a one-sentence reason.
- If agreeing: describe what needs to change.
- If disagreeing: explain concisely why the current code is correct or why the suggestion would make things worse.

If the project keeps a list of settled conventions (such as `KNOWN_NON_ISSUES.md`), a finding that matches an entry there is a disagree, citing the entry.

### 3. Present the verdict table and wait for confirmation

Present a table before touching any code. The **Source** column tells inline threads apart from findings outside threads:

```
| # | Source | File:Line | Comment (truncated) | Verdict | Action |
|---|--------|-----------|---------------------|---------|--------|
| 1 | Thread | src/foo.ts:42 | "missing dep array" | Agree | move helper to module scope |
| 2 | Thread | src/bar.ts:10 | "fragile string match" | Disagree | pre-existing, out of scope for this PR |
| 3 | Review summary | src/baz.ts:88 | "unhandled null case" | Agree | add null guard |
```

Then ask the user to confirm, saying plainly that confirming means the fixes will be committed and pushed, and the threads replied to and resolved. They may override verdicts or exclude items. Wait for their answer.

### 4. Apply the agreed fixes

Apply each agreed fix, following the project's coding standards (`AGENTS.md`, `CLAUDE.md`, or the surrounding code).

Then run the project's checks: the ones its docs list, or the lint, type-check, format and test commands its CI runs. If any check fails, fix the issue before committing.

### 5. Commit and push

Commit with the `commit` skill if it is available. Otherwise, commit only the files you changed, by name, with a message in the repo's style (`git log --oneline -10`) that says the commit addresses review comments. Then `git push`.

### 6. Reply on disagreements

Steps 6 and 7 apply to inline threads only. Findings outside threads have no thread to reply to or resolve: they are handled by the fix, or reported back to the user in the step 7 summary.

For each disagreed thread, post a reply explaining the reasoning:

```bash
node <skill-dir>/scripts/pr-threads.mjs reply <THREAD_NODE_ID> "<reply text>"
```

Keep replies to one or two sentences on why the current approach is correct.

### 7. Resolve the threads

Resolve each agreed thread (it's fixed) and each disagreed thread from a bot (it has a reply explaining the decision):

```bash
node <skill-dir>/scripts/pr-threads.mjs resolve <THREAD_NODE_ID>
```

For a disagreed thread from a human reviewer, ask the user whether to resolve it or leave it open for the reviewer to answer.

Tell the user how many threads were fixed, how many were replied to with a disagreement (and which of those were resolved), and how many findings outside threads were addressed or declined.

### 8. Offer a re-review

If the `ocr-review` skill is available and the PR has an OCR review (its summary or PR-body block says "OCR review"), ask: "Want me to re-run the OCR review on the new commits?" If yes, run `/ocr-review --incremental`. Skip the question if the OCR hook is turned on (`ARTBERRI_OCR_REVIEW_OFFER=1`): the push already triggers it.

Files in this skill

  • SKILL.md6.7 KB
  • scripts/pr-threads.mjs9.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.