# formik-patterns

formik-patterns adds Formik form recipes to Claude: Yup schemas, field handlers, a submit flow and multi-step forms.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 6091 repo stars
- Author: ChrisWiles
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ChrisWiles/claude-code-showcase/tree/HEAD/.claude/skills/formik-patterns/SKILL.md
- Updated: 2026-01-06
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/formik-patterns

## What it does

The skill hands Claude working Formik recipes. Basic setup is `useFormik` with a Yup `validationSchema`, `handleChange` and `handleBlur` wired per field, and errors shown only once a field has been touched. Schema snippets cover email, password rules, matching confirmation via `yup.ref`, phone numbers and numeric ranges.

Conditional rules use `when`. Submission goes through a GraphQL mutation with `setSubmitting` cleared in `finally`, and the edit form uses `enableReinitialize` plus a button gated on `dirty`. A `getFieldProps` helper spreads the right props onto a field. Multi-step flows keep the step index in `useState` and swap the schema per step.

The markup assumes `Input`, `Button` and `VStack` components with props such as `onChangeText` and `isDisabled`. Plain `<input>` elements mean rewriting the examples. Both `formik` and `yup` have to be in the project already.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add ChrisWiles/claude-code-showcase --skill formik-patterns -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add ChrisWiles/claude-code-showcase --skill formik-patterns -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add ChrisWiles/claude-code-showcase --skill formik-patterns -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install ChrisWiles/claude-code-showcase .claude/skills/formik-patterns
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add ChrisWiles/claude-code-showcase --skill formik-patterns -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/ChrisWiles/claude-code-showcase --path .claude/skills/formik-patterns
```

### Windsurf (Devin Desktop)

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

### 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/ChrisWiles/claude-code-showcase/tree/HEAD/.claude/skills/formik-patterns/SKILL.md

## When to use it
- build a login form with email and password validation
- show a field error only after the user leaves the input
- check that password and confirmation match
- submit form values through a GraphQL mutation and clear the loading state
- split a long form into steps with a separate schema per step

## Example prompts
- Build a signup form with `useFormik` and a Yup schema for email, password and confirmation.
- Rework the edit form so new values come in through `enableReinitialize` and Save stays disabled until `dirty`.
- Split the checkout into three steps, each with its own validation schema.

## Similar
- [form-wizard-builder](https://affpapa.org/en/nevibecode/skills/form-wizard-builder.md) — skill · 344 installs
- [form-validation](https://affpapa.org/en/nevibecode/skills/form-validation.md) — skill · 507 installs
- [mantine-form](https://affpapa.org/en/nevibecode/skills/mantine-form.md) — skill · 2900 installs
- [react-hook-form-zod](https://affpapa.org/en/nevibecode/skills/react-hook-form-zod.md) — skill · 725 installs
- [tanstack-form](https://affpapa.org/en/nevibecode/skills/oakoss-tanstack-form.md) — skill · 222 installs
- [form-validation-architect](https://affpapa.org/en/nevibecode/skills/form-validation-architect.md) — skill · 205 installs

From the same set: [chriswiles/claude-code-showcase](https://affpapa.org/en/nevibecode/by/chriswiles/claude-code-showcase.md) — 11 cards

---
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
