link-diff

Fetch code diffs from GitHub and GitLab pull request and commit URLs.

1|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/sltc-dev/core-foundry --skill link-diff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-diff
Source: https://github.com/sltc-dev/core-foundry/tree/main/skills/coding/link-diff
Command: npx skills add https://github.com/sltc-dev/core-foundry --skill link-diff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the retrieval of code changes (diffs) directly from GitHub or GitLab pull request and commit links, streamlining code review and analysis.

Core Features & Use Cases

  • URL Parsing: Accurately identifies and parses GitHub and GitLab links for PRs and commits.
  • Diff Generation: Constructs the correct .diff URL to fetch the raw code changes.
  • Content Retrieval: Utilizes tools to read the content from the generated diff URL or falls back to curl if necessary.
  • Use Case: When reviewing a colleague's code, provide a PR link, and the Skill will fetch the exact code changes for you to analyze.

Quick Start

Fetch the diff content for the GitHub commit link https://github.com/owner/repo/commit/abcdef123456.

Frequently Asked Questions about link-diff

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

FAQPage Schema
How do I fetch a code diff from a GitHub pull request link?

To fetch a code diff from a GitHub pull request, the Skill parses the provided PR URL, automatically transforms it into the corresponding `.diff` format, and retrieves the raw code changes for review.

Can I get diffs from GitLab merge requests and commits?

Yes, you can get diffs from GitLab merge requests and commits. The Skill intelligently handles both GitHub and GitLab platforms by converting input URLs into their respective `.diff` or `.patch` formats to fetch content.

What is the best way to retrieve raw code changes for review?

The best way to retrieve raw code changes for review is to provide the commit or pull request URL directly. The Skill constructs the correct diff URL and fetches the content using web request tools or falls back to `curl`.

Do I need to install any dependencies to extract diffs from URLs?

No, you do not need to install any dependencies to extract diffs from URLs. The Skill operates independently without requiring external components, utilizing built-in web request tools to retrieve the patch content.

Does this tool work with both patch and diff file formats?

Yes, the tool works with both patch and diff file formats. It intelligently transforms input pull request and commit URLs into their corresponding `.diff` or `.patch` formats before fetching the raw file content.

Why does the diff fetch fail for some Git commit links?

A diff fetch may fail for Git commit links if the URL is malformed or private. The Skill attempts standard web request tools to read the generated diff URL and falls back to `curl` to retrieve the code changes if initial retrieval fails.