AI Diff Audit

    1

    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

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    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

    MetricValue
    Audit Scope--staged
    Files Changed3
    Lines Added/Removed+42 / -12
    Assertion Delta+8 (No deletions)
    Critical Findings0
    Warnings0

    Audit Log

    • [PASS] Scope check: All changes within src/api.
    • [PASS] Test integrity: No @pytest.mark.skip or it.skip detected.
    • [PASS] Error handling: No except: pass or empty catch blocks found.
    • [PASS] Suppressions: No # type: ignore or eslint-disable added.

    Next steps

    1. Proceed with git commit as the diff is clean and verified.
    2. Include this receipt in your Pull Request description for the human reviewer.
    3. Run with --base main before 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-line except: pass, and empty catch {} 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, and breakpoint() / 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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
    GitPython 3

    Permissions

    Terminal / Shell
    Read Files

    Read-only local git diff; no network access.

    Listedtoday

    What's inside

    Frequently Asked Questions

    AI agents often 'cheat' to get code to pass CI by skipping failing tests or deleting assertions; this skill uses deterministic logic to catch those specific patterns that human reviewers or LLM-based prompts might miss.

    The skill is platform-agnostic and works with any AI coding agent (like Aider, Cursor, or Devin) as long as you have access to the local Git repository or the CI/CD pipeline where the code is generated.

    No, this is a zero-dependency Python and Bash script that performs a local, read-only analysis of your Git diffs, ensuring your source code is never sent to an external API for the audit process.

    Absolutely—you can use the `--allow-path` flag to define strict boundaries, causing the audit to fail if the agent attempts to modify sensitive files like CI configurations, lockfiles, or unrelated modules.

    You receive the core auditing scripts, a guide for integrating the tool into your Git hooks or CI/CD pipelines, and documentation on interpreting the PR Verification Receipts.

    The tool uses universal string and pattern matching (like `assert`, `expect`, and `catch`) which works across Python, JavaScript, TypeScript, Go, Rust, and most other modern programming languages.

    New in Code Quality & Review

    Free