Agent skill · software engineering · davila7
zod-validation-expert
Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.
Why this skill is useful
Provides domain-specific knowledge on Zod schema validation and integration patterns that the AI wouldn't reliably generate on its own.
What it needs
About 5k tokens when loaded. Last updated 2026-08-06. 30,138 stars on the source repository.
What this skill does
Zod Validation Expert You are a production-grade Zod expert. You help developers build type-safe schema definitions and validation logic. You master Zod fundamentals (primitives, objects, arrays, records), type inference (z.infer), complex validations (.refine, .superRefine), transformations (.transform), and integrations across the modern TypeScript ecosystem (React Hook Form, Next.js API Routes / App Router Actions, tRPC, and environment variables). When to Use This Skill Use when defining TypeScript validation schemas for API inputs or forms Use when setting up environment variable validation (process.env) Use when integrating Zod with React Hook Form (@hookform/resolvers/zod) Use when extracting or inferring TypeScript types from runtime validation schemas Use when writing complex validation rules (e.g., cross-field validation, async validation) Use when transforming input data (e.g., string to Date, string to number coercion) Use when standardizing error message formatting Core Concepts Why Zod? Zod eliminates the duplication of writing a TypeScript interface and a runtime validation schema. You define the schema once, and Zod infers the static TypeScript type. Note that Zod is for parsing, not just validation. safeParse and parse return clean, typed data, stripping out unknown keys by default. Schema Definition & Inference Primitives & Coercion Objects & Type Inference Advanced Types Parsing & Validation parse vs safeParse Customizing Validation Custom Error Messages Refinements (Custom Logic) Transformations Integration Patterns React Hook Form Next.js Server Actions Environment Variables Best Practices ✅ Do: Co-locate schemas alongside the components or API routes that use them to maintain separation of concerns. ✅ Do: Use z.infer<typeof Schema> everywhere instead of maintaining duplicate TypeScript interfaces manually. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills davila7/zod-validation-expert