frontend-form-handling
Use when the user asks to validate a signup form with react-hook-form and Zod, Formik, TanStack Form, VeeValidate, field arrays, controlled vs uncontrolled…
от j4flmao★ 47 звёзд на GitHub
Установить frontend-form-handling в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Frontend Form Handling
Description: Implements form handling — validation, state management, submission, complex field patterns. Triggered by "form handling", "form validation", "React Hook Form", "Formik", "form state", "form submission", "field validation", "form error", "controlled input", "uncontrolled input", "form schema", "Zod validation", "form dirty", "field array".
Version: 2.0.0
Author: j4flmao
License: MIT
Purpose
Build robust, performant forms with proper validation, accessibility, and user experience — minimizing re-renders through uncontrolled inputs while maintaining a single source of truth via schema validation.
Agent Protocol
Trigger
User request includes any of: "form handling", "form validation", "React Hook Form", "Formik", "form state", "form submission", "field validation", "form error", "controlled input", "uncontrolled input", "form schema", "Zod validation", "form dirty", "field array".
Input Context
- Framework (React, Vue, Svelte, vanilla)
- Validation library in use
- Form complexity (simple, multi-step, field arrays)
- UX requirements (validation timing, error display pattern)
Output Artifact
Form implementation with validation schemas and UX patterns.
Response Format
## Strategy
<form-library-selection, validation-schema>
## Implementation
<field-registration, validation, submission code>
## UX Pattern
<validation-timing, error-display, disabled-state>
—
Compression footer: frontend-form-handling/v1 | 3 sections | lib: <selected> | schema: <zod|yup>
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- Validation schema covers all fields including async rules
- Form state (dirty/touched/submitting) properly managed
- Error messages displayed inline per field
- Submit button resets after success, shows errors on failure
- Field arrays support add/remove/reorder
Max Response Length
4096 tokens
Form Architecture / Decision Trees
Library Selection Decision Tree
Form complexity?
|-- Simple (<10 fields, no dynamic fields) -->
| Framework preference?
| |-- React --> React Hook Form (uncontrolled, fast) or Formik (controlled, simpler)
| |-- Vue --> VeeValidate + Zod
| |-- Angular --> Reactive Forms (built-in)
| |-- Svelte --> SvelteKit Forms or Felte
|
|-- Moderate (10-30 fields, field arrays, dependent fields) -->
| |-- React --> React Hook Form + Zod (field arrays, useWatch)
| |-- Framework-agnostic --> TanStack Form
|
|-- Complex (30+ fields, multi-step wizard, dynamic field arrays) -->
| |-- React --> React Hook Form + Zod (persist step data, lazy register)
|
|-- Cross-framework / monorepo -->
|-- TanStack Form (React, Vue, Solid, Svelte)
Validation Strategy Decision Tree
Validation timing?
|-- On change (every keystroke) -->
| Use for: password strength, character count, real-time feedback
| Risk: excessive re-renders, annoying UX for long forms
| Mitigation: only on specific fields, not entire form
|
|-- On blur (when field loses focus) -->
| Use for: most fields (email, name, phone, URL)
| Best for: balance between feedback and interruption
|
|-- On submit (when form is submitted) -->
| Use for: large forms, when you want to avoid premature error display
| Risk: user sees many errors at once, can be overwhelming
|
|-- Hybrid -->
|-- Validate on blur for most fields
|-- Validate on change for password/username
|-- Validate everything on submit
Multi-step Form Decision Tree
Paginated or wizard?
|-- Paginated (all steps visible, scroll-based) -->
| Validity: All fields validated on each "Next" click
| State: Single form, all fields registered
|
|-- Wizard (one step at a time) -->
| Step persistence? -->
| |-- Session only --> sessionStorage (survives refresh)
| |-- Resume later --> API draft save (server-side)
| Step validation? -->
| |-- Validate current step only on "Next"
| |-- Don't re-validate previous steps on "Back"
| Submission? -->
|-- Per-step submit (save as you go) --> API call per step
|-- Final submit only --> Merge all step data, one API call
Workflow
1. Library Selection
- React Hook Form: Large/complex forms with many fields. Uncontrolled inputs minimize re-renders. Best for: performance-sensitive forms, field arrays, multi-step.
- Formik: Simple to moderate forms. Controlled inputs. Best for: small forms where re-render cost is negligible, teams familiar with Formik patterns.
- TanStack Form: Framework-agnostic (React, Vue, Solid, Svelte). Best for: cross-framework projects or when you need form logic outside React.
- Angular Reactive Forms: Angular-native form handling. Best for: Angular
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/form-accessibility.md
- references/form-libraries.md
- references/form-security-patterns.md
- references/form-state.md
- references/form-validation.md
- references/validation-patterns.md
FAQ
Что делает скилл frontend-form-handling?
Use when the user asks to validate a signup form with react-hook-form and Zod, Formik, TanStack Form, VeeValidate, field arrays, controlled vs uncontrolled inputs, form errors or submission UX. Produces schema-validated, accessible forms. Not for server-side validation (use backend-api-design) or general typing helpers (use frontend-typescript-patterns).
Как установить скилл frontend-form-handling?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл frontend-form-handling запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…