dceoy/github-cli-agent-skills · Archived

gh-pr-diff

View the diff of a GitHub pull request using gh CLI to see code changes.

First seen Jun 16, 2026

Installation

$ npx skills add dceoy/github-cli-agent-skills --skill gh-pr-diff

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from dceoy/github-cli-agent-skills.

npx skills add dceoy/github-cli-agent-skills

Browse all from dceoy/github-cli-agent-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

License LICENSE
Default branch main
Open issues 1
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash, Read, Grep

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,922 B
  • docs SUMMARY.md 90 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

GitHub PR Diff

When to use

  • The user asks to see what changed in a PR.
  • Reviewing code changes before merge.
  • Getting a list of files changed in a PR.

Inputs to confirm

  • PR number, URL, or branch name (or current branch PR).
  • Output format (full diff, name-only, patch).
  • Target repo if not current (--repo OWNER/REPO).

Workflow

  1. Verify auth:

``bash gh --version gh auth status ``

  1. View the diff:

```bash # Full diff gh pr diff 123

# List changed files only gh pr diff 123 --name-only

# Patch format gh pr diff 123 --patch ```

  1. Control color output:

``bash gh pr diff 123 --color always gh pr diff 123 --color never | less ``

  1. Open in browser for visual diff:

``bash gh pr diff 123 --web ``

Examples

# View diff of current branch's PR
gh pr diff

# See only file names changed
gh pr diff 123 --name-only

# Get patch format for applying elsewhere
gh pr diff 123 --patch > changes.patch

# Pipe to less for large diffs
gh pr diff 123 --color always | less -R

Flags reference

Flag Description
--color Color output: always, never, auto (default: auto)
--name-only Show only names of changed files
--patch Display diff in patch format
-w, --web Open diff in browser

Notes

  • Without arguments, shows diff for current branch's PR.
  • Use --name-only for quick overview of scope.
  • Patch format is useful for cherry-picking or backup.

References