adversarial-zod
Adversarial Zod Gate
A currency and correctness gate for Zod schema code in TypeScript apps — a pass/fail gate: a single blind reviewer subagent judges the work against this gate's rules with an adversarial mandate, and the work passes only when every rule is PASS or N/A. This skill renders verdicts; it never fixes the work.
Rules are pinned to zod 4.4.x (package root since zod@4.0.0, July 2025) and, for the start- category, the TanStack Start v1 RC (.validator() current, .inputValidator() deprecated).
When to Apply
- A diff or feature that defines or edits Zod schemas is about to merge and needs an objective PASS/FAIL on Zod 4 currency, not advisory feedback.
- An agent (Claude, Codex) authored schema code and you want an independent check that it is not reproducing Zod 3 training-data patterns — deprecated method forms, removed params, or the
z.interface()hallucination. - A Zod 3 → 4 migration claims completion and needs the silent semantic breaks audited (
.default()short-circuiting, exhaustive enum-keyed records,z.coerce.boolean()on string flags). - A TanStack Start app validates server-function input or search params with Zod and should be on the adapter-free Standard Schema patterns.
Do not apply to Zod 3 codebases (the reviewer prompt's precondition aborts with "GATE NOT APPLICABLE"), or when the user wants explanations and refactors rather than a verdict — that is the curated zod distillation skill's job. The two start- rules go N/A outside TanStack apps; the rest of the gate works in any TypeScript project using Zod 4.
Review Protocol
Follow these steps exactly — the gate's value is that every review runs the same way.