fetch-diff

Fetch GitHub PR diffs with line numbers and filtered files.

1|6|Updated Mar 28, 2025
One-click install
npx skills add https://github.com/mlflow/dev --skill fetch-diff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fetch-diff
Source: https://github.com/mlflow/dev/tree/main/.claude/skills/fetch-diff
Command: npx skills add https://github.com/mlflow/dev --skill fetch-diff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill fetches a pull request diff, filters out auto-generated files, and adds line numbers to facilitate precise review comments.

Core Features & Use Cases

  • Diff retrieval: Retrieve unified diffs for a given PR URL.
  • Noise reduction: Excludes auto-generated or irrelevant files to focus on meaningful changes.
  • Line-numbered reviews: Includes line numbers to support targeted code reviews and comment placement.
  • Use Case: When reviewing a PR with multiple commits, you can fetch a clean, line-numbered diff to quickly identify and annotate changes.

Quick Start

uv run skills fetch-diff <pr_url>

Frequently Asked Questions about fetch-diff

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

FAQPage Schema
How do I fetch a GitHub PR diff with line numbers for code review?

You can fetch a GitHub pull request diff with line numbers by running the fetch-diff command with a PR URL. It retrieves the unified diff and formats it with line numbers to support targeted code reviews.

How do I filter auto-generated files from a pull request diff?

To filter auto-generated files from a pull request diff, the Skill automatically excludes noisy and irrelevant files during retrieval. This noise reduction ensures you only review meaningful code changes.

Do I need GitHub CLI installed to retrieve pull request diffs?

Yes, retrieving pull request diffs requires the GitHub CLI (gh) and Bash. Authentication is handled automatically via the GH_TOKEN environment variable or the gh auth token command.

Can I use this to review diffs across multiple GitHub repositories?

Yes, this Skill applies to code-review workflows across repositories. By providing any valid GitHub PR URL, it retrieves the diff and adds line numbers for efficient inline feedback.

What is the best way to get a clean diff for inline code review comments?

The best way to get a clean diff for inline comments is using this Skill to fetch a PR diff, which filters out auto-generated files and adds line numbers to facilitate precise review comment placement.

Why are line numbers important when reviewing a GitHub pull request?

Line numbers are important when reviewing a GitHub pull request because they support targeted code reviews and precise comment placement. The Skill includes these numbers to enable focused inline feedback.