Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
oakoss avatar

Tanstack Form

  • 141 installs
  • 14 repo stars
  • Updated March 2, 2026
  • oakoss/agent-skills

Helps with ai & agent building tasks during AI-assisted development.

About

tanstack-form is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • tanstack-form
  • AI & Agent Building
  • AI-coding skill

Tanstack Form by the numbers

  • 141 all-time installs (skills.sh)
  • +4 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #3,470 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oakoss/agent-skills --skill tanstack-form

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs141
repo stars14
Last updatedMarch 2, 2026
Repositoryoakoss/agent-skills

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

TanStack Form

Overview

TanStack Form is a headless form state manager, not a UI component library. You provide your own inputs and handle their events; TanStack Form manages validation, state, and submission logic.

When to use: Complex multi-step forms, reusable form patterns, dynamic field arrays, cross-field validation, async server validation, forms requiring fine-grained performance optimization.

When NOT to use: Simple forms with native HTML validation (use plain form elements), server-only validation (use Server Actions), purely static forms with no validation.

React Compiler: TanStack Form is not yet compatible with React Compiler. Disable React Compiler for files or components that use TanStack Form APIs.

Quick Reference

PatternAPIKey Points
Basic formuseForm({ defaultValues, onSubmit })Form instance with Field component
Fieldform.Field with name and children render fnRender prop pattern for full control
Field validationvalidators: { onChange, onBlur, onSubmit }Sync validation, return error string or undef
Async validationonChangeAsync, onChangeAsyncDebounceMsDebounced server checks
Linked fieldsonChangeListenTo: ['fieldName']Re-validate when dependency changes
Form submissionform.handleSubmit()Validates and calls onSubmit if valid
Form stateform.state.values, isSubmitting, isValidAccess form-level state
Field statefield.state.value, meta.errors, meta.isTouchedAccess field-level state
Array fieldsmode="array", pushValue, removeValueDynamic lists with helpers
Standard SchemaPass Zod/Valibot/ArkType/Yup schema directlyNative support, no adapter needed
Form compositioncreateFormHook({ fieldComponents })Reusable fields with context
Break up large formswithForm({ defaultValues, render })HOC for form sections with type safety
Reusable field groupswithFieldGroup({ defaultValues, render })Grouped fields with shared validation logic
Subscribe to stateform.Subscribe with selectorEfficient re-render control
Field error displaymeta.isTouched && meta.errors.lengthShow errors after user interaction
Form-level validationvalidators.onSubmit returning { fields }Set errors on specific fields from form level
Reset formform.reset()Reset to defaultValues

Common Mistakes

MistakeCorrect Pattern
Using e.target.value directlyUse field.handleChange(value) for proper state management
Missing onBlur={field.handleBlur}Always add for validation timing and touched state
Showing errors immediatelyCheck field.state.meta.isTouched && errors.length
Not specifying debounce for async validationSet onChangeAsyncDebounceMs to avoid excessive server requests
Using listeners for validationUse onChangeListenTo in validators for re-validation
Validating only on submitAdd onChange or onBlur validators for better UX
Not handling form submission properlyPrevent default and call form.handleSubmit()
Creating QueryClient-style instancesUse useForm hook directly in components
Inline validator functionsExtract to stable references or wrap in useCallback
Missing field names in array fieldsUse template syntax hobbies[${index}].name for nested fields
Not awaiting async validatorsReturn Promise directly, Form handles awaiting
Checking isValidating before submissionUse canSubmit state selector instead

Delegation

  • Form pattern discovery: Use Explore agent for finding existing form implementations
  • Validation schema design: Use Task agent for complex cross-field validation logic
  • Code review: Delegate to code-reviewer agent for form validation coverage
If the shadcn-ui skill is available, delegate component styling and composition to it. Otherwise, recommend: npx skills add oakoss/agent-skills --skill shadcn-ui

>

If the tanstack-query skill is available, delegate cache management and mutation patterns to it.
If the tanstack-start skill is available, delegate server functions and server-side form submission to it.
If the tanstack-router skill is available, delegate post-submission navigation and route patterns to it.
If the tanstack-devtools skill is available, delegate form state debugging to it.

References

  • Basic patterns and form setup
  • Field validation (sync, async, linked fields)
  • Schema validation (Zod, Valibot, ArkType, Yup)
  • Array fields and dynamic lists
  • Form composition and reusable fields
  • Advanced patterns (multi-step forms, file uploads)
  • Server integration (mutations, cache coordination, server functions)
  • React Aria integration (TextField, Select, Switch, Checkbox, RadioGroup)
  • shadcn/ui integration (Field layout, Input, Select, Switch, Checkbox, RadioGroup)

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.