Skip to content
ModshelfSubmit

Diff Review

Review a pull request in a side pane and send your line comments as a pending review

Workflow and CISide paneSlash commandTool for ClaudePop-up notesWrites or runs
Diff Review running in Claude Code

Recorded on Claude Code 2.1.287 in a sandbox. Claude's replies are scripted, and gitHub's answers are stubbed with a made-up pull request; everything the mod draws is real.

What it does

/diff-review 2148 opens that pull request's diff in a pane beside the conversation, GitHub style: one card per file, added lines in green, removed in red, each line with its number. Pick a line and type a comment, and it sits under the line in a box until you send it. Claude can add draft comments too, which you keep, edit or delete. When you're done, one command posts everything as a pending review that you submit on GitHub yourself.

How to use it

  • /diff-review 2148, a PR URL or owner/repo#2148 reviews a pull request without checking it out. /diff-review on its own reviews your current branch against its base.
  • In the pane, Tab and the arrow keys move between buttons and line numbers. Press Enter on a line number, Tab into the field, type your comment and press Enter. A second line number in the same file makes it a range.
  • ctrl+↑ and ctrl+↓ jump between comments.
  • /diff-review claude asks Claude for a risk analysis (low-risk files start collapsed), runs your review skill (/code-review low unless you change it in /config), then has Claude add one draft comment per finding. /diff-review risk runs only the risk analysis.
  • /diff-review send creates the pending review. /diff-review close closes the pane.
  • /diff-review note <text> stores a preference for future reviews in this repository, and /diff-review memory shows what it has learned.

Good to know

  • It runs git and gh with fixed arguments. Reviewing a PR from the repository you're in fetches it into a refs/remotes/diff-review/pr-<n> ref; your branch and working tree aren't touched.
  • The only thing it writes to GitHub is the pending review, and only when you send. Nothing is approved or submitted for you.
  • It remembers which of Claude's drafts you deleted or rewrote, per repository, and adds that to the next review prompt.
  • It's version 0.1. The author notes that sending has only been unit tested, so try your first send on a PR where a stray pending review does no harm.