# Write-Locked Code Healer — Anti-Gaming Pytest & Import Repair

> Enforces cryptographic SHA-256 locks on unit tests before and after AST/import/pytest repair so AI agents never pass builds by weakening assertions.

Write-Locked Code Healer — Anti-Gaming Pytest & Import Repair is a paid AI agent skill on Agensi by Pritam Kumar Panda. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [Pritam Kumar Panda](https://www.agensi.io/creators/pritam-kumar-panda)
- Version: 1.0
- Last updated: 2026-11-19
- Security: scan passed (2026-11-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/write-locked-code-healer-anti-gaming-pytest-import-repair
- Tags: testing-debugging, code-quality-review, agents-orchestration

## About this skill

AI coding agents frequently "fix" failing test suites by weakening, deleting, or rewriting unit test assertions instead of repairing the underlying bug in production code. **Write-Locked Code Healer** enforces cryptographic SHA-256 test immutability before and after every repair.

Follow these four steps in strict order on every bugfix or test-repair task:

Inspect `.autoharness_diag.json` to pinpoint:
- **AST `SyntaxError`s** (exact file and line number)
- **Dual-entrypoint `ImportError`s** (e.g. `from sibling import X` failing when imported as `pkg.module` — prefer relative-first fallback `try: from .sibling import X except ImportError: from sibling import X`)
- **Failing `pytest` assertions** and tracebacks

Only report completion when `.autoharness_verify.json` shows `"verified": true`, `"tests_untouched": true`, and `"pytest_passed": true`. Remove temporary `.autoharness_*.json` artifacts when finished if the repository is clean.

## Requires

- Python 3.10+
- pytest

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Write-Locked Code Healer — Anti-Gaming Pytest & Import Repair skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does Write-Locked Code Healer — Anti-Gaming Pytest & Import Repair do?

Enforces cryptographic SHA-256 locks on unit tests before and after AST/import/pytest repair so AI agents never pass builds by weakening assertions.

### Which AI agents support Write-Locked Code Healer — Anti-Gaming Pytest & Import Repair?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use Write-Locked Code Healer — Anti-Gaming Pytest & Import Repair?

Connect your AI agent to Agensi through MCP, then ask it to use Write-Locked Code Healer — Anti-Gaming Pytest & Import Repair on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
