# form-refactorer

form-refactorer rewrites legacy forms to Field components from Redpanda UI Registry with Zod validation and react-hook-form state management.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1 install · ★ 4353 repo stars
- Author: redpanda-data
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/redpanda-data/console/tree/HEAD/frontend/.claude/skills/form-refactorer/SKILL.md
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/form-refactorer

## What it does

The skill replaces outdated form patterns with a structured architecture: `Field`, `FieldLabel`, `FieldError` components instead of legacy wrappers, Zod schemas instead of Yup, `zodResolver` to wire up react-hook-form. It includes a verification checklist (whether every `FieldLabel` has `htmlFor`, whether errors render via `FieldError`, whether Yup is gone) and code patterns for vertical and horizontal field layouts.

Handles dynamic fields, field arrays and multi-section forms via `FieldSet` and `FieldLegend`. No FFmpeg or Python needed — this is pure React refactoring. Triggers: requests to modernize forms, migrate to Field components, or replace legacy patterns.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add redpanda-data/console --skill form-refactorer -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/form-refactorer/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/form-refactorer/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add redpanda-data/console --skill form-refactorer -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/form-refactorer/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add redpanda-data/console --skill form-refactorer -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/form-refactorer/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install redpanda-data/console frontend/.claude/skills/form-refactorer
```

2. **Manually: put the files in place**
- File: `.github/skills/form-refactorer/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add redpanda-data/console --skill form-refactorer -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/redpanda-data/console --path frontend/.claude/skills/form-refactorer
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/form-refactorer/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add redpanda-data/console --skill form-refactorer -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/redpanda-data/console/tree/HEAD/frontend/.claude/skills/form-refactorer/SKILL.md

## When to use it
- rewrite a form using Field components and Zod
- replace Yup schemas with Zod and zodResolver
- group related fields semantically with FieldSet
- render validation errors via FieldError
- remove deprecated Form imports and legacy wrappers

## Example prompts
- Update the topic creation form: use `Field`, `FieldLabel`, `FieldError` and Zod for validation
- Refactor the settings form — replace old components with `FieldSet` and `react-hook-form`
- Rewrite the signup form: add `FieldDescription`, `FieldSeparator` and a Zod schema

## Similar
- [react-hook-form-zod](https://affpapa.org/en/nevibecode/skills/react-hook-form-zod.md) — skill · 725 installs
- [form-validation-architect](https://affpapa.org/en/nevibecode/skills/form-validation-architect.md) — skill · 205 installs
- [safe-action-forms](https://affpapa.org/en/nevibecode/skills/safe-action-forms.md) — skill · 1300 installs
- [react-hook-form-audit](https://affpapa.org/en/nevibecode/skills/react-hook-form-audit.md) — skill · 158 installs
- [tanstack-form](https://affpapa.org/en/nevibecode/skills/tanstack-form.md) — skill · 4500 installs
- [mantine-form](https://affpapa.org/en/nevibecode/skills/mantine-form.md) — skill · 2900 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
