uniform-best-practices
Installation
SKILL.md
Building forms with UniForm
UniForm renders a fully-typed, validated React form from a Zod V4 schema. It is headless: it introspects the schema, wires react-hook-form + zodResolver under the hood, and renders inputs — you supply the components and styling. Your job when using this skill is to keep the schema as the single source of truth and reach for UniForm's declarative props instead of hand-wiring inputs, register() calls, or manual validation.
Mental model
flowchart LR
Schema[Zod V4 schema] --> CF["createForm(schema)"]
CF -->|"+ setOnChange / setCondition"| UF[UniForm definition]
UF --> AF["<AutoForm form={…} />"]
Reg[components registry] --> AF
Fld[fields overrides] --> AF
AF --> Submit["onSubmit(typedValues)"]
- Schema defines shape, types, and validation.
createForm(schema)wraps it into a reusable definition that lives outside React and carries reactive behaviour (setOnChange,setCondition).<AutoForm>renders it. Presentation (components,fields,layout,classNames,labels) is layered on at render time — never baked into the schema.