- Home
- Skills
- Code Quality & Review
- AI Diff Audit
AI Diff Audit
Catch AI diff cheats before commit or PR. Read-only Git diff auditor that flags skipped tests, deleted assertions, swallowed errors, leaked secrets, and scope drift.
Free
Works with the AI Agents you already use
AI Diff Audit
Example session with this skill installed
Run a staged audit on my current changes. Ensure I didn't touch anything outside of src/api and that I didn't skip any tests. Use strict mode.
- Read your context and instructions
- Compiled the ai diff audit
I have completed the audit of your staged changes. No critical cheats were detected, and the changes are confined to the allowed directory.
AI DIFF AUDIT RECEIPT
| Metric | Value |
|---|---|
| Audit Scope | --staged |
| Files Changed | 3 |
| Lines Added/Removed | +42 / -12 |
| Assertion Delta | +8 (No deletions) |
| Critical Findings | 0 |
| Warnings | 0 |
Audit Log
[PASS]Scope check: All changes withinsrc/api.[PASS]Test integrity: No@pytest.mark.skiporit.skipdetected.[PASS]Error handling: Noexcept: passorempty catchblocks found.[PASS]Suppressions: No# type: ignoreoreslint-disableadded.
Next steps
- Proceed with
git commitas the diff is clean and verified. - Include this receipt in your Pull Request description for the human reviewer.
- Run with
--base mainbefore the final merge to verify the full branch history.
Connects securely to your tools. The creator never sees your data.
About this skill
When AI coding agents hit a stubborn test or type error, they sometimes optimize for exit code 0 instead of fixing the bug — adding @pytest.mark.skip, deleting assertions, stuffing || true or except: pass, silencing linters, or editing unrelated lockfiles and CI workflows.
AI Diff Audit is a zero-dependency, strictly read-only Git diff auditor (pure Python 3 stdlib + Bash) for Claude Code, Cursor, Codex, and Copilot. It inspects only the changed lines in your diff (never noisy legacy code) and outputs a deterministic PR Verification Receipt:
- Catch test cheating (
CRITICAL): Flags newly added@pytest.mark.skip,xfail,it.skip,t.Skip,#[ignore], and net-deleted assertions (assert,expect,assert_eq!) in test files. - Catch error & exit-code masking (
CRITICAL): Flags added|| true,; true,set +e, inline/multi-lineexcept: pass, and emptycatch {}blocks. - Catch silenced checks (
WARNING): Flags newly added# type: ignore,# noqa,// @ts-ignore,eslint-disable, and#[allow(...)]. - Catch secrets, conflicts & residue: Redacts and flags leaked API keys (
sk-,ghp_,AKIA, DB URIs, private keys), unresolved<<<<<<<markers, hidden CRLF endings, andbreakpoint()/console.log()leftovers. - Enforce blast radius & scope (
--allow-path): Fails if the agent edits files outside allowed directories, and warns on oversized diffs or unexpected edits to CI workflows, Dockerfiles, migrations, or lockfiles.
Works on --working, --staged, --base main, or piped unified diffs (--diff-file -), with --strict and --json modes for CI.
100% free & MIT open-source.
More daily verified shell receipts & companion guards (AI Verify Guards): https://harveyi.com · https://x.com/lxy71 · https://github.com/haiwei971-ui
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Scans only modified lines in the diff, not the entire repository context. Requires Python 3 and Git to be available in the execution environment.
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 buying a skill.
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
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed today
- Free with an Agensi account
- Software
Git
Python 3
Permissions
Read-only local git diff; no network access.