/fuse-nextjs:nextjs-tanstack-formfrom fuse-nextjs
Builds forms in Next.js 16 with TanStack Form v1, covering Server Actions, Zod validation, multi-step wizards, and field arrays. Useful for complex form UIs with type-safe validation.
Ships in fuse-nextjs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Covers the Field API (state + handlers), validation timing (onChange/onBlur/onSubmit/onServer), dynamic field arrays and multi-step wizards, debounced async validation, and shadcn/ui field composition. Also documents SOLID file organization for forms (form-options.ts, FormComponent.tsx, form.action.ts) and a comparison against React Hook Form. This is the Next.js Server Actions variant of TanStack Form — for a plain React app without Next.js see the react-forms skill.
Type-safe, performant forms with Server Actions and signal-based reactivity.
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
After implementation, run fuse-ai-pilot:sniper for validation.
| Feature | Benefit |
|---|---|
| Signal-based state | Minimal re-renders, optimal performance |
| Full TypeScript | DeepKeys, DeepValue inference |
| Server Actions native | Built-in Next.js 16 integration |
| Standard Schema (Zod, Valibot…) | Schema-first validation, no adapter needed |
| Framework agnostic | Same API for React, Vue, Solid |
| Headless | Works with any UI library (shadcn/ui) |
onServerValidate, not clientmodules/[feature]/src/components/forms/Forms organized by feature module:
modules/auth/src/components/forms/ - Auth forms (login, signup)modules/auth/src/interfaces/ - Form types and schemasmodules/auth/src/actions/ - Server Actions for form submissionmodules/cores/lib/forms/ - Shared form utilities| File | Purpose |
|---|---|
form-options.ts | Shared formOptions + Zod schema |
FormComponent.tsx | Client form UI with fields |
form.action.ts | Server Action with validation |
form.interface.ts | Types for form values |
Define form configuration once, share between client and server. Ensures type safety and consistency.
Each field has state (value, errors, touched, validating) and handlers (handleChange, handleBlur).
Errors exist at field-level and form-level. Use field.state.meta.errors for field errors, form.state.errorMap for form errors.
| Need | Reference |
|---|---|
| Initial setup | installation.md |
| Basic patterns | basic-usage.md, field-api.md |
| Validation | validation-zod.md, async-validation.md |
| Server Actions | server-actions.md |
| Dynamic forms | array-fields.md, multi-step-form.md |
| UI integration | shadcn-integration.md |
| TypeScript | typescript.md |
| Migration | migration-rhf.md |
| Client-side form component | client-form.md — load when wiring useActionState + mergeForm in a 'use client' form component |
| Server-side validation | server-validation.md — load when writing createServerValidate + ServerValidateError in a Server Action |
asyncDebounceMs for API callsmergeForm to show server validation errors| Aspect | TanStack Form | React Hook Form |
|---|---|---|
| Type Safety | 100% (DeepKeys) | Manual typing |
| Performance | Signals (minimal) | Refs (good) |
| Server Actions | Native support | Manual integration |
| Bundle Size | ~12KB | ~9KB |
| Learning Curve | Medium | Low |
| Use Case | Complex apps | Standard forms |
references/array-fields.md (opens in a new tab)references/async-validation.md (opens in a new tab)references/basic-usage.md (opens in a new tab)references/client-form.md (opens in a new tab)references/field-api.md (opens in a new tab)references/form-state.md (opens in a new tab)references/installation.md (opens in a new tab)references/migration-rhf.md (opens in a new tab)references/multi-step-form.md (opens in a new tab)references/performance.md (opens in a new tab)references/server-actions.md (opens in a new tab)references/server-validation.md (opens in a new tab)references/shadcn-integration.md (opens in a new tab)references/testing.md (opens in a new tab)references/typescript.md (opens in a new tab)references/validation-zod.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
11 skills in this plugin
/better-authUse when implementing Next.js authentication with Better Auth — OAuth, 2FA, magic links, SSO, Stripe billing, or session management./nextjs-16Use when building Next.js 16 apps — Turbopack, App Router, Cache Components, proxy.ts, v15 migration. Not for stack scaffolding (nextjs-stack) or React SPA (react-expert)./nextjs-i18nUse when implementing i18n in Next.js 16 — next-intl or DIY dictionaries, locale routing, language switch, or formatters.npx claudepluginhub fusengine/claude-plugins --plugin fuse-nextjsOther plugins' skills for the same job