Command Palette

Search for a command to run...

Назад к скиллам
скилл № 84405

review-pr

Review a pull request with independent reviewer subagents and judge their findings, whether it's someone else's PR, a re-review, a self-review of your own, or…

БесплатноБез исполняемых скриптов
hoblinот hoblin★ 38 звёзд на GitHub

Установить review-pr в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Input Format

/rpi:review-pr [mode] [PR] [additional instructions]
  • mode (optional): review (default), re-review, self-review, or address-feedback
  • PR: PR number or link (required)
  • additional instructions (optional): file exclusions, focus areas, or any custom guidance

Examples:

/rpi:review-pr #1234
/rpi:review-pr re-review #1234
/rpi:review-pr self-review #1234
/rpi:review-pr address-feedback #1234
/rpi:review-pr #1234 exclude config/locales and .yml files
/rpi:review-pr re-review #1234 skip rails guru because it is not a rails project

Process

Your role is orchestrator and judge, not doer. You collect artifacts, delegate analysis to subagents, and apply judgment to their output. The subagents read the code and comments — you decide what to do about their findings.

Steps are sequential — later steps depend on earlier results. Complete each step and wait for its results before starting the next. Skipping ahead without subagent results means the judgment layer in "Step 6: Judge Findings" has nothing to work with. Only parallelize where explicitly marked (e.g., "spawn in parallel").

Step 1: Gather PR Metadata

gh pr view <PR_NUMBER> --json number,title,body,url,headRefName,baseRefName

If re-review or address-feedback mode is activated, also save all existing review feedback to /tmp/:

Do not read these files — pass them to subagents by path only. The subagents will read and analyze the content.

# Review verdicts and bodies (APPROVED, CHANGES_REQUESTED, COMMENTED)
gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/reviews \
  --jq '[.[] | {id, state, body, html_url, commit_id, submitted_at, author_association, user: .user.login}]' \
  | tee /tmp/pr_<NUMBER>_reviews.json | jq length

# Inline review comments on specific diff lines
gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/comments \
  --jq '[.[] | {id, pull_request_review_id, body, path, line, start_line, side, diff_hunk, commit_id, created_at, author_association, in_reply_to_id, user: .user.login}]' \
  | tee /tmp/pr_<NUMBER>_inline_comments.json | jq length

# Conversation-level comments
gh api repos/<OWNER>/<REPO>/issues/<PR_NUMBER>/comments \
  --jq '[.[] | {id, body, html_url, created_at, updated_at, author_association, user: .user.login}]' \
  | tee /tmp/pr_<NUMBER>_conversation.json | jq length

If toon is available, pipe each extraction through it and save as .txt instead — token-efficient artifacts, and every subagent that reads them benefits. Note the sanity check changes with the format: toon output is not JSON, so end the pipeline with | tee /tmp/pr_<NUMBER>_reviews.txt | wc -l instead of | jq length.

Step 2: Fetch and Save Diff

Checkout the PR branch locally and generate the diff. Save it to /tmp/.

git fetch origin
git checkout <branch>

# Use merge-base for a clean diff (handles diverged base branch)
BASE=$(git merge-base origin/<baseRefName> HEAD)
git diff $BASE -- . > /tmp/pr_<NUMBER>_diff.txt

If the user provided file exclusion or inclusion patterns in additional instructions, apply them using git's pathspec syntax:

# Exclude specific paths
git diff $BASE -- . ':(exclude)path/to/noisy/dir' ':(exclude)*.ext' > /tmp/pr_<NUMBER>_diff.txt

# Include only specific directories
git diff $BASE -- path/to/dir1/ path/to/dir2/ > /tmp/pr_<NUMBER>_diff.txt

# Combine inclusion with exclusion
git diff $BASE -- path/to/dir/ ':(exclude)path/to/dir/subdir' > /tmp/pr_<NUMBER>_diff.txt

Verify the diff is non-empty: wc -l < /tmp/pr_<NUMBER>_diff.txt

Step 3: Fetch Original Ticket

The PR references the original ticket (e.g., ENG-123, PROJ-456). Fetch full ticket details — requirements and acceptance criteria define what "correct" looks like for this change. You can't review a feature without knowing what was in the task description before it was implemented.

Save the ticket verbatim to /tmp/pr_<NUMBER>_ticket.md — full title, description, every Task, every Acceptance Criterion, plus the ticket comments. Do not summarize, annotate, or reorder it: a paraphrase is where your conclusions leak into the reviewers' inputs, and a reviewer fed conclusions ratifies them instead of auditing the code.

Wait for ticket details before proceeding — "Step 4: Gather Historical Context" needs the ticket context to ask the right questions.

Step 4: Gather Historical Context

Spawn the thoughts-analyzer subagent to find historical knowledge about affected features.

subagent_type: rpi:thoughts-analyzer

Prompt: "What do we know about <ticket reference and title from "Step 3: Fetch Original Ticket">? What decisions, constraints, and trade-offs should reviewers be aware of?"

The harness saves the subagent's report to a task output file and shows the path when it completes — note that path. It is the historical-context artifact you pass to reviewers. If no path was surfaced (the report came back inline), save it verbatim to `/

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл review-pr?

Review a pull request with independent reviewer subagents and judge their findings, whether it's someone else's PR, a re-review, a self-review of your own, or the feedback your PR received.

Как установить скилл review-pr?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл review-pr запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить review-pr с