# Piv Review PR

Full pull-request review, fetch the PR, run the project's validation, review the diff...

- Repository: https://github.com/coleam00/skills (726 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add coleam00/skills --skill piv-review-pr -g -a claude-code -y`
Codex: `npx skills add coleam00/skills --skill piv-review-pr -g -a codex -y`
Cursor: `npx skills add coleam00/skills --skill piv-review-pr -g -a cursor -y`
Gemini CLI: `npx skills add coleam00/skills --skill piv-review-pr -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add coleam00/skills`

## Description

Full pull-request review, fetch the PR, run the project's validation, review the diff with fresh eyes (dispatching the code-reviewer agent), categorize issues by severity, post the review to GitHub (approve / request-changes / comment), and save a report. The agentic gate that runs on an open PR before a human approves. Use after piv-create-pr.

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

# Review PR: The Agentic Gate Before the Human

**Input**: $ARGUMENTS

The point of this skill is **fresh eyes**: it reviews the PR in a clean context, *not* the context that wrote
the code, and can hand the deep analysis to the **`code-reviewer` agent**, which is the whole reason the review
catches what the author's own context rationalizes away. It posts its verdict on the PR, then a **human** makes
the final call.

## Phase 1, Fetch the PR

Resolve the input to a PR number (a number, a URL, or a branch via
`gh pr list --head <branch> --json number -q '.[0].number'`). Then:

```bash
gh pr view {N} --json number,title,body,author,headRefName,baseRefName,state,additions,deletions,changedFiles,files
gh pr diff {N}
gh pr checkout {N}
```

State guard: `MERGED`/`CLOSED` → stop ("nothing to review"); `DRAFT` → review direction, don't approve/block.

## Phase 2, Load the context (so you review against the right bar)

- **`CLAUDE.md`** + any `.claude/references/`, the project's standards are the review rubric.
- **The implementation report** (if `piv-implement` wrote one, `.claude/reports/*{branch}*`) + its plan: read the
  **documented deviations**. A documented deviation is an *intentional decision*, **not** an issue, only flag
  *undocumented* divergences. (No report? Review normally and note its absence.)
- The PR's own intent (title/body): what problem it claims to solve.

## Phase 3, Run validation

Run the project's real suite (the **`piv-validate`** skill, or the plan's validation commands), tests, type-check,
lint, build. Capture pass/fail + counts. A red suite is a finding in itself.

## Phase 4, Review the diff (dispatch the code-reviewer agent)

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