- Home
- Skills
- Testing & Debugging
- Agent Tamper Guard
More screenshots
Works with the AI Agents you already use
Agent Tamper Guard
Stop AI coding agents from cheating tests, weakening assertions, skipping checks, adding @ts-ignore, or spoofing test runners to fake passing builds.
$10
Agent Tamper Guard
Example session with this skill installed
The tests for the new auth flow are failing with a type error. Fix the implementation so the build passes, and verify that no test tampering occurred.
- Read your context and instructions
- Compiled the agent tamper guard
I have analyzed the failure in src/auth/service.ts. The error was caused by a missing property in the user session object which didn't match the AuthSession interface. I have updated the implementation logic to correctly map the database response rather than using a type cast or skipping the test.
Integrity Verification Report
| Category | Check | Status | Details |
|---|---|---|---|
| Test Suite | test-disabled | Passed | No .skip or xit added to tests/auth.test.ts |
| Assertions | assertion-weakened | Passed | Precise toEqual matches remain intact |
| Types | any-cast | Passed | Resolved via interface update, not as any |
| Suppression | suppression-comment | Passed | No @ts-ignore or eslint-disable added |
| Config | tsconfig-weakened | Passed | strict: true remains active in tsconfig.json |
// src/auth/service.ts - Corrected Implementation
export async function createSession(user: UserRecord): Promise<AuthSession> {
// Fix: Explicitly map fields to satisfy AuthSession interface
// instead of bypassing the type checker.
return {
id: user.uuid,
token: await generateToken(user.id),
expiresAt: new Date(Date.now() + 3600000).toISOString(),
roles: user.permissions ?? []
};
}
Next steps
- Run
npx --no agent-tamper-guard --stagedto confirm final git diff compliance. - Execute the full test suite with
npm testto ensure no regression in related modules. - Submit the PR knowing the implementation fix is type-safe and test-backed.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop Coding Agents from Cheating Your Checks
When autonomous AI coding agents (Claude Code, Cursor, Copilot, Windsurf) fail a test, they often "reward hack" by making the test stop failing instead of fixing the real bug:
- Weakening assertions (
toEqual(...)→toBeDefined()) - Skipping failing tests (
it.skip,xit,test.todo) - Silencing compiler errors (
@ts-ignore,@ts-nocheck,eslint-disable) - Spoofing test runners (
if (process.env.VITEST) return mockData) - Silently swallowing exceptions (
catch {})
What This Skill Provides
- Diff-Aware AST Verification: Inspects before-and-after AST diffs to catch cheating moves that linters miss.
- Native MCP Server (
agent-tamper-guard mcp): Allows agents in Cursor and Claude to runcheck_diff_integrityandexplain_violationinteractively before finishing. - Claude Code Lifecycle Blocking: Automatically intercepts the
Stopevent to block agents from submitting tampered code. - Zero Network / 100% Offline: Runs locally on your machine with no external network calls or telemetry.
Quick Setup
# Install Cursor MCP server:
npx agent-tamper-guard init --mcp
# Install Claude Code hooks & Cursor guidelines:
npx agent-tamper-guard init --claude --cursor --git-hook
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.
Requires Node.js environment to run the verification utility. Primarily optimized for TypeScript and JavaScript testing frameworks.
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 20 days ago
- Software
- agent-tamper-guard
Node.js
Permissions
File Scopes
Runs 100% locally and offline. Terminal and file read permissions are used exclusively to inspect git diffs and AST structures across changed files. File write permission is only used when the user initializes hooks into .claude/settings.json, .cursor/rules/, or .husky/pre-commit. No code or data ever leaves the local environment.