Introduction¶
Once business forms have many fields, common problems tend to accumulate: difficulty integrating controlled components and third-party UI libraries, dynamic add/delete rows, cross-field validation, file upload constraints, multi-step flows, and lag caused by full-table re-rendering during input. If the team lacks unified conventions, Agents are prone to outputting snippets like “just write TypeScript types, not runtime schema” or “introduce another form library,” which conflicts with the existing repository stack.
Below is an introduction to @bovinphang/fec-form-handling on SkillHub (coordinate @user_15292d5a/yjkj-fec-form-handling, current version 2.5.0). It uses the standard SKILL.md to constrain Agents: first judge complexity and project stack, then organize validation, accessibility, and submission status along paths like React Hook Form + Zod, etc. For complex modes, refer to the advanced documentation included with the package.
What is it¶
@bovinphang/fec-form-handling is categorized under dev-programming, sourced from community, published by user_15292d5a, tag requires_api_key=false, no API key required.
One-sentence positioning: Enable when “heavy” frontend forms are being built or reviewed, covering React Hook Form, Zod schema, typed validation, dynamic fields, third-party controlled inputs, file uploads, multi-step flows, dependency validation, and form performance; not suitable for simple forms with only 1-3 fields and almost no validation.
Official page: SkillHub - @bovinphang/fec-form-handling
Skill metadata address: https://api.skillhub.cn/user_15292d5a/yjkj-fec-form-handling
Core Features¶
The following content is consistent with the SkillHub introduction and SKILL.md inside the skill package and can be trimmed for specific use cases.
Complexity and Stack Identification¶
The Agent should first identify: framework, existing form library, schema validation library, component library, and form complexity. Introduce specialized solutions only when: there are about 10+ fields, dynamic fields, linked validation, file uploads, multi-step flows, or obvious input lag.
Selection examples based on stack:
| Scenario | Suggested Direction |
|---|---|
| React Complex Forms | React Hook Form + Zod |
| Vue Complex Forms | vee-validate / FormKit + Zod, Yup, or Valibot |
| Simple Forms | Framework native state + basic validation |
Validation and Types¶
- Use runtime schema or explicit validation functions to enforce external input boundaries; TypeScript types should be inferred from schema (e.g.,
z.infer), not just written as TS types. - Conventions for complete
defaultValues, field registration methods, controlled/uncontrolled boundaries, and component library adaptation. - Error messages paired with
aria-invalid,aria-describedby,role="alert".
Submission and Performance¶
Handle loading, server errors, duplicate submission prevention, and reset; for large forms, control re-rendering through partial subscriptions or sub-component isolation.
Advanced Topics (Referenced Documentation)¶
When involving whether to use a form library, framework selection, Controller, useFieldArray, linked validation, file uploads, multi-step forms, async validation, and performance patterns, the skill requires loading references/advanced-form-patterns.md included in the package.
Constraints and Expected Output¶
Built-in constraints include: inheriting existing form/schema/component library solutions from the repository, not introducing a second system for a single form; defaultValues must be complete; reset should accept the server response or an explicit full default object; async validation needs debouncing or be placed at the submission boundary; Zod dynamic linked validation error path must point to the real field.
Expected output: type safety, accessibility, clear submission state; complex fields and uploads have schema constraints; no obvious lag during input; server errors can be filled back into user-understandable locations.
Installation and Activation¶
SkillHub page instructions: see skillhub.cn/install/skillhub.md.
1. Install SkillHub CLI (if not already installed)¶
command -v skillhub && skillhub --version
If not installed, execute full installation (CLI + default Skill):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
For CLI only:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
2. Install this skill¶
When installing, you must use --dir to point to the current Agent’s skills directory, otherwise it defaults to ./skills/ which might not be recognized.
skillhub install @user_15292d5a/yjkj-fec-form-handling --dir <skills directory>
Common skills directories for Agents (excerpted from official installation documentation):
| Environment | Directory |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ under project |
After installation, restart or refresh the skill list according to the instructions for the Agent you are using. As of data scraping, SkillHub shows the skill downloaded approximately 641 times and installed 0 (subject to real-time data on the page).
Typical Usage¶
After enabling the skill, the Agent will answer according to the process in SKILL.md. A quick start example for a React stack is below (consistent with the skill package, fields and copy can be replaced according to the project).
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
import { z } from "zod";
const loginSchema = z.object({
email: z.string().email("Please enter a valid email address"),
password: z.string().min(8, "Password must be at least 8 characters"),
});
type LoginForm = z.infer<typeof loginSchema>;
export function LoginFormView() {
const {
register,
handleSubmit,
formState: { errors, isSubmitting },
} = useForm<LoginForm>({
resolver: zodResolver(loginSchema),
defaultValues: { email: "", password: "" },
});
return (
<form onSubmit={handleSubmit((data) => api.login(data))} noValidate>
<label htmlFor="email">Email</label>
<input id="email" {...register("email")} aria-invalid={!!errors.email} />
{errors.email && <span role="alert">{errors.email.message}</span>}
<label htmlFor="password">Password</label>
<input id="password" type="password" {...register("password")} />
{errors.password && <span role="alert">{errors.password.message}</span>}
<button disabled={isSubmitting}>
{isSubmitting ? "Submitting..." : "Submitting"}
</button>
</form>
);
}
When third-party controlled components (Select, DatePicker, etc.) are needed, the skill’s advanced documentation suggests using Controller to wrap and pass through field / fieldState; dynamic rows use useFieldArray and use field.id as the React key; cross-field rules use Zod refine / superRefine and explicitly specify path; file fields constrain type and size in schema, use FormData on the submission side, and do not serialize File as JSON.
Suitable Scenarios and Notes¶
Suitable:
- Building or reviewing large-scale business forms in a new project or during Code Review, where the stack is mainly React Hook Form + Zod or the Vue solutions listed in the documentation.
- When form design, validation strategy, dynamic fields, multi-step flows, upload and performance requirements appear in the conversation, and you want the Agent to output code and checkpoints consistent with the repository stack and actionable.
Not Suitable:
- Forms with only a few fields and no complex validation; the skill description explicitly suggests using native state in this case.
Notes:
- The skill emphasizes “not introducing a second form system”, so the Agent still needs you to provide or let it read the existing libraries and encapsulation methods in the project.
- Community-sourced skills: check version history and file list on SkillHub before use to confirm compatibility with local frontend stack versions.
- Statistics like ratings and download counts are based on the SkillHub page and will change over time.
Conclusion¶
@bovinphang/fec-form-handling translates “whether to use a form library, how to integrate Zod, where to look for complex patterns” into executable steps and constraints for Agents, suitable for activating during complex form requirements or reviews, reducing fragmented solutions and conflicts with repository conventions.
Official entry: https://www.skillhub.cn/skills/user_15292d5a/yjkj-fec-form-handling