What problem does it solve?
Zod schema code often drifts from best practices, causing type-unsafe validation, unclear error UX, and production bugs when parsing real user and API data.
Core Features & Use Cases
- Schema boundary hardening: validate inputs early with safeParse, parse JSON only after schema validation, and avoid trusting unvalidated data.
- Type-safety patterns: prefer z.infer for types, use z.unknown() instead of z.any(), and apply strict TypeScript + correct input vs output typing for transforms.
- Better validation ergonomics: collect and display all issues, preserve error locations with issue.path, and improve form rendering with flatten().
- Practical schema composition: use enums for fixed values, strict vs strip for object keys, and composition helpers like extend, pick/omit, partial, intersection, pipe, preprocess, and z.lazy.
Quick Start
Use the zod skill to review and fix your Zod schemas so they validate safely, infer correct types, and produce field-level errors your UI can display cleanly.