zod-4: Claude skill | implexaback to searchzod-4
>
SKILL.md
Zod 4 schema validation patterns for forms, APIs, and type-safe parsing.
Covers breaking changes from Zod 3, including new top-level validators (z.email(), z.uuid(), z.url()) and updated object configuration syntax
Includes patterns for primitives, objects, arrays, records, tuples, unions, and discriminated unions with practical examples
Demonstrates transformations, coercion, preprocessing, refinements, and custom error handling with Zod 4's error parameter syntax
Provides React Hook Form integration example using zodResolver for form validation with type inference
Breaking Changes from Zod 3
// ❌ Zod 3 (OLD)
z.string().email()
z.string().uuid()
z.string().url()
z.string().nonempty()
z.object({ name: z.string() }).required_error("Required")
// ✅ Zod 4 (NEW)
z.email()
z.uuid()
z.url()
z.string().min(1)
z.object({ name: z.string() }, { error: "Required" })
Basic Schemasrelated skills
semantically similar in the cross-vendor indexdon't have the plugin yet? install it then click "run inline in claude" again.
+concrete before/after code examples for zod 3 to 4 migration, reducing ambiguity+covers multiple schema types (primitives, objects, arrays, unions, discriminated unions) with practical patterns+demonstrates real-world integration via react hook form with zodresolverweaknesses
- ~no explicit intent statement, decision trees, or outcome signals; reads as reference material rather than actionable procedure
- ~trigger phrases are library/pattern names (z.email, discriminated unions) not user problems or scenarios that would initiate the skill
- ~missing edge cases: no discussion of performance with large schemas, nested validation depth limits, or failure recovery paths