/react-ko-form:form-builder <form description: e.g., login form with email and password>from react-ko-form
Generates complete, typed React Hook Form components from natural language field descriptions. Scaffolds forms with validation and type-safe interfaces.
Ships in react-ko-form. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate a complete, typed React Hook Form component from a plain-language description.
Before generating code, always verify API options from local docs:
${CLAUDE_SKILL_DIR}/docs/docs/useform/register.mdx${CLAUDE_SKILL_DIR}/docs/docs/useform.mdx — skip the first 79 lines (SelectNav navigation component, content starts at line 80)<TypeText>T</TypeText> or <TypeText pre>T</TypeText> — inline type annotation. Read the text content as the TypeScript type.<PrettyObject value={{key: 'type', ...}}/> — renders a type shape. Read the value prop as the type definition.<TabGroup buttonLabels={["X", "Y"]}> — tabbed content with alternative views (e.g., TS vs JS). Read all tabs as variants.<Admonition type="note|important|tip" title="..."> — callout block. Always read; contains critical rules or caveats.<SelectNav options={[...]}> — navigation menu. Skip for content purposes.<CodeArea> — code display component. Read the code content within.<Popup message="..."> — tooltip hint. The message prop contains supplementary info.<div style={...}>, import ..., export ... statements.Arguments provided → parse field definitions → follow the Code Generation Workflow below.
No arguments → show the following examples and ask the user to describe their form:
Usage examples:
/react-ko-form:form-builder login form with email and password
/react-ko-form:form-builder registration with name, email, password (min 8), confirm password, and terms checkbox
/react-ko-form:form-builder contact form with name, email, phone (optional), and message (textarea)
Describe your form and I'll generate the complete TypeScript component.
Extract from the natural language description:
Read both files to verify current API options before generating:
${CLAUDE_SKILL_DIR}/docs/docs/useform/register.mdx — validation rule options${CLAUDE_SKILL_DIR}/docs/docs/useform.mdx (from line 80) — useForm optionsProduce all of the following in order:
interface for form field typesuseForm<T>() hook setup with appropriate optionsregister() calls with validation rulesformState.errors error handling for each validated fieldhandleSubmit + onSubmit functionFor forms with more than 8 fields: generate the TypeScript interface and useForm setup first, then ask the user to confirm before generating the full JSX.
| Field Type | Validation Rules |
|---|---|
{ required: "Email is required", pattern: { value: /\S+@\S+\.\S+/, message: "Invalid email" } } | |
| password | { required: "Password is required", minLength: { value: 8, message: "At least 8 characters" } } |
| confirm password | { validate: (value, formValues) => value === formValues.password || "Passwords do not match" } |
| phone | { pattern: { value: /^\+?[0-9\s\-()]{7,15}$/, message: "Invalid phone number" } } |
| number | { min: 0, max: 999, valueAsNumber: true } |
| URL | { pattern: { value: /^https?:\/\/.+/, message: "Invalid URL" } } |
| required checkbox | { required: "You must accept the terms" } |
| textarea | { required: "Message is required", maxLength: { value: 500, message: "Max 500 characters" } } |
useFieldArray has no MDX documentation. When dynamic fields are requested:
${CLAUDE_SKILL_DIR}/examples/useFieldArray.ts and ${CLAUDE_SKILL_DIR}/examples/useFieldArrayArgument.tsuseFieldArray({ control, name }) returns { fields, append, remove, prepend, swap, move, insert, update, replace }field.id as key (not array index)append(): append({ name: "", quantity: 1 })register(`items.${index}.name`)Given: "login form with email and password"
import { useForm } from "react-hook-form";
interface LoginFormValues {
email: string;
password: string;
}
export function LoginForm() {
const {
register,
handleSubmit,
formState: { errors },
} = useForm<LoginFormValues>({ mode: "onBlur" });
const onSubmit = (data: LoginFormValues) => console.log(data);
return (
<form onSubmit={handleSubmit(onSubmit)}>
<div>
<label htmlFor="email">Email</label>
<input
id="email"
type="email"
{...register("email", {
required: "Email is required",
pattern: { value: /\S+@\S+\.\S+/, message: "Invalid email" },
})}
/>
{errors.email && <span>{errors.email.message}</span>}
</div>
{/* Repeat the pattern above for each field */}
<button type="submit">Submit</button>
</form>
);
}
useForm<FormType>)/react-ko-form:recommend/react-ko-form:guide <api-name>Based on react-hook-form v7.x documentation.
docs/advanced-usage.mdx (opens in a new tab)docs/docs/createFormControl.mdx (opens in a new tab)docs/docs/formprovider.mdx (opens in a new tab)docs/docs/usecontroller/controller.mdx (opens in a new tab)docs/docs/useform.mdx (opens in a new tab)docs/docs/useform/clearerrors.mdx (opens in a new tab)docs/docs/useform/control.mdx (opens in a new tab)docs/docs/useform/form.mdx (opens in a new tab)docs/docs/useform/formstate.mdx (opens in a new tab)docs/docs/useform/getfieldstate.mdx (opens in a new tab)docs/docs/useform/getvalues.mdx (opens in a new tab)docs/docs/useform/handlesubmit.mdx (opens in a new tab)docs/docs/useform/register.mdx (opens in a new tab)docs/docs/useform/reset.mdx (opens in a new tab)docs/docs/useform/resetfield.mdx (opens in a new tab)docs/docs/useform/seterror.mdx (opens in a new tab)docs/docs/useform/setfocus.mdx (opens in a new tab)docs/docs/useform/setvalue.mdx (opens in a new tab)docs/docs/useform/subscribe.mdx (opens in a new tab)docs/docs/useform/trigger.mdx (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
3 skills in this plugin
/guideReact Hook Form installation, setup, and hook usage guide. Use when the user asks how to install, configure, or use react-hook-form in their project./recommendRecommend the right React Hook Form API or pattern for your use case. Use when the user asks which hook, component, or pattern to use for a specific form requirement.npx claudepluginhub hamsurang/react-ko-form --plugin react-ko-form