Command Palette

Search for a command to run...

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

pr-walkthrough

Generate an evidence-grounded markdown walkthrough for a pull request.

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

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

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

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

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

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

PR Walkthrough

Generate a slide-ready markdown walkthrough from direct pull request evidence. The output is a reviewer-orientation artifact with plain markdown fallback, not a review verdict or rendered slide reader.

Use the pre-resolved projectRoot, kbRoot, workRoot, and codeRoot values from the generated Workflow Bootstrap section. Run all source-control commands from codeRoot, and write generated artifacts only under workRoot.

Do not read .rp1/work/pr-reviews/ or any existing pr-review artifacts as source material. The walkthrough source of truth is the target PR metadata, changed files, diffs, and commit summaries gathered in this workflow.

STATE-MACHINE

stateDiagram-v2
    [*] --> collecting
    collecting --> publishing : evidence_ready
    publishing --> [*] : done

On each phase transition, report via:

rp1 agent-tools emit \
  --workflow pr-walkthrough \
  --type status_change \
  --run-id {RUN_ID} \
  --step {CURRENT_STATE} \
  --data '{"status": "running"}'
  • RUN_ID comes from the generated Workflow Bootstrap section.
  • Derive RUN_NAME from the resolved target: use "PR Walkthrough: PR #{number}" when a PR number is available, otherwise "PR Walkthrough: {branch_name}".
  • On the first emit only, include --name "{RUN_NAME}".

Example sequence:

rp1 agent-tools emit --workflow pr-walkthrough --type status_change --run-id {RUN_ID} --name "PR Walkthrough: PR #42" --step collecting --data '{"status": "running"}'
rp1 agent-tools emit --workflow pr-walkthrough --type status_change --run-id {RUN_ID} --step publishing --data '{"status": "running"}'
rp1 agent-tools emit --workflow pr-walkthrough --type status_change --run-id {RUN_ID} --step publishing --data '{"status": "completed"}'

On a blocking error, emit the current step with {"status":"failed","reason":"..."} and stop without dispatching the reporter or registering an artifact.

1. Collect Direct Evidence

Execute immediately. Do not ask for clarification. Fail clearly during collecting when the target cannot identify one PR or one local diff.

Emit collecting running before command execution.

1.1 Resolve Target

Normalize inputs:

Input Resolution
Empty TARGET Use the PR associated with the current branch via gh pr view; if none exists, use git diff BASE_BRANCH...current_branch
Numeric target Use gh pr view {TARGET} and gh pr diff {TARGET}
PR URL Use gh pr view {TARGET} and gh pr diff {TARGET}
Branch name Use gh pr view {TARGET} if available; otherwise use git diff BASE_BRANCH...{TARGET}

Implementation guidance:

  1. Set target from {TARGET} and base_branch from {BASE_BRANCH}.
  2. Get current_branch with git -C {codeRoot} branch --show-current.
  3. Classify a numeric target with ^[0-9]+$.
  4. Classify a PR URL when the target contains /pull/.
  5. For empty target or branch target, first try gh pr view from {codeRoot}. If that fails, validate that both base and head refs exist locally before using the git-only fallback.

If no PR exists and the local fallback cannot produce a diff, fail with a message that includes the attempted target and base branch.

1.2 Gather Evidence

For a resolved GitHub PR target, collect:

gh pr view {resolved_pr_target} \
  --json number,title,body,url,author,baseRefName,headRefName,headRefOid,baseRefOid,additions,deletions,changedFiles,files,commits
gh pr diff {resolved_pr_target} --name-only
gh pr diff {resolved_pr_target} --patch

For a git-only target, collect:

git -C {codeRoot} diff --name-only {base_branch}...{head_ref}
git -C {codeRoot} diff --patch {base_branch}...{head_ref}
git -C {codeRoot} diff --stat {base_branch}...{head_ref}
git -C {codeRoot} log --oneline --no-decorate {base_branch}..{head_ref}

For PR targets, attempt a local stat with git -C {codeRoot} diff --stat {baseRefName}...{headRefName} when refs exist. If local refs are unavailable, use PR JSON additions, deletions, and changedFiles as the stats source.

Required failure behavior:

  • If gh is unavailable for a numeric or URL target, fail during collecting; do not silently switch to an unrelated local diff.
  • If a branch target has no PR and no local diff against BASE_BRANCH, fail during collecting.
  • If the collected changed-file list and patch are both empty, fail during collecting.

1.3 Build Evidence JSON

Build one EVIDENCE_JSON object from direct evidence only:

{
  "source": "github_pr | git_diff",
  "target": "{TARGET}",
  "base_branch": "{base_branch}",
  "head_ref": "{head_ref}",
  "review_id": "{review_id}",
  "pr": {},
  "file_names": [],
  "patch": "",
  "stats": "",
  "commit_summaries": [],
  "evidence_index": []
}

Assign evidence IDs before dispatch:

ID Pattern Source
E-PR-001 PR metadata, title, body, URL, author, base/head refs, or git-only branch metadata
Полный SKILL.md на GitHub

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

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

  1. 01Bash(echo *)
  2. 02Bash(rp1 *)
  3. 03Bash(git *)
  4. 04Bash(gh *)

FAQ

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

Generate an evidence-grounded markdown walkthrough for a pull request.

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

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

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

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

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

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