frontend-form

Define reusable frontend forms with centralized state, validation, and 422 error handling.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/weiloon1234/Forge-Starter --skill frontend-form-weiloon1234
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-form
Source: https://github.com/weiloon1234/Forge-Starter/tree/main/.claude/skills/frontend-form
Command: npx skills add https://github.com/weiloon1234/Forge-Starter --skill frontend-form-weiloon1234

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Frontend forms are often built with ad-hoc state handling and scattered validation, leading to boilerplate and inconsistent UX. This Skill provides a reusable pattern using a shared useForm hook that owns values, errors, dirty state, and busy flags, with automatic 422 error wiring and field bindings that work across modal, page, and wizard form containers.

Core Features & Use Cases

  • Centralized form state management with useForm, including value, error, dirty, and busy tracking.
  • Field composition using @shared/components primitives (Input, Select, Checkbox, DatePicker, etc.) bound via {...form.field("key")}.
  • Supports Modal form, Page form, and Wizard steps to cover admin CRUD, settings, and multi-step workflows.

Quick Start

Open a page or modal and start a Create/Edit form for a feature.

Frequently Asked Questions about frontend-form

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

FAQPage Schema
How do I reduce boilerplate when building frontend forms with consistent validation?

Reduce frontend form boilerplate by centralizing state, validation, and API interaction within a reusable useForm hook that automatically tracks values, errors, dirty state, and busy flags. This ensures consistent UX and eliminates scattered validation logic across your application.

How do I handle 422 validation errors automatically in a React form?

Handle 422 validation errors automatically by using a shared useForm hook that provides automatic 422 error wiring and field bindings. This binds field responses directly to API requests and errors without requiring manual error parsing for each input.

Can I use the same form validation pattern for modal, page, and wizard workflows?

Yes, you can apply the same centralized form validation pattern across modal, page, and wizard form containers. The useForm hook binds fields using shared UI primitives, supporting admin CRUD, settings, and multi-step workflows consistently.

What's the best way to manage form dirty state and busy flags for API submissions?

Manage form dirty state and busy flags by adopting a centralized useForm hook that owns these states internally. This approach removes ad-hoc state handling and ensures UI primitives reflect accurate submission and modification tracking.

Do I need generated DTOs and API endpoints to bind form fields to requests?

Yes, you need generated DTOs and API endpoints to bind form fields to requests and responses properly. The reusable form pattern requires these alongside shared hooks and components to wire field values and handle automatic 422 errors.

Why does my frontend form have inconsistent UX across different admin pages?

Frontend forms have inconsistent UX when built with ad-hoc state handling and scattered validation. Adopting a reusable pattern with a shared useForm hook standardizes value tracking, error wiring, and UI primitives across all admin interfaces.