- Home
- Skills
- Testing & Debugging
- diff risk quality gate
More screenshots
Works with the AI Agents you already use
diff risk quality gate
Gate AI-written diffs before merge: skipped or weakened tests, swallowed errors, secrets, CI bypasses. Risk score + CI exit code.
$11
diff risk quality gate
Example session with this skill installed
Claude Code just refactored our invoice total. Here's git diff main...HEAD. Is it safe to merge?
- Read your context and instructions
- Compiled the diff risk quality
Answer: No, BLOCK (risk 100/100). 6 HIGH findings, including a live-looking Stripe key and a test that was skipped and emptied.
- HIGH weaken
tests/test_invoice.py: assertions removed −2 +0 - HIGH tautology
tests/test_invoice.py:6:assert True - HIGH skip
tests/test_invoice.py:4:@pytest.mark.skip(reason="flaky after refactor") - HIGH swallow
src/billing/invoice.py:15:except Exception: passhides bad line items
HIGH secret src/billing/invoice.py:21: STRIPE_API_KEY = "sk-live…".
Rotate it; deleting it isn't enough once it's committed
- HIGH cibypass
.github/workflows/ci.yml:continue-on-error: trueon pytest - MEDIUM: new
refunds.pyhas no test,verify=False, debugprint,# type: ignore, lockfile changed without package.json. LOW: TODO added
Deliverables: terminal report, gate.md (PR comment), gate.json.
Next steps: restore the two assertions and remove the skip, re-raise or log the exception, move the key to config and rotate it, revert the CI change, add tests/test_refunds.py, then re-run until PASS.
(Real run on the bundled sample diff.)
Connects securely to your tools. The creator never sees your data.
About this skill
Catch the corners coding agents cut, before they reach main.
Point it at a unified diff (git diff main...HEAD > change.diff, or a GitHub PR .diff). It returns a risk score, a PASS / WARN / BLOCK verdict, an exit code for CI, and every finding with file:line:
Test integrity
- source changed with no test changes; new files with no matching test
- deleted, skipped or
.onlytests (pytest, Jest/Vitest, Mocha, Go, JUnit) - assertions removed, and tautologies like
assert True
Shortcuts
- swallowed exceptions (
except: pass, emptycatch {}) - silenced linters and type checks (
eslint-disable,noqa,@ts-ignore,type: ignore,nolint) anytypes, debug prints, TODO/FIXME left behind,verify=False/ TLS checks off
Supply chain and CI
- hardcoded secrets (OpenAI/Stripe-style keys, AWS AKIA, GitHub tokens, private keys)
- lockfile changed without its manifest
- CI made non-blocking (
continue-on-error,allow_failure,|| true,--no-verify) - hunks too big to review
Same input, same answer every time: it's a script, not a vibe check. Add it as a CI step or run it before every agent commit. --allow mutes rules your team accepts; --md writes a paste-ready PR comment.
What's included
SKILL.md, scripts/diffgate.py, rule reference, a bad agent diff and a clean diff, sources (git, GitHub, OWASP LLM Top 10), tests.
- Pattern-based: it finds risky changes, not logic bugs. Pair it with real tests and a human reviewer.
- Secret detection covers common key formats only. Use a dedicated secret scanner for full coverage.
- Works on the diff only, so it can't see tests that already cover changed code.
- Binary diffs are ignored.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 26 days ago
Requires
Permissions
File Scopes
Fully offline. Scripts never import networking or subprocess modules, never read environment variables and never use eval/exec. It reads a diff file you create; it never runs git or touches the repository.