pr-walkthroughlisted
Install: claude install-skill YoniChechik/claude-code-config
Walks through a PR's changes interactively, explaining one file and one section at a time - like a human would sit and explain their code. Each step requires user to say "next" to continue.
## Optional PR number from user input
"$ARGUMENTS"
### Argument Handling
- If PR number provided: Use specified PR
- If empty: Use PR for current branch (via `gh pr view`)
## Process
### Step 1: Initialize Review Session
Fetch the PR and map all changes into reviewable blocks:
```bash
# Get PR number
if [ -n "$ARGUMENTS" ]; then
PR_NUM="$ARGUMENTS"
else
PR_NUM=$(gh pr view --json number --jq '.number' 2>/dev/null)
if [ -z "$PR_NUM" ]; then
echo "Error: No PR number provided and current branch has no associated PR"
exit 1
fi
fi
# Get PR info
PR_INFO=$(gh pr view "$PR_NUM" --json title,author,url,files)
PR_TITLE=$(echo "$PR_INFO" | jq -r '.title')
PR_URL=$(echo "$PR_INFO" | jq -r '.url')
# Get list of changed files
FILES=$(echo "$PR_INFO" | jq -r '.files[]? | .path')
```
### Step 2: Map All Review Blocks
Create a structured map of all changes to review:
1. **For each changed file:**
- Get the full diff using `gh pr diff "$PR_NUM" -- "$FILE_PATH"`
- Parse diff into logical sections (functions, classes, imports, etc.)
- Identify the nature of each change (new file, modified function, etc.)
2. **Create review structure:**
```
File 1: path/to/file.py
- Section 1.1: New imports (lines X-Y)
- Section 1.2: Modified function_name() (lines A-B)