form-refactorer
БесплатноБез исполняемых скриптовНе проверенRefactor legacy forms to use modern Redpanda UI Registry Field components with react-hook-form and Zod validation. Use when user requests: (1) Form…
Об этом скилле
Form Refactorer
Refactor legacy forms to modern Redpanda UI Registry Field components with react-hook-form and Zod validation.
Core Requirements
MUST USE (Modern Pattern)
- Field component family from
components/redpanda-ui/components/field - react-hook-form for form state management
- Zod for validation schemas via
zodResolver
FORBIDDEN (Legacy Patterns)
See no-legacy for prohibited patterns. Also never import Form from components/redpanda-ui/components/form.
Component Hierarchy
FieldSet - Semantic fieldset container for related fields
├─ FieldLegend - Title for the fieldset
├─ FieldDescription - Description for entire fieldset
└─ FieldGroup - Layout wrapper that stacks fields
├─ Field - Individual field wrapper
│ ├─ FieldLabel - Label for input (use htmlFor)
│ ├─ Input/Select/... - Form control
│ ├─ FieldDescription - Helper text
│ └─ FieldError - Error message
├─ FieldSeparator - Visual divider between fields
└─ Field - Another field
Key Patterns
Vertical field:
<Field data-invalid={!!errors.fieldName}>
<FieldLabel htmlFor="fieldName">Label</FieldLabel>
<Input id="fieldName" {...register("fieldName")} aria-invalid={!!errors.fieldName} />
{errors.fieldName && <FieldError>{errors.fieldName.message}</FieldError>}
</Field>
Horizontal field (switch/checkbox):
<Field orientation="horizontal">
<Switch id="toggle" {...register("toggle")} />
<FieldContent>
<FieldLabel htmlFor="toggle">Enable Feature</FieldLabel>
<FieldDescription>Description</FieldDescription>
</FieldContent>
</Field>
Checklist
Before completing refactoring, verify:
- All legacy form imports removed (the legacy
Formcomponent) - Field components used for all fields
- FieldLabel has
htmlFormatching Inputid - Errors show
data-invalidon Field andaria-invalidon Input - Yup replaced with Zod + zodResolver
- FieldSet + FieldLegend used for semantic grouping
- FieldError conditionally rendered:
{errors.field && <FieldError>... - Form submission handled via react-hook-form
handleSubmit
References
- Common Patterns — Dynamic fields, field arrays, multi-section forms, pitfalls, Zod patterns
- Field Component Docs
Установить form-refactorer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл form-refactorer?
Refactor legacy forms to use modern Redpanda UI Registry Field components with react-hook-form and Zod validation. Use when user requests: (1) Form refactoring or modernization, (2) Updating forms to use Field components, (3) Migrating from legacy form patterns, (4) Implementing forms with react-hook-form and Zod validation.
Как установить скилл form-refactorer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл form-refactorer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This 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…
от Anthropic