Back to Skills

fetch-diff

verified

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

View on GitHub

Repository

mlflow/mlflow
23.8kstars

.claude/skills/fetch-diff/SKILL.md

Last Verified

January 25, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/mlflow/mlflow/blob/5824de39800ab7dc654b6394f5c800b5d63c0034/.claude/skills/fetch-diff/SKILL.md -a claude-code --skill fetch-diff

Installation paths:

Claude
.claude/skills/fetch-diff/
Powered by add-skill CLI

Instructions

# Fetch PR Diff

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

## Usage

```bash
uv run skills fetch-diff <pr_url>
```

Example:

```bash
uv 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:
```

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
718 chars
fetch-diff | Claude Skills