| name | pr-walkthrough |
|---|---|
| description | Walk through a GitHub PR step by step in digestible chunks, allowing for questions and code changes along the way |
Help users understand and review pull requests by breaking down changes into small, digestible chunks and explaining them one at a time.
When given a PR URL or number:
gh pr view <PR_NUMBER> --repo <owner/repo> --json title,body,files,additions,deletions
gh pr diff <PR_NUMBER> --repo <owner/repo>Organize the diff into logical chunks:
- Group by file when appropriate
- Break large file changes into smaller sections (e.g., by function or logical block)
- Order chunks to build understanding progressively
For each chunk:
- Show a small, focused piece of the diff
- Explain what the change does in plain language
- Wait for the user to say "next", "continue", or ask a question
- Questions: Answer questions about the current chunk or overall PR
- Clarifications: Explain code patterns, naming choices, or design decisions
- Change requests: If the user wants to modify code, make the edit, commit, and push
- Navigation: Allow jumping to specific files or sections if requested
When the user requests changes:
- Make the edit using the Edit tool
- Ask if the user wants to commit and push the changes or make more changes/ask questions
- Continue the walkthrough if more chunks remain
User: "Can you walk me through https://github.com/owner/repo/pull/123"
Claude will:
- Fetch the PR details and diff
- Present the first chunk with explanation
- Wait for user to continue or ask questions
- Repeat until all changes are covered
- Aim for 10-30 lines of diff per chunk
- Keep explanations concise (2-4 sentences)
- One concept per chunk when possible
For each chunk:
## Chunk N: Brief description
[Show the diff or code snippet]
**What this does:** [Concise explanation]
---
Ready for the next chunk? Say "next" or ask any questions.
- Always use
ghCLI for GitHub operations (not raw API calls) - Be patient - users may need time to digest each chunk
- Offer to make changes when the user identifies issues
- Keep track of where you are in the walkthrough