# PR Fix

PR Review Fix: automatically fix all issues identified in a pr-review report.

- Repository: https://github.com/FerroxLabs/wayland (616 stars)
- Category: Git and review
- License: AGPL-3.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add FerroxLabs/wayland --skill pr-fix -g -a claude-code -y`
Codex: `npx skills add FerroxLabs/wayland --skill pr-fix -g -a codex -y`
Cursor: `npx skills add FerroxLabs/wayland --skill pr-fix -g -a cursor -y`
Gemini CLI: `npx skills add FerroxLabs/wayland --skill pr-fix -g -a gemini-cli -y`

## Description

PR Review Fix: automatically fix all issues identified in a pr-review report. Use when: (1) User says "fix all review issues", (2) User says "/pr-fix", (3) After pr-review skill has produced a report, (4) User wants to address PR review feedback.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# PR Review Fix Skill

Automated workflow to resolve all issues surfaced in a pr-review report - parse summary → detect PR status → create fix branch or checkout original branch → **triage & validate** → fix by priority → quality gate → commit → publish → verify.

**Announce at start:** "I'm using pr-fix skill to fix all review issues."

## Usage

```
/pr-fix [pr_number]
```

`pr_number` is optional. The skill requires a pr-review report to be present in the current session.

---

## Mode Detection

At the very start of execution, check `$ARGUMENTS` for the `--automation` flag:

```bash
# $ARGUMENTS example: "123 --automation" or "123"
AUTOMATION_MODE=false
if echo "$ARGUMENTS" | grep -q -- '--automation'; then
  AUTOMATION_MODE=true
fi
```

In **automation mode**:

- Skip all yes/no confirmation prompts - follow the default best path

---

## Steps

### Step 0 - Locate the Review Report

The pr-review skill must have been executed in the current session. The review report (containing a "Summary" table) must be present in the conversation.

If no review report is found in the current session, abort immediately with:

> No pr-review report found in this session. Please run `/pr-review <pr_number>` first.

Extract the PR number from the report header:

```
## Code Review: <PR Title> (#<PR_NUMBER>)
```

If `pr_number` is provided as an argument, use it to override the extracted number.

---

### Step 1 - Parse the Summary Table

Locate the **Summary** section in the review report:

```markdown
| #   | Severity    | File        | Issue |
| --- | ----------- | ----------- | ----- |
| 1   | 🔴 CRITICAL | `file.ts:N` | ...   |
```

Build an ordered issue list, grouped by severity:

| Priority | Severity | Emoji |
| -------- | -------- | ----- |
| 1        | CRITICAL | 🔴    |
| 2        | HIGH     | 🟠    |
| 3        | MEDIUM   | 🟡    |
| 4        | LOW      | 🔵    |

If the Summary table is empty, abort with:

> No issues found in the review summary. Nothing to fix.

The rest: https://github.com/FerroxLabs/wayland/blob/HEAD/.claude/skills/pr-fix/SKILL.md
