forms-and-validation
Installation
SKILL.md
Instructions
When to Use
- Use for accessible forms with zod + Server Actions or client submit.
- Prefer
api-handbookfor pure JSON APIs without forms. - Prefer
accessibility-auditfor a full WCAG pass after the form ships.
Build or audit forms with zod and accessible markup.
Decision: Server Action vs client submit vs API
| Situation | Prefer |
|---|---|
| Same-origin App Router mutation | Server Action + useActionState |
| SPA talking to JSON API | Client form → api-handbook Route Handler |
| Progressive enhancement required | Server Action with native form action |
| Multi-step wizard with heavy client UX | Controlled client + shared zod schema |