# Github Review Pr

> ALWAYS invoke when the user wants to review a GitHub pull request. Triggers:"review PR","review pull request","check this PR","PR review". Provide a PR URL or owner/repo#number as argument.

- **Type:** Skill
- **Install:** `agentstack add skill-doctormozg-claude-pipelines-github-review-pr`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [DoctorMozg](https://agentstack.voostack.com/s/doctormozg)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [DoctorMozg](https://github.com/DoctorMozg)
- **Source:** https://github.com/DoctorMozg/claude-pipelines/tree/master/plugins/mz-dev-git/skills/github-review-pr

## Install

```sh
agentstack add skill-doctormozg-claude-pipelines-github-review-pr
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Review PR

## Overview

Dispatch the `github-pr-reviewer` agent to perform a thorough review of a GitHub pull request in an isolated worktree. Produces a report under `.mz/reviews/` with severity-labeled findings and a verdict.

## When to Use

Triggers: "review PR", "review pull request", "check this PR", "PR review".

### When NOT to use

- The changes live on a local branch, not a GitHub PR — use `review-branch`.
- The user wants to triage many PRs at once — use `github-scan-prs`.
- The PR reference is ambiguous or missing — ask for a URL or `owner/repo#number`.

## Arguments

`$ARGUMENTS` should be a GitHub PR reference:

- Full URL: `https://github.com/owner/repo/pull/123`
- Short form: `owner/repo#123`

If no argument is provided, ask the user for a PR URL.

## Core Process

| Phase | Goal                              | Details      |
| ----- | --------------------------------- | ------------ |
| 0     | Setup                             | Inline below |
| 1     | Dispatch github-pr-reviewer agent | Inline below |

### Phase 0: Setup

1. Parse `$ARGUMENTS`. If the PR reference is empty or malformed, escalate via AskUserQuestion — never guess, never fabricate a PR URL.
1. Normalize the reference to `__` form.
1. `task_name` = `_github_review_pr_` where `` is today's date (underscores) and `` is `__` truncated to 20 chars, snake_case; on same-day collision append `_v2`, `_v3`.
1. Create `.mz/task//`.
1. Write `state.md` with `schema_version: 2`, `Status: running`, `Phase: 0`, `Started: `, `PR: `, `Owner: `, `Repo: `, `Number: `.
1. Emit a visible setup block: `task_name`, PR reference, report dir (`.mz/reviews/`).

### 1. Dispatch

1. Validate via `gh pr view` that the normalized PR reference is accessible. On failure, escalate via AskUserQuestion.
1. Launch the `github-pr-reviewer` agent with the PR reference as the prompt.
1. After the agent completes, parse its final message for the `STATUS:` line:
   - `STATUS: DONE` or `STATUS: DONE_WITH_CONCERNS` → update `state.md` to `Status: complete`, `Phase: 1`. On `DONE_WITH_CONCERNS`, also log the concerns block into `state.md`.
   - `STATUS: NEEDS_CONTEXT` → re-dispatch **once** with the requested context; on a second `NEEDS_CONTEXT`, escalate via AskUserQuestion.
   - `STATUS: BLOCKED` → escalate via AskUserQuestion with the blocker reason. Never auto-retry on `BLOCKED`.
1. On any terminal success, display the absolute report path.

## Techniques

Delegated to phase files — see Phase Overview table above. Detailed technique (worktree isolation, diff-plus-context reading, multi-lens fan-out, two-signal Critical gate, CI-result cross-referencing, severity labeling) lives in `plugins/mz-dev-git/agents/github-pr-reviewer.md` and the code-lens-\* agent files.

## Common Rationalizations

N/A — this is a reference/collaboration skill that dispatches a specialist agent. It does not enforce discipline decisions itself. Discipline pressure is enforced inside `github-pr-reviewer` and the code-lens-\* agents.

## Red Flags

- The PR argument is missing or malformed and you are guessing a URL instead of asking.
- You dispatched `github-pr-reviewer` without first validating PR accessibility via `gh pr view`.
- The agent returned `STATUS: BLOCKED` or `NEEDS_CONTEXT` and you retried more than once instead of escalating.
- The agent's final message had no `STATUS:` line and you proceeded anyway.

## Verification

Output the report path (`.mz/reviews/_github_review_pr___.md`), confirm the file exists, and print the `VERDICT:` line plus the count of `Critical:` findings.

## Error Handling

- **Empty / malformed PR argument** → escalate via AskUserQuestion; never guess, never fabricate a PR URL.
- **`gh` unavailable for Phase 0 validation** → before escalating, try `mcp__*github*` MCP tools if exposed, then direct GitHub REST API (`curl -fsSL -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github+json" "https://api.github.com/repos/{owner}/{repo}/pulls/{number}"`). Only escalate via AskUserQuestion after all three tiers fail.
- **Missing tooling** (`git worktree` unavailable, `Agent` tool absent) → escalate via AskUserQuestion with the exact missing command.
- **Empty agent result** (report file missing, empty, or no `VERDICT:` line) → retry the dispatch once with the same prompt; if still empty, escalate via AskUserQuestion with the failure mode.
- Never guess — on any ambiguity (inaccessible PR, 404, merge conflict in worktree, missing base ref) escalate via AskUserQuestion rather than proceed silently.

## State Management

State persists to `.mz/task//state.md` with `schema_version: 2` as its first line. This is a single-dispatch skill (setup → dispatch → report in one turn), so the `phase_complete` / `what_remains` progress-ledger fields are not required. On reading a `schema_version: 1` or unversioned file, add `schema_version: 2` and log the upgrade.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [DoctorMozg](https://github.com/DoctorMozg)
- **Source:** [DoctorMozg/claude-pipelines](https://github.com/DoctorMozg/claude-pipelines)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-doctormozg-claude-pipelines-github-review-pr
- Seller: https://agentstack.voostack.com/s/doctormozg
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
