pr-diff

Generate a three-dot diff with merge-base logic and structured Markdown summaries.

1|Updated Jul 31, 2023
One-click install
npx skills add https://github.com/austintheriot/dotfiles --skill pr-diff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-diff
Source: https://github.com/austintheriot/dotfiles/tree/main/.claude/skills/pr-diff
Command: npx skills add https://github.com/austintheriot/dotfiles --skill pr-diff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Producing a review-ready diff for a long-lived PR is hard because repeated merges pollute git diff output with many irrelevant commits and changes.

Core Features & Use Cases

  • Three-dot diff for true change sets: generates a “only what this branch adds” view by using merge-base logic instead of noisy two-dot comparisons.
  • PR-aware context when available: accepts a PR number, branch name, or git range, then fetches PR metadata (title, author, body, base/head SHAs) when a PR association is found.
  • Reviewer-friendly output controls: applies default exclusion globs to reduce noise (optionally overridable) and truncates very large diffs while still providing a useful excerpt.

Quick Start

Run the pr-diff skill with the PR number you want to review and read the returned structured summary plus the clean diff.

Frequently Asked Questions about pr-diff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get a clean git diff for a pull request that excludes merge noise?

To get a clean git diff for a pull request, compute the merge-base and run a three-dot diff. This isolates only the changes unique to the target branch while excluding irrelevant commits from repeated merges.

What is the best way to review long-lived GitHub pull requests with noisy diffs?

Reviewing long-lived GitHub pull requests is best handled by applying merge-base logic to exclude merge commits, using default exclusion globs to remove noisy paths, and truncating large diffs to stay within a configurable line threshold.

Can I review a GitHub pull request diff using just a PR number or branch name?

You can review a GitHub pull request diff by providing a PR number, branch name, or git range. The tool fetches PR metadata like title, author, and base/head SHAs to enrich the structured Markdown summary.

How does three-dot diff compare to two-dot diff for code review?

A three-dot diff compares from the merge-base of two branches, showing only what the target branch adds, whereas a two-dot diff compares the branch tips directly, often polluting the output with irrelevant commits and merge noise.

How do I truncate large PR diffs to keep the output manageable?

To truncate large PR diffs, apply a configurable line threshold that limits the output to a useful excerpt while still providing a structured Markdown summary with diff stats and affected files.