Claude-skill-registry form-system
Enforces project form system conventions when creating or modifying forms using the custom TanStack Form integration. This skill covers useAppForm hook usage, field components, focus management, validation patterns, and accessibility requirements.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/form-system" ~/.claude/skills/majiayu000-claude-skill-registry-form-system && rm -rf "$T"
manifest:
skills/data/form-system/SKILL.mdsource content
Form System Skill
Purpose
This skill enforces the project form system conventions automatically during form development. It ensures consistent patterns for form hooks, field components, focus management, validation, server action integration, and accessibility.
Activation
This skill activates when:
- Creating forms with
hookuseAppForm - Using field components (
,TextField
,TextareaField
,SelectField
,SwitchField
,CheckboxField
,ComboboxField
)TagField - Implementing focus management with
withFocusManagement - Setting up form validation with Zod schemas
- Creating custom form dialogs or form-based features
- Using
for field renderingform.AppField - Using
orform.SubmitButton
wrappersform.AppForm - Using
fromuseStore
for form value access@tanstack/react-form - Using
fromformOptions
for reusable form configurations@tanstack/form-core - Implementing field listeners or programmatic field operations
- Integrating forms with
hookuseServerAction
Workflow
- Detect form work (imports from
or@/components/ui/form
)useAppForm - Load
references/Form-System-Conventions.md - Generate/modify code following all conventions
- Scan for violations of form patterns
- Auto-fix all violations (no permission needed)
- Report fixes applied
Key Patterns
Form Setup
- Use
hook fromuseAppForm@/components/ui/form - Wrap form components with
HOCwithFocusManagement - Configure validation with
validators: { onSubmit: zodSchema } - Use
for validation timingrevalidateLogic - Handle invalid submissions with
andonSubmitInvalidfocusFirstError - Always set
canSubmitWhenInvalid: true
Field Rendering
- Use
with field components (form.AppField
, etc.)TextField - Each field supports
,label
,description
,isRequired
, andfocusRef
propstestId - Use field
for side effects (onChange, onBlur)listeners
Form Submission
- Wrap
in event handler withform.handleSubmit()
ande.preventDefault()e.stopPropagation() - Integrate with
hook for server actionsuseServerAction - Use
wrapped inform.SubmitButton
for automatic loading stateform.AppForm
Accessing Form Values
- Use
fromuseStore
for reactive access@tanstack/react-form - Access via
useStore(form.store, (state) => state.values.fieldName) - Never access form values directly during render
Programmatic Operations
- Use
to update field valuesform.setFieldValue() - Use
to trigger validationform.validateField() - Use field listeners for dependent field updates
Server Action Options
for loading/success/error toaststoastMessages
for background operationsisDisableToast: true
callback for post-submission logiconSuccess
References
- Complete form system conventionsreferences/Form-System-Conventions.md