Skip to content

Instantly share code, notes, and snippets.

@asnewman
Created February 23, 2026 06:00
Show Gist options
  • Select an option

  • Save asnewman/18460ddb5fbfb32b1aaadbb9d4cbcfe2 to your computer and use it in GitHub Desktop.

Select an option

Save asnewman/18460ddb5fbfb32b1aaadbb9d4cbcfe2 to your computer and use it in GitHub Desktop.
PR Walkthrough Skill
name pr-walkthrough
description Walk through a GitHub PR step by step in digestible chunks, allowing for questions and code changes along the way

PR Walkthrough Skill

Purpose

Help users understand and review pull requests by breaking down changes into small, digestible chunks and explaining them one at a time.

Workflow

1. Fetch PR Information

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>

2. Break Down Changes

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

3. Present Chunks One at a Time

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

4. Handle User Interactions

  • 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

5. Support Iterative Changes

When the user requests changes:

  1. Make the edit using the Edit tool
  2. Ask if the user wants to commit and push the changes or make more changes/ask questions
  3. Continue the walkthrough if more chunks remain

Example Usage

User: "Can you walk me through https://github.com/owner/repo/pull/123"

Claude will:

  1. Fetch the PR details and diff
  2. Present the first chunk with explanation
  3. Wait for user to continue or ask questions
  4. Repeat until all changes are covered

Chunk Size Guidelines

  • Aim for 10-30 lines of diff per chunk
  • Keep explanations concise (2-4 sentences)
  • One concept per chunk when possible

Response Format

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.

Notes

  • Always use gh CLI 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment