Fetches and displays GitHub pull request diffs with line-number annotation for easier code review.
Install
mkdir -p .claude/skills/fetch-diff && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4478" && unzip -o skill.zip -d .claude/skills/fetch-diff && rm skill.zipInstalls to .claude/skills/fetch-diff
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Fetch PR diff with filtering and line numbers for code review.Key capabilities
- →Fetch a pull request diff from GitHub
- →Add line numbers to the diff for review
- →Filter diffs by file patterns
- →Mask diffs for auto-generated files
- →Mask diffs for deleted files
How it works
The skill fetches a pull request diff, annotates lines with numbers, and applies filtering based on provided file patterns, masking auto-generated or deleted files.
Inputs & outputs
When to use fetch-diff
- →Review PR diffs in terminal
- →Filter PR changes by file type
- →Add review comments with line numbers
About this skill
Fetch PR Diff
Fetches a pull request diff and adds line numbers for easier review comment placement. Auto-generated files are shown with masked diffs.
Usage
uv run --package skills skills fetch-diff <pr_url> [--files <pattern> ...]
Examples:
# Fetch the full diff
uv run --package skills skills fetch-diff https://github.com/mlflow/mlflow/pull/123
# Fetch only Python files
uv run --package skills skills fetch-diff https://github.com/mlflow/mlflow/pull/123 --files '*.py'
# Fetch only frontend files
uv run --package skills skills fetch-diff https://github.com/mlflow/mlflow/pull/123 --files 'mlflow/server/js/*'
# Multiple patterns
uv run --package skills skills fetch-diff https://github.com/mlflow/mlflow/pull/123 --files '*.py' '*.ts'
Token is auto-detected from GH_TOKEN env var or gh auth token.
Output Example
Regular file:
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:
Auto-generated file (masked):
diff --git a/uv.lock b/uv.lock
index abc123..def456 100644
--- a/uv.lock
+++ b/uv.lock
[Auto-generated file - diff masked]
Deleted file (masked):
diff --git a/path/to/removed.py b/dev/null
index abc123..0000000 100644
--- a/path/to/removed.py
+++ /dev/null
[Deleted file - diff masked]
Each line is annotated as old_line new_line | <marker> content:
-marker (left number only) -> deleted line,side=LEFT,line=old_line+marker (right number only) -> added line,side=RIGHT,line=new_line- No marker (both numbers) -> unchanged line,
side=RIGHT,line=new_line
Prerequisites
How it compares
This skill automates the process of fetching, formatting, and filtering PR diffs with line numbers, which is more efficient than manually reviewing raw diff outputs.
Compared to similar skills
fetch-diff side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| fetch-diff (this skill) | 1 | 3mo | Review | Beginner |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| git-commits | 21 | 4mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by mlflow
View all by mlflow →You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
git-commits
bonny
Create well-structured git commits in logical chunks following best practices
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
github-multi-repo
ruvnet
Multi-repository coordination, synchronization, and architecture management with AI swarm orchestration
git-workflow-enforcer
CrazyDubya
Ensures commits follow conventional commits, branch naming conventions, and PR templates. Use when creating commits, branches, or PRs, or when user mentions git workflow.