PR Code Review
Portable PR review for open-skills. Combines Anthropic Claude Code code-review plugin flow (eligibility, multi-perspective, ≥80 confidence, permalink comments), mattpocock Standards∥Spec separation + fixed-point diff, and Superpowers plan alignment / severity / strengths-first habits. Platform-agnostic agent dispatch (no host model-tier hardcoding).
Install: npx skills add FuDesign2008/open-skills -g --skill pr-code-review --yes
When this applies
- User asks to review an open PR/MR, or
merge-discipline Part R requires pre-merge review.
- Skip (state reason, do not comment): PR closed, draft, trivial/automated, or already reviewed by this skill this session/tip.
Depth (full | light)
Callers (especially merge-discipline Part R) MAY pass depth=full or depth=light. Default: full.
| Depth |
Behavior |
| full |
Dual-axis Standards∥Spec; multi-perspective review preferred in parallel when the host supports it (current default process below) |
| light |
Dual-axis Standards∥Spec on the pinned tip is still mandatory; parallel multi-perspective swarm is not required. Confidence ≥80 Critical/Important clearance and publish rules are unchanged |
Standalone user triggers without a depth parameter MUST use full.
Process
- Eligibility — Open, non-draft, needs review; not already reviewed this session on this tip. Else stop.
- Resolve depth —
full (default) or light from the caller.
- Pin fixed point — PR/MR base ref, or user-supplied commit/branch, or
origin/<default-branch> for merge candidates. Confirm ref resolves and three-dot diff vs tip is non-empty. Empty diff → abort (do not spawn perspectives).
- Resolve Spec source (first hit wins): PR/issue body + linked tickets → user path → OpenSpec change delta / related
openspec/specs → ask user → else Spec axis = skipped (no spec available).
- Resolve Standards sources —
AGENTS.md / CLAUDE.md (root + dirs the PR touches), plus coding-standards docs if present. Optional smell baseline: reference.md (repo docs override; smells are judgement calls, never sole hard violations).
- Summarize — Short change summary (title, intent, diff shape).
- Dual-axis review (do not merge-rank across axes):
- Standards axis — Documented guidance breaches (cite file + rule); optional smell heuristics.
- Spec axis — Missing/partial planned behavior; unjustified scope creep; wrong implementation of a stated requirement (quote spec/plan line). Skip entire axis if no Spec source.
- full only: also prefer parallel perspectives (bugs-in-diff-only, blame/history, prior PR comments on same files, in-file comment guidance).
- light: skip the mandatory parallel swarm; single-pass dual-axis is enough.
- Calibrate — Each surviving candidate: severity Critical / Important / Minor, then confidence 0–100 (rubric below). Drop scores below 80. Map: Critical/Important usually land ≥75–100 if verified; Minor usually drops unless guidance-hard.
- Strengths — If any, list briefly before issues (accurate praise builds trust in the rest).
- Re-check eligibility — Still open / same tip before publish.
- Publish — Comment via
gh / glab (or report in-session if host forbids comment). Dual-axis sections in the comment; full-SHA permalinks. Templates: reference.md.
Confidence rubric
| Score |
Meaning |
| 0 |
False positive / pre-existing / fails scrutiny |
| 25 |
Unverified / stylistic / not in guidance |
| 50 |
Real but nit or rare |
| 75 |
Likely real and important; or explicitly required by guidance/plan |
| 100 |
Definitely real; evidence confirms |
False positives to discard
Pre-existing; lookalike non-bugs; pedantic nits; linter/typechecker/compiler catchable; generic “more tests/docs/security” unless guidance/plan requires it; unchanged lines; intentional PR-scoped behavior.
Host contract (merge-discipline Part R)
- Run against the open PR/MR about to merge, at the depth Part R selected (
full or light).
- Pass → neither axis retains ≥80 Critical or Important issues (Minor-only or all scores below 80 = pass). Light depth MUST NOT weaken this gate.
- Fail → block merge until fixed or user explicit Part R skip 留痕.
- CI green / coverage skip is not a substitute.
- Do not require a full receiving-code-review loop to pass Part R.
After feedback (optional pointer)
When acting on review comments (human or this skill): verify against the codebase before changing anything; no performative agreement; reasoned technical pushback when wrong; clarify unclear items before implementing. Full reception discipline is optional and out of Part R.
Integration guide
- Strong-dep from
merge-discipline; missing → abort with
npx skills add FuDesign2008/open-skills -g --skill pr-code-review --yes
- Do not rename to
code-review (external name collision).
1---2name: pr-code-review3description: Dual-axis (Standards∥Spec) multi-perspective PR review with confidence ≥80 filtering, severity calibration, plan alignment, and optional GitHub/GitLab review comment. Best-of: Claude /code-review pipeline + mattpocock dual-axis + Superpowers plan/severity habits. Triggers — 「PR 代码审查」「审查这个 PR」「code-review」「/code-review」「审 PR」「pull request review」「双轴审查 PR」 / pr code review, review this PR. Do NOT use as a name alias for mattpocock code-review or Superpowers requesting-code-review.4---56# PR Code Review78> Portable PR review for open-skills. Combines Anthropic Claude Code **code-review** plugin flow (eligibility, multi-perspective, ≥80 confidence, permalink comments), mattpocock **Standards∥Spec** separation + fixed-point diff, and Superpowers **plan alignment / severity / strengths-first** habits. Platform-agnostic agent dispatch (no host model-tier hardcoding).9>10> Install: `npx skills add FuDesign2008/open-skills -g --skill pr-code-review --yes`1112## When this applies1314- User asks to review an open PR/MR, or `merge-discipline` Part R requires pre-merge review.15- **Skip** (state reason, do not comment): PR closed, draft, trivial/automated, or already reviewed by this skill this session/tip.1617## Depth (`full` | `light`)1819Callers (especially `merge-discipline` Part R) MAY pass `depth=full` or `depth=light`. **Default: `full`.**2021| Depth | Behavior |22|-------|----------|23| **full** | Dual-axis Standards∥Spec; multi-perspective review preferred in parallel when the host supports it (current default process below) |24| **light** | Dual-axis Standards∥Spec on the pinned tip is still **mandatory**; parallel multi-perspective swarm is **not** required. Confidence ≥80 Critical/Important clearance and publish rules are unchanged |2526Standalone user triggers without a depth parameter MUST use `full`.2728## Process29301. **Eligibility** — Open, non-draft, needs review; not already reviewed this session on this tip. Else stop.312. **Resolve depth** — `full` (default) or `light` from the caller.323. **Pin fixed point** — PR/MR base ref, or user-supplied commit/branch, or `origin/<default-branch>` for merge candidates. Confirm ref resolves and three-dot diff vs tip is **non-empty**. Empty diff → abort (do not spawn perspectives).334. **Resolve Spec source** (first hit wins): PR/issue body + linked tickets → user path → OpenSpec change delta / related `openspec/specs` → ask user → else Spec axis = **skipped (no spec available)**.345. **Resolve Standards sources** — `AGENTS.md` / `CLAUDE.md` (root + dirs the PR touches), plus coding-standards docs if present. Optional smell baseline: [reference.md](reference.md) (repo docs **override**; smells are judgement calls, never sole hard violations).356. **Summarize** — Short change summary (title, intent, diff shape).367. **Dual-axis review** (**do not** merge-rank across axes):37 - **Standards axis** — Documented guidance breaches (cite file + rule); optional smell heuristics.38 - **Spec axis** — Missing/partial planned behavior; unjustified scope creep; wrong implementation of a stated requirement (quote spec/plan line). Skip entire axis if no Spec source.39 - **full only:** also prefer parallel perspectives (bugs-in-diff-only, blame/history, prior PR comments on same files, in-file comment guidance).40 - **light:** skip the mandatory parallel swarm; single-pass dual-axis is enough.418. **Calibrate** — Each surviving candidate: severity **Critical / Important / Minor**, then confidence **0–100** (rubric below). **Drop scores below 80.** Map: Critical/Important usually land ≥75–100 if verified; Minor usually drops unless guidance-hard.429. **Strengths** — If any, list briefly **before** issues (accurate praise builds trust in the rest).4310. **Re-check eligibility** — Still open / same tip before publish.4411. **Publish** — Comment via `gh` / `glab` (or report in-session if host forbids comment). Dual-axis sections in the comment; full-SHA permalinks. Templates: [reference.md](reference.md).4546### Confidence rubric4748| Score | Meaning |49|------|---------|50| 0 | False positive / pre-existing / fails scrutiny |51| 25 | Unverified / stylistic / not in guidance |52| 50 | Real but nit or rare |53| 75 | Likely real and important; or explicitly required by guidance/plan |54| 100 | Definitely real; evidence confirms |5556### False positives to discard5758Pre-existing; lookalike non-bugs; pedantic nits; linter/typechecker/compiler catchable; generic “more tests/docs/security” unless guidance/plan requires it; unchanged lines; intentional PR-scoped behavior.5960## Host contract (`merge-discipline` Part R)6162- Run against the **open PR/MR about to merge**, at the depth Part R selected (`full` or `light`).63- **Pass** → neither axis retains ≥80 **Critical** or **Important** issues (Minor-only or all scores below 80 = pass). Light depth MUST NOT weaken this gate.64- **Fail** → block merge until fixed or user **explicit** Part R skip 留痕.65- CI green / coverage skip is **not** a substitute.66- Do **not** require a full receiving-code-review loop to pass Part R.6768## After feedback (optional pointer)6970When acting on review comments (human or this skill): verify against the codebase before changing anything; no performative agreement; reasoned technical pushback when wrong; clarify unclear items before implementing. Full reception discipline is optional and **out of Part R**.7172## Integration guide7374- Strong-dep from `merge-discipline`; missing → abort with 75 `npx skills add FuDesign2008/open-skills -g --skill pr-code-review --yes`76- Do not rename to `code-review` (external name collision).