pr-review
БесплатноБез исполняемых скриптовНе проверенExecutes a risk-tiered, multi-perspective PR review — triages the change, runs specialist subagents in parallel (code-first, testing, skeptical, big-picture)…
от freenet★ 27 звёзд на GitHubОб этом скилле
PR Reviewer
Run a comprehensive PR review covering all four Freenet review perspectives, plus an external (non-Claude) model, and post a consolidated review to the PR.
When to Use
Invoke /freenet:pr-review <PR-NUMBER> after a PR is ready for review, before merging.
The PR number is passed as the skill argument ($1); if none is given, detect the PR
for the current branch with gh pr view --json number -q .number.
How This Skill Works
This skill orchestrates a review — it does not do all the perspectives by hand. It checks out the PR, triages the change to a risk tier, spawns specialist subagents in parallel (scaled to that tier) plus an external model pass, reconciles their findings into one report, and posts that report to the PR.
The four subagents ship with this plugin as first-class agent types — invoke them
directly with the Agent tool's subagent_type parameter. Do not paste agent
definitions into a general-purpose prompt; that is obsolete.
Step 1: Check Out the PR, Gather Context, and Triage Risk
Critical: reviewers must read the PR's actual code, and the review must not
disturb the user's working tree. Check the PR out into a dedicated worktree — do
NOT use gh pr checkout, which switches the user's working branch and drags any
uncommitted changes onto the PR branch, contaminating the review.
PR=<PR-NUMBER> # the $1 skill argument
BASE="$(gh pr view "$PR" --json baseRefName -q .baseRefName)" # the PR's base branch
git fetch origin "$BASE" # fresh base branch for the diff
git fetch origin "pull/$PR/head" # PR head — FETCH_HEAD now points here
REVIEW_DIR="${TMPDIR:-/tmp}/pr-review-$PR"
git worktree remove --force "$REVIEW_DIR" 2>/dev/null || true # prune a stale prior worktree
git worktree add --detach "$REVIEW_DIR" FETCH_HEAD # PR code, isolated
cd "$REVIEW_DIR" # run the review from here
Gather context (from the worktree):
gh pr view "$PR"
gh pr diff "$PR" --name-only
gh pr checks "$PR" # CI status
gh issue view <ISSUE_NUMBER> # linked issue (from "Fixes #" / "Closes #")
# Existing review feedback — read it so the review ADDRESSES it, not duplicates it:
gh pr view "$PR" --json comments,reviews
gh api repos/{owner}/{repo}/pulls/"$PR"/comments # inline review comments
The gh api .../comments call above is the reliable way to get inline comments —
they are easy to miss.
Large diffs: if the diff exceeds ~2000 changed lines or ~40 files, instruct each subagent to review by file batches rather than loading the whole diff into context.
Cleanup (mandatory — do this even if the review aborts partway): remove the
worktree with git worktree remove --force "$REVIEW_DIR".
Do NOT run a code-simplifier or any other mutating step here — this skill reviews the PR as submitted; editing the checked-out code would make reviewers judge something other than the PR.
Pick the Risk Tier
Choose the tier by checking these in order — first match wins — or honor an explicit tier the user named (e.g. "full review of PR 42"):
- Skip — the entire diff is mechanical: typo / comment-only / formatting / version bump / CHANGELOG-only. Judge this against the whole diff, not the PR title — a PR labelled "version bump" that also edits logic is not Skip. Report "trivial — CI is the only gate" and stop; do not spawn reviewers.
- Full — the change touches a high-risk surface (below), OR the diff is large or cross-cutting, OR you are genuinely uncertain. Run the complete process.
- Light — everything else: a low-to-moderate-risk change with no high-risk surface. Spawn a reduced reviewer set (Step 2) plus the external model pass (Step 3).
These tiers are exhaustive — Light is the catch-all. When torn between two, pick the heavier one.
High-risk surfaces — always Full: concurrency / async, cryptography / security / auth, state authorization, data or schema migration, wire format / protocol / serialization (freenet-stdlib enums), consensus / routing, transport / NAT traversal, contract or delegate WASM, deploy / release / CI config.
State the chosen tier and the one-line reason before proceeding.
Step 2: Spawn the Review Subagents in Parallel
Spawn the reviewers with the Agent tool in a single message so they run
concurrently, each with run_in_background: true. Which reviewers run depends on the
tier picked in Step 1:
- Full — spawn all four.
- Light — spawn
freenet:skeptical-reviewer; also spawnfreenet:big-picture-reviewerif the diff removes code or spans multiple components.
subagent_type |
Perspective |
|---|---|
freenet:code-first-reviewer |
Reads the code before the description; flags gaps between stated intent and implementation |
freenet:testing-reviewer |
Test-coverage gaps at unit / integration / s |
Установить pr-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pr-review?
Executes a risk-tiered, multi-perspective PR review — triages the change, runs specialist subagents in parallel (code-first, testing, skeptical, big-picture) plus an external model pass, then posts a consolidated review to the PR.
Как установить скилл pr-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic