What problem does it solve? Validating external data at application boundaries is error-prone when done manually, leading to runtime crashes and inconsistent error messages. This Skill provides ready-to-use Zod schema patterns so TypeScript developers can validate API inputs, environment variables, and data transformations with full type inference. ## Core Features & Use Cases - Schema Building Blocks: Covers primitives, objects, arrays, unions, discriminated unions, enums, and schema composition with pick, omit, partial, and extend. - API & Environment Validation: Includes request body schemas, query parameter coercion, Fastify route integration with zod-to-json-schema, and fail-fast environment variable validation. - Custom & Async Validation: Demonstrates refine-based custom rules, cross-field checks like password confirmation, and async validations such as unique email checks. - Use Case: When building a Fastify endpoint that accepts user registration data, apply the provided patterns to validate the request body, return flattened field errors on failure, and infer the TypeScript input type directly from the schema. ## Quick Start Ask the agent to create a Zod schema that validates a user registration request body with email, password rules, and matching password confirmation.