一键导入
guide
React 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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
React 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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate complete React Hook Form code from natural language field definitions. Use when the user wants to scaffold a typed form with validation and error handling.
Recommend 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.
| name | guide |
| description | React 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. |
| argument-hint | <topic: e.g., useForm, validation, getting started> |
| allowed-tools | Read, Glob, Grep |
react-hook-form evolves across versions. Always verify from local docs rather than relying on memorized instructions. The docs in this skill directory are the source of truth.
Version note: Based on react-hook-form v7.x documentation.
The docs use custom JSX components. Interpret them as follows:
<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.You are a react-hook-form guide. Use $ARGUMENTS to determine the scope of your response.
| Input | Action |
|---|---|
| Empty / "getting started" / "how to install" | Full getting-started guide |
Hook name (useForm, register, useController, useFieldArray, useFormState, useWatch, useFormContext, useLens) | API deep-dive for that hook |
Concept (validation, error handling, controlled, schema, TypeScript) | Search advanced-usage + faqs for relevant sections |
Getting started (no arguments or install/setup questions):
${CLAUDE_SKILL_DIR}/docs/get-started.mdx — installation, basic setup, first form${CLAUDE_SKILL_DIR}/docs/docs/useform.mdx from line 80 — useForm overview (skip first 79 lines of SelectNav)Hook-specific topics:
useForm → ${CLAUDE_SKILL_DIR}/docs/docs/useform.mdx (from line 80) and subdirectory files in ${CLAUDE_SKILL_DIR}/docs/docs/useform/ (including subscribe subpage)useController → ${CLAUDE_SKILL_DIR}/docs/docs/usecontroller/ filesuseFieldArray → no dedicated MDX. Search ${CLAUDE_SKILL_DIR}/docs/advanced-usage.mdx for mentions, and check ${CLAUDE_SKILL_DIR}/examples/useFieldArray.ts and useFieldArrayArgument.ts for usage patternsuseFormState → ${CLAUDE_SKILL_DIR}/docs/docs/useformstate.mdx and ${CLAUDE_SKILL_DIR}/docs/docs/useformstate/useWatch → ${CLAUDE_SKILL_DIR}/docs/docs/usewatch.mdx and ${CLAUDE_SKILL_DIR}/docs/docs/usewatch/useFormContext / FormProvider → ${CLAUDE_SKILL_DIR}/docs/docs/useformcontext.mdx and ${CLAUDE_SKILL_DIR}/docs/docs/formprovider.mdxuseLens → ${CLAUDE_SKILL_DIR}/docs/docs/uselens.mdxConcept topics:
validation, schema, resolver → ${CLAUDE_SKILL_DIR}/docs/get-started.mdx (Schema Validation section) + ${CLAUDE_SKILL_DIR}/docs/advanced-usage.mdxerror handling, errors → ${CLAUDE_SKILL_DIR}/docs/get-started.mdx + ${CLAUDE_SKILL_DIR}/docs/docs/useform/ (formstate subpage)TypeScript → ${CLAUDE_SKILL_DIR}/docs/ts.mdxcontrolled components, Controller → ${CLAUDE_SKILL_DIR}/docs/get-started.mdx + ${CLAUDE_SKILL_DIR}/docs/docs/usecontroller/FAQ or general questions → ${CLAUDE_SKILL_DIR}/docs/faqs.mdxadvanced patterns → ${CLAUDE_SKILL_DIR}/docs/advanced-usage.mdxCode examples directory: ${CLAUDE_SKILL_DIR}/examples/ — reference .ts / .tsx files by name when showing usage patterns.
Structure your output using these sections. Omit sections that are not relevant to the topic.
1–2 sentences summarizing the topic.
Installation command, required imports, and any prerequisites (e.g., resolver packages for schema validation).
Core API with a concise code example drawn from the local docs or examples directory. Prefer TypeScript variants when showing code.
Relevant options table extracted from the docs. Include type, default value, and description columns where available.
2–4 practical patterns from advanced-usage.mdx or the examples directory that address the topic.
Caveats surfaced from <Admonition> blocks in the docs. These are load-bearing — always include them when present.
register or Controller?"), suggest /react-ko-form:recommend instead./react-ko-form:form-builder instead.