# PR Review

PR Code Review (Local): perform a thorough local code review with full project context.

- 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-review -g -a claude-code -y`
Codex: `npx skills add FerroxLabs/wayland --skill pr-review -g -a codex -y`
Cursor: `npx skills add FerroxLabs/wayland --skill pr-review -g -a cursor -y`
Gemini CLI: `npx skills add FerroxLabs/wayland --skill pr-review -g -a gemini-cli -y`

## Description

PR Code Review (Local): perform a thorough local code review with full project context. Use when: (1) User asks to review a PR, (2) User says "/pr-review", (3) User wants to review code changes before merging.

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

# PR Code Review (Local)

Perform a thorough local code review with full project context - reads source files directly, no API truncation limits.

**Announce at start:** "I'm using pr-review skill to review the pull request."

## Usage

```
/pr-review [pr_number]
```

`$ARGUMENTS` may contain an optional PR number and/or `--automation` flag.

- Without `--automation`: interactive mode (prompts for confirmation, comment, cleanup)
- With `--automation`: non-interactive mode (auto-post comment, auto-delete branch, output machine-readable result)

---

## Steps

### Step 1 - Determine PR Number

If `$ARGUMENTS` is non-empty, use it as the PR number.

Otherwise run:

```bash
gh pr view --json number -q .number
```

If this also fails (not on a PR branch), abort with:

> No PR number provided and cannot detect one from the current branch. Usage: `/pr-review <pr_number>`

Also parse `--automation` from `$ARGUMENTS`:

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

### Step 2 - Check CI Status

```bash
gh pr view <PR_NUMBER> --json statusCheckRollup \
  --jq '.statusCheckRollup[] | {name: .name, status: .status, conclusion: .conclusion}'
```

**Required jobs to check:**

- `Code Quality`
- `Unit Tests (ubuntu-latest)`
- `Unit Tests (macos-14)`
- `Unit Tests (windows-2022)`
- `Coverage Test`
- `i18n-check`

(`build-test` is an optional job and is not included in the required check list.)

**Special cases:** Skip this step and proceed directly when either of the following is true:

- `statusCheckRollup` is empty (CI was never triggered)
- `statusCheckRollup` is non-empty, but none of the required jobs appear in the list (indicating the pr-checks.yml workflow was not triggered at all - e.g. a PR that only touches docs/md files)

**Parsing logic:** Handle three cases:

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