技能潮 SkillTide 提交收录
官方说明7 个来源MCP 服务8 天前
srbsa/diffgate

srbsa/diffgate

Deterministic guardrail for AI-written diffs: AST
在 GitHub 查看 ↗直链 · 无中转页
配置模板(请按你的客户端调整)
claude mcp add diffgate -- npx -y diffgate
这是根据仓库名生成的可粘贴骨架,命令行参数与包名请以该项目 README 为准。
★ 数取值
5 ★ · srbsa/diffgate · 取自 GitHub 搜索 API · (2026-10-16 20:00:20 核对)
来源明细
收录自 punkpeye/awesome-mcp-servers 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
收录与活跃
收录于 2026-10-09 · 最近见到 2026-10-16 · 共见到 32 次 · 被 7 个来源列出
评分构成
综合分 703 · 5 ★ · 7 个来源 · mcp
常见问题(答案都来自我们的记录)
怎么安装?
我们【没有】从该仓库取到安装命令(我们的 install 覆盖率只有约 4%)。请看它的 README 或 releases 页。
它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库 srbsa/diffgate;我们收录于 2026-10-09;最近见到 2026-10-16。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

DiffGate

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

**A deterministic guardrail your coding agent runs on itself — before the code reaches your disk.**
Every other check fires too late. A review bot needs a PR. A pre-commit hook runs after the agent has finished and moved on. DiffGate is an **agent hook**: your agent calls it over MCP, gets back structured findings in milliseconds for **zero LLM tokens**, and fixes the problem while it still has the context — then the *same engine, same verdict* runs in your editor, your pre-commit hook, and CI. Not a model grading its own homework: the same input always produces the same answer.
It stays quiet by construction. It grades **only the lines that changed** (🟢 merge · 🟡 glance · 🟠 verify), runs your tests only when a change earns it, and blocks only when it's earned — **0 false blocks** on a public, versioned corpus you can rerun yourself with diffgate bench (BENCHMARK.md). Everyone claims low noise; this one ships the corpus.
Why this catches things a scanner doesn't — we measured what agents actually get wrong
Across local and frontier models: **0%** classic OWASP bugs (SQL injection, XSS, hardcoded secrets) in code written from scratch. But the same frontier model that wrote flawless greenfield code reintroduced security footguns in **13% of edits** — an unguarded recursive merge (prototype pollution), a bare cors() (any origin), a path built from request data with no containment check. Editing existing code is most of what an agent does, and the residue lives in the diff, not in the textbook. Rerun it yourself with diffgate marginal. The measurement →
The same shift shows up in third-party maintainability data: GitClear's 2026 analysis finds block duplication up **81%** since 2023 (40.3 → 73.0 per million changed lines) and cross-file function connectivity down **35%** — agents reinvent code rather than reuse it. That's what the reinvented-helper rule is for (docs/STRUCTURAL-RULES.md).
| Tier | Meaning | What you do | Examples |
|------|---------|-------------|----------|
| 🟢 **Green** | Safe / self-contained | merge freely | comments, local logging |
| 🟡 **Yellow** | Review (soft dependency) | take a look | deprecated APIs, raw SQL, network calls, dependency edits |
| 🟠 **Orange** | High-impact, gate it | verify before merge | schema/migrations, hardcoded secrets, auth/crypto, public-API changes, injection sinks |
---
Why an agent hook, not another review bot
Every check in the pipeline fires after the code exists, and each one is later than the last:
| | Fires when | Problem |
|---|---|---|
| Review bot (CodeRabbit, Greptile) | a PR exists | the code is finished, defended, and someone is waiting on it |
| Pre-commit hook | you're done and committing | the agent has moved on; you're re-loading context to fix it |
| **DiffGate over MCP** | **the agent is still writing** | it fixes its own output before the code lands |
Being early is not the only thing that matters, though — it has to be *quiet*, or the agent learns to ignore it. Review bots comment after the PR exists; linters and scanners flag everything they see. Neither guarantees the risky line gets discussed: we scanned 350 merged AI-assisted PRs — of the 109 with flagged AI-attributed changes, only **3** drew public discussion from any human besides the author. DiffGate **decides what deserves your attention, your tests, or a block**, and stays quiet otherwise. That's the whole product:
- **Diff-scoped.** Findings report only on the lines that changed, against the committed baseline — no whole-file noise, no re-litigating code you didn't touch.
- **Tiered triage, not a flat list.** Three tiers route attention: green merges, yellow is a glance, orange is gated.
- **The gate runs *your* tests — selectively.** On an orange change, DiffGate runs your testCommand and shows the real exit code and output. Green and yellow pass instantly. The pre-commit hook is fast because tests fire only when a change is genuinely high-impact.
- **Earns the right to block.** Broad cross-language injection findings stay advisory on their own; they escalate to a blocking finding **only when the optional code graph proves the sink is reachable from an untrusted entry point** (an HTTP/event handler). Recall from the rules, the right to block from the graph.
来源
awesome · https://github.com/srbsa/diffgate
按领域浏览
MCP 服务
Traction
5 ★
收录于
昨天

更多MCP 服务

查看MCP 服务全部 5,525 条 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引