Skip to content
Back to skills

Pr Address Comments

ASecurity

Use when the user asks to check, review, address, or fix comments on a pull request. Pulls review threads, fixes what is actionable locally, pushes to the PR branch. NEVER replies, resolves, or posts anything to GitHub.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 15, 2026
ai-agentsgobashreactnodegitapi

Works with

  • api

Security analysis

A100/100

Scanned November 15, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Pr Address Comments?

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

Security grade badge for Pr Address Comments
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rezk2ll-pr-address-comments/badge)](https://www.skillsdirectory.com/skills/rezk2ll-pr-address-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: pr-address-comments
description: Use when the user asks to check, review, address, or fix comments on a pull request. Pulls review threads, fixes what is actionable locally, pushes to the PR branch. NEVER replies, resolves, or posts anything to GitHub.
---

# Address PR Comments

Pull review comments on a PR, fix what is actionable, push. Never write to GitHub.

## When to use

- "check the comments on the PR" / "address the review feedback" / "fix the comments on PR #123"

## Iron rule: never write to GitHub

Allowed writes: local file edits, local commits, `git push` to the PR's own branch.

Forbidden: `gh pr review`, `gh pr comment`, `gh api -X POST` on `/comments` / `/reviews`, emoji reactions, thread resolution, re-requesting review, PR title / body edits unless the user asked.

If a comment seems to need a verbal reply, surface it in the report instead. The user replies themselves.

## Phase 0: Identify the PR

```bash
gh pr view --json number,headRefName,baseRefName,url,state
```

If the current branch has no PR, ask. If the PR is closed/merged, stop. Otherwise:

```bash
gh pr checkout <number>
```

## Phase 1: Pull comments

One GraphQL call covers most of what you need:

```bash
gh api graphql -f query='
  query($owner: String!, $repo: String!, $number: Int!) {
    repository(owner: $owner, name: $repo) {
      pullRequest(number: $number) {
        reviewThreads(first: 100) {
          nodes {
            isResolved
            comments(first: 20) {
              nodes { body path line author { login } createdAt }
            }
          }
        }
      }
    }
  }' -f owner=<owner> -f repo=<repo> -F number=<number>
```

Then top-level review summaries and PR conversation comments:

```bash
gh api repos/<owner>/<repo>/pulls/<n>/reviews --paginate
gh api repos/<owner>/<repo>/issues/<n>/comments --paginate
```

Filter out: comments by the PR author themselves, resolved threads, outdated inline comments (null `position`), bot comments unless relevant.

## Phase 2: Triage

For each remaining comment, classify:

- **Actionable**: concrete change requested → fix locally
- **Nit**: style preference → fix if cheap, skip otherwise
- **Question**: surface to the user, do not answer on GitHub
- **Out of scope**: valid but separate PR; surface to the user
- **Disagreement**: surface to the user, do not "compromise" by half-fixing

## Phase 3: Apply fixes and verify

1. Make each change inside the comment's scope. No "while I'm here" cleanup.
2. Run the sub-project's own checks. For a Node project, run whichever of these its `package.json` actually defines, in this order: `format → check → typecheck → lint → build → test`. Skip what is not defined. Other stacks: use their equivalent (Makefile targets, `cargo`, `go`, `pytest`).
3. Fix any new failures introduced by your edits before committing.

## Phase 4: Commit and push

Fold the fixes into the existing history rather than stacking an "address review feedback" commit. Squash each fix into the commit it logically belongs to (or amend HEAD when they all belong there), then force-push with lease:

```bash
git commit --amend --no-edit                              # all fixes belong on HEAD
# or, to target an earlier commit (non-interactive autosquash):
git commit --fixup <sha> && GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash <sha>^

git push --force-with-lease
```

Always use `--force-with-lease`, never a bare `--force`, so a teammate's push is never clobbered. Keep the sub-project's existing commit prefix style (`git log --oneline -10`).

## Phase 5: Report (inline)

```
## PR #<n> comment review

**Comments**: <count after filtering>

**Fixed**:
- <file>:<line>: <one-line summary>

**Not addressed** (nit / out of scope):
- <file>:<line>: <reason>

**Needs your input** (do not reply on GitHub):
- <reviewer> asked: "<quoted question>"

**Pushed**: <commit sha> to <branch>
```

## Rules

- The Iron rule covers all GitHub-write prohibitions; do not invent more.
- Scope to each comment. No incidental refactors.
- Run the sub-project's defined verify scripts before pushing.
- Surface questions and disagreements; never engage on GitHub for the user.

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.