pr-walkthrough
Generate an evidence-grounded markdown walkthrough for a pull request.
от 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_IDcomes from the generated Workflow Bootstrap section.- Derive
RUN_NAMEfrom 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:
- Set
targetfrom{TARGET}andbase_branchfrom{BASE_BRANCH}. - Get
current_branchwithgit -C {codeRoot} branch --show-current. - Classify a numeric target with
^[0-9]+$. - Classify a PR URL when the target contains
/pull/. - For empty target or branch target, first try
gh pr viewfrom{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
ghis unavailable for a numeric or URL target, fail duringcollecting; do not silently switch to an unrelated local diff. - If a branch target has no PR and no local diff against
BASE_BRANCH, fail duringcollecting. - 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 |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash(echo *) - 02
Bash(rp1 *) - 03
Bash(git *) - 04
Bash(gh *)
FAQ
Что делает скилл pr-walkthrough?
Generate an evidence-grounded markdown walkthrough for a pull request.
Как установить скилл pr-walkthrough?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-walkthrough запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…