# PR diff

> PR diff is an open-source agent skill for developer tools. Show a pull request diff plus local changes by running a git helper script. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/richardgill/nix/tree/main/built/ai-agents/ampcode/skills/pr-diff
- **Repository:** https://github.com/richardgill/nix
- **GitHub stars:** 39
- **License:** MIT
- **Skill name:** pr-diff
- **Collection:** https://github.com/richardgill/nix
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill gives the agent a quick way to look at the current pull request diff together with any uncommitted local changes. When invoked, it runs a user-provided shell script at `~/Scripts/git-pr-diff` and places the output into the conversation as context.

The skill is a thin wrapper. It contains no scripts of its own, only a SKILL.md that executes the helper and then appends whatever arguments the user typed. Those arguments can serve as a follow-up instruction, such as asking for a review or a summary of the diff.

It is configured to be invoked manually rather than chosen by the model, and its tool permission is limited to calls of the `git-pr-diff` script. The script must already exist on your machine at that path, since it is not included in the skill folder.

## When your agent uses it

> Show PR diff and local changes

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/richardgill/nix/tree/HEAD/built/ai-agents/ampcode/skills/pr-diff)
- [Asks for: Bash(~/Scripts/git-pr-diff:*)](https://github.com/richardgill/nix/blob/HEAD/built/ai-agents/ampcode/skills/pr-diff/SKILL.md)
- [License: MIT](https://github.com/richardgill/nix/tree/HEAD/built/ai-agents/ampcode/skills/pr-diff)

## Features

- **PR diff injection:** Runs the git-pr-diff script and inserts its output into the agent's context.
- **Local changes included:** Shows the pull request diff together with local changes in the working tree.
- **Argument passthrough:** Appends user-supplied arguments after the diff so they can act as a follow-up instruction.
- **Restricted tool access:** Allows only Bash calls to the ~/Scripts/git-pr-diff script.
- **Manual invocation only:** Model invocation is disabled, so the skill runs only when the user calls it.

## Good for

- Ask the agent to review the current pull request and my uncommitted edits
- Summarize what changed on this branch before opening a PR
- Draft a PR description from the diff
- Check local changes against the PR diff for leftover debug code

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/pr-diff` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/pr-diff &&
cp -R "$tmp/built/ai-agents/ampcode/skills/pr-diff" ~/.claude/skills/pr-diff &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/pr-diff` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/pr-diff` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/pr-diff &&
cp -R "$tmp/built/ai-agents/ampcode/skills/pr-diff" ~/.agents/skills/pr-diff &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/pr-diff` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/pr-diff` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/pr-diff &&
cp -R "$tmp/built/ai-agents/ampcode/skills/pr-diff" ~/.cursor/skills/pr-diff &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/pr-diff` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/richardgill/nix.git --path built/ai-agents/ampcode/skills/pr-diff
```

Or copy the folder to `~/.gemini/skills/pr-diff` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/pr-diff`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/pr-diff &&
cp -R "$tmp/built/ai-agents/ampcode/skills/pr-diff" ~/.copilot/skills/pr-diff &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/pr-diff` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/richardgill/nix.git
```

Then copy `nix/built/ai-agents/ampcode/skills/pr-diff` into your agent's skills folder as `pr-diff`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does PR diff need installed?

A script at ~/Scripts/git-pr-diff. The skill does not include it, so you must provide it yourself.

### Will the agent trigger PR diff automatically?

No. Model invocation is disabled, so you invoke it explicitly.

### Which commands can PR diff run?

Its allowed tools are limited to Bash calls to ~/Scripts/git-pr-diff.

### Can I add instructions after the diff?

Yes. Any arguments you pass are appended after the diff output.

### How do I install PR diff in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/pr-diff to use it in all your projects, or to .claude/skills/pr-diff in one project.

### Does PR diff run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use PR diff?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to PR diff?

The closest alternatives to PR diff are Code review, Make PR easy to review, PR review, PR and Simplify.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Code review](https://ai-powered.com/skills/code-review-flutter): Code review is an open-source agent skill for developer tools.
- [Make PR easy to review](https://ai-powered.com/skills/make-pr-easy-to-review): Make PR easy to review is an open-source agent skill for developer tools.
- [PR review](https://ai-powered.com/skills/pr-review): PR review is an open-source agent skill for developer tools.
- [PR](https://ai-powered.com/skills/pr): PR is an open-source agent skill for developer tools.
- [Simplify](https://ai-powered.com/skills/simplify): Simplify is an open-source agent skill for developer tools.
- [Code reviewer subagent no bash blocked on PR diff](https://ai-powered.com/skills/code-reviewer-subagent-no-bash-blocked-on-pr-diff): Code reviewer subagent no bash blocked on PR diff is an open-source agent skill for developer tools.
- [Diff](https://ai-powered.com/skills/diff-richardgill): Diff is an open-source agent skill for developer tools.
- [Review](https://ai-powered.com/skills/review-handarbeit): Review is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/pr-diff
