Skip to main content

review-pr-diff

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.

来源信息

仓库
oimiragieo/gotcontext-plugin
最近来源活动
2026年6月17日 14:22
检测到的 SKILL.md 语言
英语
星标
0
Forks
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
review-pr-diff
description
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.
version
1.1.0
# 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 1. 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`). 2. Fetch the full diff — `git diff <base>..HEAD`. 3. 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 4. 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: ```json { "name": "gc_callers", "arguments": { "files": [ {"path": "src/services/orders.py", "content": "..."} ], "focus_symbol": "process_order" } } ``` 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: ```json { "name": "gc_blast_radius", "arguments": { "files": [ {"path": "src/server/main.py", "content": "...file contents..."}, {"path": "src/services/orders.py", "content": "..."} ], "focus_symbol": "process_order", "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. 5. 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.
在 GitHub 查看