W Form

blockmatic/basilic-skills/skills/workflow/w-form

by blockmatic7e05e2abd052dc6b526e8a28e36d102d42bfd635No license1 starsListed Oct 9, 2026Updated Oct 9, 2026Repository updated 6 days ago

Build a Next.js form using the app's existing mutation path, not a second stack.

Instructions onlySoftware Development
AI-generated overview

Implements a Next.js form using the app's existing mutation path and shared Zod validation.

What it does
This skill guides an agent through adding a form to an existing Next.js app. It instructs the agent to inspect how neighboring forms submit and reuse that same mutation path, share one Zod schema for client and server validation, and wire accessible labels, errors, pending, and empty/error/success states with existing UI primitives. It also covers running lint and exercising submit, validation failure, and keyboard paths, plus updating docs if behavior or commands changed.
When to use it
Use when a form needs to be added to a Next.js application that already has an established mutation pattern. It is intended for cases where consistency with existing submission flows matters more than introducing new form APIs.
Requirements
Requires a Next.js app with existing UI primitives and a Zod schema setup; references the next-v16 and shadcn-v3 conventions and an optional /w-docs step. Ships no scripts; instructions only.

Implement a form in the current Next app. Follow next-v16 and shadcn-v3. If the app already mutates through an API client (Fastify + TanStack Query), do not introduce Server Actions, useFormStatus, or useOptimistic for those flows.

  1. Inspect how neighboring forms submit. Reuse that path.
  2. Share one Zod schema for client UX and server validation.
  3. Wire accessible labels, errors, pending, and empty/error/success states with existing UI primitives.
  4. Run lint and exercise submit, validation failure, and keyboard path.
  5. Docs: /w-docs if behavior or commands changed.

Source and attribution

Source:blockmatic/basilic-skillsinskills/workflow/w-format commit7e05e2a

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal