More screenshots
Works with the AI Agents you already use
WireDrift MCP — Wire Contract Drift & Mock Desync Sentinel
AST-Powered Wire Contract Drift & Mock Desynchronization Detector. Stops AI agents from hallucinating green tests by mutating test fixtures.
$7
WireDrift MCP — Wire Contract Drift & Mock Desync Sentinel
Example session with this skill installed
Audit our test mocks in /tests/mocks/userMock.ts against our canonical OpenAPI spec in /docs/openapi.yaml. Fix any contract drift and prevent the agent from changing mock shapes.
- Read your context and instructions
- Compiled the wiredrift mcp
I have audited your test mocks using WireDrift MCP. Two critical schema desynchronizations were identified where local test fixtures drifted from the canonical OpenAPI 3.1 contract.
WireDrift Contract Drift Audit Report
<contract_audit specification="OpenAPI 3.1" endpoint="GET /api/v2/users/{id}">
<schema_alignment valid="false" total_issues="3">
<issue type="MISSING_REQUIRED_PROPERTY" property="tier" severity="BLOCKING">
Required property 'tier' is omitted in the mock fixture but required by production API.
</issue>
<issue type="TYPE_MISMATCH" property="id" severity="CRITICAL">
Property 'id' is typed as number (12345) in mock, but canonical schema requires string.
</issue>
<issue type="ENUM_VIOLATION" property="status" severity="CRITICAL">
Value 'god_mode' in mock does not exist in schema enum: ['active', 'inactive', 'banned'].
</issue>
</schema_alignment>
</contract_audit>
Desynchronization Differential Matrix
| Field Name | Mock Fixture Type | Canonical Schema Type | Severity | Status |
|---|---|---|---|---|
id | number (12345) | string ("usr_12345") | CRITICAL | Type Cast Patched |
tier | undefined | enum: ['free','pro','enterprise'] | BLOCKING | Injected "pro" |
status | "god_mode" | enum: ['active','inactive'] | CRITICAL | Aligned "active" |
// Patched Mock Fixture: tests/mocks/userMock.ts
export const mockUserResponse = {
id: "12345", // Fixed: cast to string
email: "auto@dt24.internal",
status: "active", // Fixed: aligned with OpenAPI enum
tier: "pro" // Fixed: injected missing required contract field
};
Next Steps
- The mock fixture now matches the production OpenAPI 3.1 specification 100%.
- Pre-test hook will block future edits if mocks drift from canonical schemas.
- Unit tests pass against realistic data shapes.
Connects securely to your tools. The creator never sees your data.
About this skill
WireDrift prevents AI coding agents from "hallucinating green tests" by continuously comparing test mocks (jest.mock, msw, nock, httpx_mock) against live OpenAPI/JSON schemas and staging contract manifests.
Agents tasked with fixing failing tests often modify the test mock data rather than fixing the underlying business logic:
-
Mock Drift: An agent changes a mock response from
{ "user": { "id": 123 } }to{ "id": 123 }just to make a unit test pass, breaking production compatibility. -
False Green Syndrome: Local tests pass 100%, but staging crashes immediately with HTTP 422 Unprocessable Entity or unhandled null dereferences.
-
Ghost Fields: Mocks accumulate deprecated fields that production services stopped sending months ago.
-
AST-Driven Mock Extraction:
- Parses TypeScript, JavaScript, and JSON fixtures to locate simulated HTTP responses and RPC payloads.
-
OpenAPI 3.x / JSON Schema Validation:
- Performs bi-directional schema comparison between mock shapes and canonical API specifications.
-
Hard Pre-Test Gate:
- Hook blocks
npm testorpytestif mocks contain non-compliant schemas, surfacing the exact property discrepancy.
- Hook blocks
-
Deterministic Mock Patching:
- Generates minimal valid mock objects conforming strictly to the OpenAPI schema.
extract_mock_contracts: Scans test directories and extracts simulated wire payloads.diff_wire_contracts: Evaluates mock payloads against an OpenAPI schema or live endpoint manifest.generate_contract_patch: Synthesizes updated mock fixtures aligned with current API contracts.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.
Analyzes OpenAPI 3.0/3.1 specs, JSON Schema, and TypeScript interfaces. GraphQL schemas require conversion to JSON schema representations.
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 19 days ago
- Software
- OpenAPI 3.x
Node.js
Permissions
No special permissions declared or detected