zod
TypeScript-first schema validation with automatic static type inference from runtime schemas.
- Define schemas once and automatically infer TypeScript types for compile-time safety; supports primitives, objects, arrays, unions, and recursive types
- Validate data with
parse()(throws) orsafeParse()(returns result object); includes async validation for database lookups and external checks - Transform and refine data during validation using
transform(),refine(), andsuperRefine()for custom logic and cross-field validation - Integrates seamlessly with React Hook Form, tRPC, Next.js, Express, Drizzle ORM, and environment variable validation
- Compose schemas by extending, merging, picking, omitting, and creating discriminated unions; customize error messages globally or per field
Zod Validation Skill
Summary
TypeScript-first schema validation library with static type inference. Define schemas once, get runtime validation and compile-time types automatically.
When to Use
- Form validation with type-safe data
- API request/response validation
- Environment variable validation
- Runtime type checking with TypeScript inference
- tRPC procedure inputs/outputs
- Database schema validation (Drizzle, Prisma)
Quick Start
import { z } from 'zod';
// Define schema
More from bobmatnyc/claude-mpm-skills
drizzle-orm
Type-safe SQL ORM for TypeScript with zero runtime overhead
4.3Kplaywright-e2e-testing
Playwright modern end-to-end testing framework with cross-browser automation, auto-wait, and built-in test runner
2.7Kpydantic
Python data validation using type hints and runtime type checking with Pydantic v2's Rust-powered core for high-performance validation in FastAPI, Django, and configuration management.
2.2Ktailwind-css
Tailwind CSS utility-first framework for rapid UI development with responsive design and dark mode
1.2Ktrpc-type-safety
tRPC end-to-end type-safe APIs for TypeScript with React Query integration and full-stack type safety
1.1Kpytest
pytest - Python's most powerful testing framework with fixtures, parametrization, plugins, and framework integration for FastAPI, Django, Flask
899