review-pr-diff
When this skill is the preferred path
Raw git diff output is dominated by bytes the reviewer doesn't care
about: lockfile hash bumps, formatter churn, generated files, vendored
updates. Those hunks drown out the actual logic changes. Compressing
the diff first lets you spend your reasoning budget on what matters.
How to use it
Orient first — call git diff --stat <base>..HEAD to see
file-level scope without loading content. Ask the user for the
base branch if ambiguous (usually main or master).
Fetch the full diff — git diff <base>..HEAD.
Strip known noise before compression. Excluded paths:
- Lockfiles:
package-lock.json, yarn.lock, pnpm-lock.yaml,
Cargo.lock, poetry.lock, Gemfile.lock, composer.lock
- Generated:
*.generated.ts, *.pb.go, *.min.js, *.min.css
- Vendored:
vendor/**, node_modules/**, dist/**, build/**
- Binary / non-text hunks
Call gotcontext's compress_codebase MCP tool with the remaining
file set at fidelity=detailed. For a diff spanning ≤20 files on a
well-understood codebase, gc_blast_radius gives you a tighter
ranked context — pass the changed files + the PR's focus symbol
(e.g. the primary function name or class) and it returns only the
touched code plus what transitively calls into it (Pro+ only).
For a lighter "who calls this changed function?" question without
the full transitive graph, prefer gc_callers (Pro+ only).
It returns call sites + likely impacted test files for a symbol,
at lower cost than a full blast-radius run:
{
"name": "gc_callers",
"arguments": {
"files": [
{"path": "api/app/services/compression.py", "content": "..."}
],
"focus_symbol": "compress"
}
}
Use the returned impacted_tests list to target your test review —
if the PR's diff doesn't cover those test files, flag as a risk.
The required input schema for gc_blast_radius is:
{
"name": "gc_blast_radius",
"arguments": {
"files": [
{"path": "api/app/main.py", "content": "...file contents..."},
{"path": "api/app/services/compression.py", "content": "..."}
],
"focus_symbol": "compress",
"top_k": 50
}
}
files must be an array of {path, content} objects — not an array
of path strings, and not a "changed_files" key. Both path and content
are required for every entry.
Present the review in this structure:
- Summary — 2-3 bullets on what the PR does
- Logic changes — grouped by file/area, with line refs
- Risk flags — auth, crypto, migrations, webhooks, cron,
billing, RBAC, SQL string-building, env var handling
- Skipped — the list of noise files excluded, so the reviewer
knows they weren't forgotten
When the raw read is actually fine
- Trivially small diffs (<50 lines). Read them directly.
- You're being asked to WRITE the patch — this skill reviews, not
authors.
Why this matters
The skipped-files list is critical. If a reviewer misses a malicious
package-lock.json change because you silently excluded it, that's
worse than not using the skill at all. Always surface what was dropped.
See references/risk-taxonomy.md for the full list of risk flags to
watch for.
1---2name: review-pr-diff3description: Compresses a git diff before review so noise (lockfile bumps, generated files, whitespace churn) doesn't crowd out the actual logic changes. Use this skill whenever the user asks you to review a pull request, explain a diff, summarize changes, or comment on recent commits. Trigger phrases include "review this PR", "what changed", "explain this diff", "summarize the changes", "look at my diff", "check this branch against main". Uses gotcontext's code-aware compression at fidelity=detailed — detailed because a character dropped in a security fix matters more than a character dropped in prose.4---56# review-pr-diff78## When this skill is the preferred path910Raw `git diff` output is dominated by bytes the reviewer doesn't care11about: lockfile hash bumps, formatter churn, generated files, vendored12updates. Those hunks drown out the actual logic changes. Compressing13the diff first lets you spend your reasoning budget on what matters.1415## How to use it16171. Orient first — call `git diff --stat <base>..HEAD` to see18 file-level scope without loading content. Ask the user for the19 base branch if ambiguous (usually `main` or `master`).202. Fetch the full diff — `git diff <base>..HEAD`.213. Strip known noise before compression. Excluded paths:22 - Lockfiles: `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`,23 `Cargo.lock`, `poetry.lock`, `Gemfile.lock`, `composer.lock`24 - Generated: `*.generated.ts`, `*.pb.go`, `*.min.js`, `*.min.css`25 - Vendored: `vendor/**`, `node_modules/**`, `dist/**`, `build/**`26 - Binary / non-text hunks274. Call gotcontext's `compress_codebase` MCP tool with the remaining28 file set at `fidelity=detailed`. For a diff spanning ≤20 files on a29 well-understood codebase, `gc_blast_radius` gives you a tighter30 ranked context — pass the changed files + the PR's focus symbol31 (e.g. the primary function name or class) and it returns only the32 touched code plus what transitively calls into it (Pro+ only).3334 For a lighter "who calls this changed function?" question without35 the full transitive graph, prefer `gc_callers` (Pro+ only).36 It returns call sites + likely impacted test files for a symbol,37 at lower cost than a full blast-radius run:3839 ```json40 {41 "name": "gc_callers",42 "arguments": {43 "files": [44 {"path": "api/app/services/compression.py", "content": "..."}45 ],46 "focus_symbol": "compress"47 }48 }49 ```5051 Use the returned impacted_tests list to target your test review —52 if the PR's diff doesn't cover those test files, flag as a risk.5354 The required input schema for `gc_blast_radius` is:5556 ```json57 {58 "name": "gc_blast_radius",59 "arguments": {60 "files": [61 {"path": "api/app/main.py", "content": "...file contents..."},62 {"path": "api/app/services/compression.py", "content": "..."}63 ],64 "focus_symbol": "compress",65 "top_k": 5066 }67 }68 ```6970 `files` must be an array of `{path, content}` objects — not an array71 of path strings, and not a "changed_files" key. Both path and content72 are required for every entry.735. Present the review in this structure:74 - **Summary** — 2-3 bullets on what the PR does75 - **Logic changes** — grouped by file/area, with line refs76 - **Risk flags** — auth, crypto, migrations, webhooks, cron,77 billing, RBAC, SQL string-building, env var handling78 - **Skipped** — the list of noise files excluded, so the reviewer79 knows they weren't forgotten8081## When the raw read is actually fine8283- Trivially small diffs (<50 lines). Read them directly.84- You're being asked to WRITE the patch — this skill reviews, not85 authors.8687## Why this matters8889The skipped-files list is critical. If a reviewer misses a malicious90`package-lock.json` change because you silently excluded it, that's91worse than not using the skill at all. Always surface what was dropped.9293See `references/risk-taxonomy.md` for the full list of risk flags to94watch for.