pr-guide turns a big pull request into chapters you can actually review.
Free and open source. Bring your own Claude API key.
From a wall of files to a reviewed PR. Try the real guide yourself, the one the Action wrote for this demo PR.
Reviewing starts with a wall of files in alphabetical order. pr-guide reads the diff and gives you a story instead: what changed, in what order to read it, and where to look hard.
Chapters by intent, not by file Related hunks are grouped by what they do and ordered so each chapter builds on the last. Tests stay next to the code they cover.
It tells you what to check Each chapter says why the change exists, where to start reading, and the specific things worth verifying, riskiest first. On this PR, it caught an API-key bypass in the new rate limiter.
See the flow before the code A before/after diagram traces a request through the change, with each step tagged by the chapter that introduces it.
Set up
Two ways to use it. Add it to a repo so every pull request gets a guide, or run it yourself from Claude Code on any PR.
-
Tell us your repo
Optional. The commands and links below fill in with it.
Repository and default branch, for exampleacme/apiandmain. -
Add your Claude API key as a secret
Create a key at console.anthropic.com (it starts with
sk-ant-api). Usage is billed to that account, separately from any Claude subscription.gh secret set ANTHROPIC_API_KEY --repo owner/repoOr in the browser: Open the secrets page -
Add the workflow
One click opens GitHub with the file already written. Commit it to your default branch.
name: PR guide on: pull_request: types: [opened, ready_for_review, synchronize] # One guide per PR at a time; a new push cancels the run for the old commit. concurrency: group: pr-guide-${{ github.event.pull_request.number }} cancel-in-progress: true permissions: contents: read pull-requests: write jobs: guide: if: ${{ !github.event.pull_request.draft }} runs-on: ubuntu-latest steps: - uses: giovannivitale4722/pr-guide@v1 with: anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}Saved as
.github/workflows/pr-guide.yml. -
Open a pull request
The guide arrives as a comment in about a minute, with a link to the interactive page. Draft PRs wait until they're marked ready.
Options
| Input | Default | What it does |
|---|---|---|
model | claude-opus-5-5 | Model that groups the diff into chapters. |
effort | medium | Grouping effort, low to max. The main speed lever. |
explain-model | same as model | Writes chapter explanations on larger PRs. claude-sonnet-5-5 is faster. |
explain-effort | low | Effort for chapter explanations. |
speed | standard | fast uses Opus fast mode: faster output at 2x price. |
comment | true | false skips the PR comment and only uploads the page. |
-
Install the plugin
Run these inside Claude Code. You'll need Node 18 or later and the GitHub CLI signed in (
gh auth login)./plugin marketplace add giovannivitale4722/pr-guide /plugin install pr-guide@pr-guide -
Ask for a guide
Pass a PR number, a URL, or
owner/repo#123. With nothing, it uses the current branch's PR. Plain words work too: “walk me through PR 123”./pr-guide:pr-guide 123 -
Read it, and share it if you like
Claude writes the chapters in your session and gives you the interactive page. It offers to post the summary as a PR comment, and only posts if you say yes.
Uses your Claude Code session, so there's no separate API key.
How it works
Grounded in research on splitting tangled changes and ordering code for review. Read the write-up.
- FetchSplit the diff into hunks and index which names each hunk defines and uses.
- GroupClaude puts hunks into chapters by intent, definitions before uses, riskier first.
- CheckCode, not a model, verifies coverage, chapter size and test placement.
- ExplainLarger PRs get each chapter written in parallel, so it stays fast.
- RenderThe PR comment plus the interactive page, with every hunk placed once.
Questions
Is this a code review?
No. It explains what the PR does and points at what deserves a careful look. Code the guide doesn't mention isn't verified, so a person still reviews.
What does it cost?
pr-guide is free. The Action calls the Claude API with your key: one call for small PRs, and one grouping call plus one per chapter for larger ones. Each run saves its token counts in run.json. The Claude Code skill runs in your existing session.
Where does my code go?
The diff is sent to the Claude API with your key. The guide page is stored as a workflow artifact in your repo, so only people who can read the repo can open it, and it expires with your artifacts (90 days by default).
Does it run on pull requests from forks?
Not by default. GitHub doesn't give fork PRs access to repository secrets, so the Action has no API key to use. You can still run the Claude Code skill on any PR you can read.
What about huge PRs?
Large diffs are clipped per hunk to fit, and the model is told which hunks were clipped. Lockfiles and snapshots go into a separate "Generated files" chapter.