Bug: /pr skill uses invalid --stat flag with gh pr diff
Resolved 💬 2 comments Opened Feb 1, 2026 by iheitlager Closed Mar 1, 2026
Description
The built-in /pr skill is using gh pr diff <number> --stat, but the --stat flag does not exist for the gh pr diff command.
Steps to Reproduce
- Run
/prcommand (or invoke the pr skill) - The skill attempts to run
gh pr diff 90 --stat - Command fails with error
Expected Behavior
The command should use a valid flag. Possible alternatives:
gh pr diff <number> --name-only- shows only changed filenames- Use
git diff --statafter checking out the PR branch - Use
gh pr view <number> --json filesto get file information
Actual Behavior
Command fails because --stat is not a recognized flag for gh pr diff.
Valid gh pr diff Flags
According to gh pr diff --help, the available flags are:
--name-only- Display only names of changed files--patch- Display diff in patch format--web- Open in browser--color- Color output
Environment
- Claude Code version: 2.1.27
- OS: macOS (Darwin 24.6.0)
- gh version: $(gh --version | head -1)
Suggested Fix
Replace gh pr diff --stat with either:
gh pr diff --name-only(closest equivalent)- Or checkout the PR and use
git diff --stat
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗