Loading...
Loading...
Zod 4 schema validation best practices for type safety, parsing, and error handling. Use when defining schemas, validating string formats, calling safeParse, formatting Zod errors, or inferring input/output types. React Hook Form integration is covered by the react-hook-form skill.
npx skill4agent add pymodel/react-frontend-skills zod| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Schema Definition | CRITICAL | |
| 2 | Parsing & Validation | CRITICAL | |
| 3 | Type Inference | HIGH | |
| 4 | Error Handling | HIGH | |
| 5 | Object Schemas | MEDIUM-HIGH | |
| 6 | Schema Composition | MEDIUM | |
| 7 | Refinements & Transforms | MEDIUM | |
| 8 | Performance & Bundle | LOW-MEDIUM | |
schema-use-primitives-correctlyschema-use-unknown-not-anyschema-avoid-optional-abuseschema-string-validationsschema-use-enumsschema-coercion-for-form-dataparse-use-safeparseparse-async-for-async-refinementsparse-handle-all-issuesparse-validate-earlyparse-avoid-double-validationparse-never-trust-jsontype-use-z-infertype-input-vs-outputtype-export-schemas-and-typestype-branded-typestype-enable-strict-modeerror-custom-messageserror-use-flattenerror-path-for-nestederror-i18nerror-avoid-throwing-in-refineobject-strict-vs-stripobject-partial-for-updatesobject-pick-omitobject-extend-for-compositionobject-optional-vs-nullableobject-discriminated-unionscompose-shared-schemascompose-intersectioncompose-lazy-recursivecompose-preprocesscompose-piperefine-vs-superrefinerefine-transform-coercerefine-add-pathrefine-defaultsrefine-catchperf-cache-schemasperf-zod-miniperf-avoid-dynamic-creationperf-lazy-loadingperf-arraysreferences/{prefix}-{slug}.mdAGENTS.mdreact-hook-form