MCPInstall

tanstack-form

TanStack Form v1 headless form state management for React. Covers field validation (sync/async, debouncing), form submission, array fields, linked fields, form composition patterns, and Standard Schema integration (Zod, Valibot, ArkType, Yup). Use when building forms with complex validation, implementing reusable form components, handling dynamic field lists, managing form state, or integrating validation libraries.

Installs
202
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/oakoss/agent-skills --skill tanstack-form
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads tanstack-form automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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)

FAQ

What does the tanstack-form skill do?

TanStack Form v1 headless form state management for React. Covers field validation (sync/async, debouncing), form submission, array fields, linked fields, form composition patterns, and Standard Schema integration (Zod, Valibot, ArkType, Yup). Use when building forms with complex validation, implementing reusable form components, handling dynamic field lists, managing form state, or integrating validation libraries.

How do I install tanstack-form?

Run npx skills add https://github.com/oakoss/agent-skills --skill tanstack-form in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/tanstack-form/ (personal) or .claude/skills/tanstack-form/ (project).

Which AI agents can use tanstack-form?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is tanstack-form safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains tanstack-form?

It is published by oakoss in oakoss/agent-skills. It has 202 recorded installs.

More from oakoss/agent-skills

View all →

ui-ux-polish

oakoss/agent-skills

Iterative UI/UX polishing workflow for web applications. Use when improving visual polish, refining desktop and mobile UX separately, running iterative enhancement cycles, applying design patterns like glassmorphism or bento grids, or auditing accessibility and WCAG compliance. Use for Stripe-level visual quality, responsive optimization, and design system alignment.

Frontend & Design541 installs

playwright

oakoss/agent-skills

Open the skill to read its SKILL.md instructions.

Testing & QA453 installs

coolify

oakoss/agent-skills

Open the skill to read its SKILL.md instructions.

AI & Agents361 installs

application-security

oakoss/agent-skills

Open the skill to read its SKILL.md instructions.

Security272 installs

find-skills

oakoss/agent-skills

Open the skill to read its SKILL.md instructions.

AI & Agents255 installs

drizzle-orm

oakoss/agent-skills

Open the skill to read its SKILL.md instructions.

Data & Databases238 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs