form_builder

Builds accessible form components with validation strategies and multi-step workflow patterns.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill form-builder-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: form_builder
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/form_builder
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill form-builder-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires react-hook-form, zod, @hookform/resolvers, pydantic, fastapi, and includes references (resource) components.

What problem does it solve? Building forms that are accessible, well-validated, and user-friendly requires juggling component selection, validation timing, WCAG 2.1 compliance, and UX patterns. This Skill provides systematic guidance so you avoid common mistakes like poor error messages, missing labels, and broken keyboard navigation. ## Core Features & Use Cases - Component Selection Framework: Maps data types (text, numeric, date, boolean, structured) to the correct input components using a decision tree covering 50+ input types. - Validation Strategies: Implements on-blur, on-change, debounced, and progressive validation with React Hook Form + Zod for TypeScript or Pydantic + FastAPI for Python. - Accessibility Compliance: Enforces WCAG 2.1 AA patterns including labels, ARIA attributes, keyboard navigation, and screen reader error announcements. - Use Case: Build a multi-step checkout flow with inline email validation, conditional address fields, and screen-reader-friendly error handling that moves focus to the first invalid field on submit. ## Quick Start Create a registration form with email and password fields using React Hook Form and Zod validation that shows errors on blur and meets WCAG 2.1 accessibility requirements.

Frequently Asked Questions about form_builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add validation to a React form?

Use React Hook Form with the zodResolver to connect a Zod schema defining rules like email format and minimum password length. Set mode to onBlur so fields validate when they lose focus, then display errors via the formState errors object.

When should form validation run: onChange, onBlur, or onSubmit?

On-blur validation is recommended for most forms because it avoids interrupting users while typing. After a field's first error, switch to onChange so corrections show immediate feedback, and use debounced validation for API-based checks like username availability.

React Hook Form vs Formik for form state management?

React Hook Form is recommended here for its smaller 8KB bundle and better performance through uncontrolled inputs. Pair it with Zod for TypeScript-first schema validation rather than managing validation logic manually.

How do I make a form accessible for screen readers?

Associate every input with a label or aria-label, link errors using aria-describedby, and announce validation messages with aria-live regions. Move focus to the first invalid field on submit and never convey errors by color alone.

Can I validate forms in Python with FastAPI?

Yes, define a Pydantic BaseModel with typed fields like EmailStr and Field constraints such as min_length. FastAPI automatically validates incoming request bodies and returns 422 responses with detailed error locations when validation fails.

What input type should I use for single-choice selections?

Use a radio group for 2-7 options, a select dropdown for more than 7 options, and an autocomplete combobox when there are more than 15 options. This keeps the interface scannable and reduces cognitive load.