apps/docs/skills/zod-to-form-core/SKILL.md
Documentation site for zod-to-form (Docusaurus 3 + TypeDoc) Use when: You want per-field validation instead of whole-form validation.
npx skillsauth add pradeepmouli/zod-to-form zod-to-form-coreInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Documentation site for zod-to-form (Docusaurus 3 + TypeDoc)
Requires Zod v4 — uses _zod.def, _zod.bag, and z.registry() APIs.
Does NOT work with Zod v3 (which uses _def internals).
Key concepts:
z.registry<FormMeta>() stores per-schema field configshadcn preset maps to controlled components with field expressionsUse this skill when:
createOptimizerscreateOptimizersdefineConfig — defineConfig is the typed entry point; bare object literals lose generic inference on components.overridesunknown → use validateConfig — validates and narrows to ZodFormsConfignormalizeFormValues — HTML inputs produce "" for unset optional fields, which Zod rejects; this is the single mandatory normalization stepwalkSchemawalkSchemaregisterDeepregisterDeepregisterFlatregisterFlatDo NOT use when:
createOptimizers)defineConfig is a no-op at runtime without a preset; skip it when config comes from JSON or dynamic import (defineConfig)validateConfig)normalizeFormValues)walkSchema)walkSchema)registerDeep)registerDeep)registerFlat)API surface: 50 functions, 24 types, 6 constants
9 configuration interfaces — see references/config.md for details.
Key functions: canonicalizeConfig (Serialize a CodegenConfig to a canonical string suitable for
hashing into a cache key), createOptimizers (Create an optimizer registry by merging custom optimizers with builtins), createSchemaLiteCollector (Create a new SchemaLiteCollector instance), defineConfig (Identity helper that returns its argument typed as ZodFormsConfig), validateConfig (Validates an unknown value as a ZodFormsConfig at runtime), resolveFieldConfig (Merge global field config with per-schema field config overrides), normalizeConfig (Normalize a validated config by migrating deprecated top-level fields to their canonical locations), joinPath (Join a parent path and a child key with a dot separator), createBaseField (Create a base FormField with sensible defaults), getEmptyDefault (Returns a type-safe empty default value for a FormField based on its zodType
and structure), normalizeFieldKey (Normalise a concrete field key to the bracket notation used in config), collectFieldSections (Collect section groupings from fields and a config override lookup), normalizeFormValues (Normalize raw HTML form values for Zod parsing), getFieldRegisterHints (Derive framework-agnostic register hints from a FormField), resolveBaseProps (Static, schema-derived base props every field's component receives, identical
across all zodTypes), resolveNativeAttrs (Extract DOM-valid native attributes from a field's props), resolveControlMode (Derive the control mode from a field mapping's component override), resolveOptionsProps (Extract options props from a field for enum/union select-style components), isZodSchema (Structural Zod v4 check shared across loader/registration/codegen entrypoints), walkSchema (Walk a Zod schema and produce a FormField[] tree), createProcessors (Create a custom processor registry by merging with built-in processors), registerDeep (Register a schema and all its nested fields in a registry using a
path-structured FieldConfig tree), registerFlat (Register flat dot-path field configs against a schema's registry), processArray (Process z), processTuple(Processz), processBoolean (Process z), processMap(Processz), processSet (Process z), processCrossRef(Process a cross-reference field — a schema annotated in the form registry withrefType), processDate(Processz), processEnum (Process z), processLiteral(Processz), processFallback (Fallback processor for Zod types without a dedicated handler), processFile (Process z), processNumber(Processz), processObject (Process z), processIntersection(Processz), processRecord (Process z), processString(Processz), processTemplateLiteral (Process z), processUnion(Processz), processDiscriminatedUnion (Process z), processDefault(Processz), processLazy (Process z), processNullable(Processz), processOptional (Process z), processPipe(Processz), processReadonly (Process `z)
80 exports total — see references/ for full API.
Load these on demand — do NOT read all at once:
references/functions/ for grouped indexes, full signatures, parameters, and return typesreferences/types.mdreferences/variables.mdreferences/config.md for all settings and defaultstools
Use when working with zod-to-form (core, react, cli, codegen, vite).
tools
Vite plugin for zod-to-form — transforms ?z2f imports into generated form components and optionally replaces <ZodForm> JSX call sites with generated components at build time Use when: You want `import SignupForm from './signup.schema?z2f'` to Just Work in a.... Also: vite, vite-plugin, zod, zod-v4, codegen, forms, form-generation, schema-driven, react-hook-form, build-plugin, jsx-transform.
development
Runtime <ZodForm> renderer for Zod v4 schemas Use when: You need form rendering in storybook, playgrounds, or low-traffic admin UIs —.... Also: zod, zod-v4, react, forms, form-generation, react-hook-form, schema-driven, dynamic-forms, form-renderer, hookform-resolver, zod-form-renderer.
development
Schema walker and processor registry for Zod v4 form generation Use when: You want per-field validation instead of whole-form validation. Also: zod, zod-v4, forms, form-generation, schema, schema-walker, processor-registry, react-hook-form, schema-driven, form-schema, zod-registry.