form-validation — Claude Code skill: what it does, how to install
Guides client-side form validation and server synchronization with TypeScript typing. Useful for multi-step flows and instant error messaging.
npx skills add aj-geddes/useful-ai-prompts --skill form-validation -a claude-codeWhat form-validation does
The skill provides reference implementations for user input checks, real-time feedback, and submission workflows. It contains targeted guides for React Hook Form, Formik with Yup schemas, and Vee-Validate in Vue projects. For bespoke logic, it documents how to build a custom validator hook.
All patterns rely on TypeScript interfaces for type safety. Without installing the respective packages like react-hook-form or yup into your project, the suggested code cannot run.
What it helps with
- validate user input with React Hook Form and TypeScript
- configure Formik schemas using Yup
- handle Vue form fields with Vee-Validate
- sync client form state with server-side validation responses
Example prompts for the agent
- Create a registration form with email and password checks using React Hook Form
- Set up a login form validated with Formik and Yup
- Write a custom validation hook for a multi-step checkout form
How to install form-validation
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill form-validation -a claude-code2Manually: put the files in place
~/.claude/skills/form-validation/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/form-validation/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill form-validation -a codex2Manually: put the files in place
.agents/skills/form-validation/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill form-validation -a cursor2Manually: put the files in place
.cursor/skills/form-validation/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts form-validation2Manually: put the files in place
.github/skills/form-validation/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill form-validation -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/form-validationManually: put the files in place
.devin/skills/form-validation/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill form-validation -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about form-validation
How to install form-validation in Claude Code?
Run npx skills add aj-geddes/useful-ai-prompts --skill form-validation -a claude-code. It installs the skill file to ~/.claude/skills/form-validation/SKILL.md.
What libraries are covered by form-validation?
It includes guides for React Hook Form, Formik paired with Yup, Vee-Validate for Vue, and custom React hooks.
Does it support server-side validation?
Yes, it includes reference material on integrating backend validation responses with client-side form state.
Source text
SKILL.md · MIT
---
name: form-validation
description: >
Implement form validation using React Hook Form, Formik, Vee-Validate, and
custom validators. Use when building robust form handling with real-time
validation.
---
# Form Validation
## Table of Contents
- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)
## Overview
Implement comprehensive form validation including client-side validation, server-side synchronization, and real-time error feedback with TypeScript type safety.
## When to Use
- User input validation
- Form submission handling
- Real-time error feedback
- Complex validation rules
- Multi-step forms
## Quick Start
Minimal working example:
```typescript
// types/form.ts
export interface LoginFormData {
email: string;
password: string;
rememberMe: boolean;
}
export interface RegisterFormData {
email: string;
password: string;
confirmPassword: string;
name: string;
terms: boolean;
}
// components/LoginForm.tsx
import { useForm, SubmitHandler } from 'react-hook-form';
import { LoginFormData } from '../types/form';
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
export const LoginForm: React.FC = () => {
const {
register,
handleSubmit,
// ... (see reference guides for full implementation)
```
## Reference Guides
Detailed implementations in the `references/` directory:
| Guide | Contents |
|---|---|
| [React Hook Form with TypeScript](references/react-hook-form-with-typescript.md) | React Hook Form with TypeScript |
| [Formik with Yup Validation](references/formik-with-yup-validation.md) | Formik with Yup Validation |
| [Vue Vee-Validate](references/vue-vee-validate.md) | Vue Vee-Validate |
| [Custom Validator Hook](references/custom-validator-hook.md) | Custom Validator Hook |
| [Server-Side Validation Integration](references/server-side-validation-integration.md) | Server-Side Validation Integration |
## Best Practices
### ✅ DO
- Follow established patterns and conventions
- Write clean, maintainable code
- Add appropriate documentation
- Test thoroughly before deploying
### ❌ DON'T
- Skip testing or validation
- Ignore error handling
- Hard-code configuration values
© aj-geddes · MIT · aj-geddes/useful-ai-prompts