- Home
- Skills
- Code Quality & Review
- Agent Pre-Commit Diff Scrutinizer
Works with the AI Agents you already use
Agent Pre-Commit Diff Scrutinizer
Senior Tech Lead pre-commit gatekeeper. Audits AI git diffs against 6 non-negotiable invariants.
$9.99
Agent Pre-Commit Diff Scrutinizer
Example session with this skill installed
Audit this git diff before I commit
diff --git a/src/auth/session.py b/src/auth/session.py
--- a/src/auth/session.py
+++ b/src/auth/session.py
@@ -14,2 +14,3 @@
-def verify_jwt(token: str) -> User:
+def verify_jwt(token: str) -> Any: # type: ignore
-
skip expired check for hotfix
- return get_user_mock()
diff --git a/tests/test_session.py b/tests/test_session.py
--- a/tests/test_session.py
+++ b/tests/test_session.py
@@ -30,5 +30,2 @@
-def test_jwt_expiry_enforced():
- with pytest.raises(TokenExpiredError):
-
verify_jwt(EXPIRED_TOKEN)
+@pytest.mark.skip(reason="temp fix")
+def test_jwt_expiry_enforced(): pass
- Read your context and instructions
- Compiled the agent pre-commit diff
AGENT PRE-COMMIT DIFF AUDIT REPORT
Gate Status: [FAIL] (Pre-Commit Blocked)
Files Evaluated: 2 | Blocking Violations: 4 | Warnings: 1
1. Invariant Evaluation Checklist
| # | Invariant | Status | Findings |
|---|---|---|---|
| 1 | Lint & Type Suppressions | [X] FAILED | Unjustified # type: ignore added at session.py:14 |
| 2 | Test Preservation | [X] FAILED | Stripped assertions & @pytest.mark.skip added at test_session.py:30 |
| 3 | Scope Boundary Defense | [X] FAILED | Mock return get_user_mock() bypasses production auth core |
| 4 | Security Invariants | [!] WARN | Token expiration enforcement removed |
2. Remediation Directives
- Revert: Remove
@pytest.mark.skipfromtests/test_session.py. - Type Safety: Replace
Any: # type: ignorewith explicit union typeUser | GuestSession. - Pre-commit clearance: Run
python scripts/diff_scrutinizer.py --strictto verify clean pass before pushing.
Connects securely to your tools. The creator never sees your data.
About this skill
Agent Pre-Commit Diff Scrutinizer: Deterministic AI Diff Guard (v2.2.0)
When autonomous coding agents (Claude Code, Cursor, Windsurf, Cline) generate code rapidly, they frequently introduce subtle compensatory regressions:
- Silently deleting or skipping unit tests to force failing CI builds green.
- Introducing unsanctioned
# type: ignoreoreslint-disablesuppressions without issue tracking rationale. - Silently removing defensive error handling or authentication checks.
- Leaking API keys, tokens, or modifying critical CI/CD workflows out of task scope.
This skill acts as an automated Senior Tech Lead pre-commit gatekeeper, enforcing 6 non-negotiable architectural and safety invariants before code reaches your repository.
What This Skill Enforces (The 6 Invariants):
- Lint & Type Suppressions: Blocks uncoordinated
@ts-ignore,eslint-disable,# noqa, or# type: ignorewithout explicit rationale. - Test Preservation: Catches test deletions, skipped suites (
@pytest.mark.skip,it.skip), and stripped assertions. - Scope Boundary Defense: Rejects out-of-scope edits outside target directories.
- Credential & Secret Guard: Detects high-entropy keys, private tokens, and .env files before commit.
- Quality Gate Integrity: Blocks attempts to weaken test runners, thresholds, or linter configs.
- Lockfile & Dependency Safety: Flags unexpected additions to lockfiles without package manifest justification.
Included Production Assets:
SKILL.md: Universal agent instructions adhering to open skill standards.scripts/diff_scrutinizer.py: Zero-dependency, offline CLI engine (Python 3.8+ stdlib).templates/pre_commit_hook.sh: Git pre-commit hook template.templates/github_ci.yml: Reusable GitHub Actions workflow for PR gatekeeping.references/diff_invariants.md: Comprehensive rule catalog with rationale and remediation.references/agent_eval_matrix.md: Rubric for evaluating autonomous agent diff quality.
Built by Conversionlogic (https://conversion-logic.github.io/)
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.
Heuristic analysis most effective for JS/TS/Python. Dependency checks limited to npm, pip, and poetry. Not a replacement for full CI or dedicated secret scanners like gitleaks.
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
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 15 days ago
- Software
Python
Git