This is your runtime validation solution when you need TypeScript types and data validation in one place. Define a schema once with `z.object()` and friends, get automatic type inference with `z.infer`, and validate API payloads, form inputs, or environment variables at runtime. The `.safeParse()` method returns a result object instead of throwing, which keeps error handling clean. At 2kb gzipped with zero dependencies, it won't bloat your bundle. Note that this documents Zod 4.x, which has breaking changes from v3 around error customization and stricter number validation. Works especially well with tRPC, react-hook-form, and Prisma for end-to-end type safety.
npx skills add https://github.com/secondsky/claude-skills --skill zod