Skip to content
Back to skills

Pr Fix Dwertent

ASecurity

Address PR review comments by applying fixes locally. Fetches review comments via GitHub API, evaluates each one, applies fixes where appropriate, and generates a report. Use when the user asks to fix PR comments, address PR feedback, or handle PR review suggestions.

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
code-qualitygobashgitapi

Works with

  • cursor
  • cli
  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill pr-fix-dwertent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pr Fix Dwertent?

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

Security grade badge for Pr Fix Dwertent
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-pr-fix-dwertent/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-pr-fix-dwertent)

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-fix
description: Address PR review comments by applying fixes locally. Fetches review comments via GitHub API, evaluates each one, applies fixes where appropriate, and generates a report. Use when the user asks to fix PR comments, address PR feedback, or handle PR review suggestions.
---

# PR Fix

## Prerequisites

- `gh` CLI authenticated and available
- The repo must be cloned locally
- Working tree should be clean (no uncommitted changes) before starting

## Workflow

### Step 1: Identify the PR

If the user provides a PR number, use it. Otherwise, detect the current branch and find the open PR:

```bash
gh pr list --head "$(git branch --show-current)" --json number,title,url --jq '.[0]'
```

### Step 2: Checkout the PR branch

Ensure you are on the correct branch. If not already on it, check it out:

```bash
gh pr checkout <NUMBER>
```

### Step 3: Fetch all review comments

Fetch both inline review comments and general PR conversation comments:

```bash
# Inline code review comments (attached to specific lines)
gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate

# General PR-level comments (conversation thread)
gh api repos/{owner}/{repo}/issues/{number}/comments --paginate

# PR review summaries (review bodies submitted with approve/request changes)
gh api repos/{owner}/{repo}/pulls/{number}/reviews --paginate
```

Filter out comments prefixed with `[cursor-auto-review]` — those are machine-generated and should be ignored.

### Step 4: Evaluate each comment

For every review comment, decide how to handle it:

1. **Fix it** — the issue is clear and the fix is straightforward. Apply the fix locally. Choose the best solution, not necessarily what the reviewer literally suggested. If you see a better approach, use it.
2. **Skip it** — the suggestion doesn't make sense, is wrong, or would make the code worse. Note why in the report.
3. **Flag it** — the issue is unclear, the right fix is ambiguous, or the comment is too vague to act on. Do NOT attempt a fix. Flag it for the user's attention.

Guidelines:
- Not all suggestions need to be implemented. Reviewers can be wrong or vague.
- When a reviewer raises a valid point but proposes a bad solution, fix the underlying issue your way.
- When the issue itself is unclear, flag it — don't guess.
- Do NOT add code comments that don't need to be there. Every code change should look like a developer wrote it, not a bot.

### Step 5: Apply fixes locally

Make changes directly to the local files. Do NOT:
- `git commit`
- `git push`
- Create new branches
- Run any git operations that modify history

The user will review and commit when ready.

### Step 6: Generate the report

Write a report to `pr-fix-report.md` in the repo root. Format:

```markdown
# PR Fix Report — PR #<NUMBER>

## Needs Attention

These comments require your review — either the issue was unclear, I chose a different approach than suggested, or I decided not to fix.

| # | File | Comment | Action | Why |
|---|------|---------|--------|-----|
| 1 | `path/to/file.go:42` | Reviewer said X | **Flagged** — unclear what the intended behavior should be | |
| 2 | `path/to/file.go:88` | Reviewer suggested Y | **Fixed differently** — used Z instead because ... | |
| 3 | `path/to/other.go:15` | Reviewer asked for W | **Skipped** — suggestion would break ... | |

## Fixed

| # | File | Comment | What I did |
|---|------|---------|------------|
| 4 | `path/to/file.go:20` | Missing nil check | Added nil check before dereference |
| 5 | `path/to/util.go:55` | Unused error return | Now returns and handles the error |

## Skipped (no action needed)

| # | File | Comment | Why |
|---|------|---------|-----|
| 6 | `path/to/file.go:10` | Style preference | Not a functional issue |
```

Rules for the report:
- **"Needs Attention" section comes first** — these are the items the user must look at
- One line per comment. Keep descriptions to one sentence.
- Include the file path and line number from the review comment
- Include a brief quote or paraphrase of the reviewer's comment
- For "Fixed differently" items, briefly explain what you did instead and why

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.

Comments

Loading comments…

Newsletter

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