## TL;DR
GitHub will not render a diff past its size limit in the browser, but every change is still in the repo. Fetch the PR branch locally with git and review the diff in directory-sized chunks. Start with the file list and stat summary so you know what you are walking before you read it.

```text
Sorry, we could not display the entire diff because it was too large.
```

1. Check out the PR locally. With the GitHub CLI: `gh pr checkout 123`. Expected: the working branch switches to the PR branch; `git status` shows the branch name.
2. List every changed file: `git diff --name-only main...HEAD`. Expected: one file path per line, even when the web tab shows nothing. Use the PR's real base branch in place of main.
3. Get the size summary: `git diff --stat main...HEAD | tail -3`. Expected: a totals line like `142 files changed, 8031 insertions(+)`.
4. Review one directory at a time: `git diff main...HEAD -- path/to/dir`. Expected: only that directory's hunks print.
5. Skip generated noise: `git diff main...HEAD -- . ':!package-lock.json' ':!*.min.js'`. Expected: the diff without lockfiles and minified bundles.
6. If the PR is too big to review in one pass, ask the author to split it into stacked PRs.

## Use this when
- The Files Changed tab shows the diff-too-large notice
- The tab is empty or partial on a PR with a huge diff
- An agent needs the full diff that the web UI refuses to render

## Not for this skill when
- The tab loads but stops listing files at 3000 (that is the file-count cap, a different limit)
- The PR really has no changes (an empty diff is correct)
- You need GitHub's inline comment UI; this skill gets you the diff content, not the review UI

## Variant phrasings
- "github PR files changed tab not showing large diff"
- "sorry we could not display the entire diff because it was too large"
- "pull request diff too large to view in browser"
- "files changed empty on huge PR"

## Why it happens
GitHub renders diffs server-side for the web UI and refuses diffs past a line-count threshold to protect page loads. The git objects are all still there; only the web rendering gives up. A local clone applies the same diff with no cap, so the content is always recoverable.

## Edge cases
- The REST diff endpoint has its own cap and returns 406 with `Sorry, the diff exceeded the maximum number of lines (3000)` past it. Use a local clone, not the API, for oversized diffs.
- If `git diff main...HEAD` prints nothing, you are on the wrong base or the PR branch is not checked out. Verify with `git log --oneline -3` and `git branch --show-current`.
- Single huge files (generated bundles, data dumps) can push a small PR over the limit; review those by exclusion and ask the author to stop committing them.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_KONSxN7LIhAl4PvBecgaBQ
