zod

Installation
Summary

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) or safeParse() (returns result object); includes async validation for database lookups and external checks
  • Transform and refine data during validation using transform(), refine(), and superRefine() 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
SKILL.md

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
Related skills
Installs
601
GitHub Stars
43
First Seen
Jan 23, 2026