Fetch Diff

Get clean PR diffs with line numbers for precise code reviews

✨ The solution you've been looking for

Verified
Tested and verified by our team
23684 Stars

Fetch PR diff with filtering and line numbers for code review.

code-review pull-request diff github automation line-numbers filtering
Repository

See It In Action

Interactive preview & real-world examples

Live Demo
Skill Demo Animation

AI Conversation Simulator

See how users interact with this skill

User Prompt

I need to review this PR: https://github.com/mlflow/mlflow/pull/123. Can you fetch the diff with line numbers so I can provide specific feedback?

Skill Processing

Analyzing request...

Agent Response

A filtered diff output with line numbers on both sides, excluding auto-generated files, ready for detailed review

Quick Start (3 Steps)

Get up and running in minutes

1

Install

claude-code skill install fetch-diff

claude-code skill install fetch-diff
2

Config

3

First Trigger

@fetch-diff help

Commands

CommandDescriptionRequired Args
@fetch-diff code-review-preparationFetch a clean diff of a pull request with line numbers to facilitate detailed code review and comment placementNone
@fetch-diff change-analysisAnalyze changes in a pull request by getting a clean view of what was modified, added, or removedNone

Typical Use Cases

Code Review Preparation

Fetch a clean diff of a pull request with line numbers to facilitate detailed code review and comment placement

Change Analysis

Analyze changes in a pull request by getting a clean view of what was modified, added, or removed

Overview

Fetch PR Diff

Fetches a pull request diff, filters out auto-generated files, and adds line numbers for easier review comment placement.

Usage

1uv run skills fetch-diff <pr_url>

Example:

1uv run skills fetch-diff https://github.com/mlflow/mlflow/pull/123

Token is auto-detected from GH_TOKEN env var or gh auth token.

Output Example

diff --git a/path/to/file.py b/path/to/file.py
index abc123..def456 100644
--- a/path/to/file.py
+++ b/path/to/file.py
@@ -10,7 +10,7 @@
10    10 |  import os
11    11 |  import sys
12    12 |  from typing import Optional
13       | -from old_module import OldClass
      14 | +from new_module import NewClass
14    15 |
15    16 |  def process_data(input_file: str) -> dict:

What Users Are Saying

Real feedback from the community

Environment Matrix

Dependencies

uv (Python package manager)
GitHub token (GH_TOKEN env var or gh CLI auth)

Context Window

Token Usage ~1K-10K+ tokens depending on PR size

Security & Privacy

Information

Author
mlflow
Updated
2026-01-30
Category
automation-tools