Skip to content
Skills Library
Programming · Building & coding

forms

/forms

Form architecture skill. Multi-step wizards, validation (client + server, async), file uploads, accessible form design. Triggers on: /godmode:forms, "form validation", "multi-step form", "wizard", "file upload", "form accessibility".

Repository
godmode ↗
Licence
MIT
Last repository change
28.08.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
1
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 28.08.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.

What it does and when to use it

Form architecture skill. Multi-step wizards, validation (client + server, async), file uploads, accessible form design. Triggers on: /godmode:forms, "form validation", "multi-step form", "wizard", "file upload", "form accessibility".

Triggers from the description

form validationmulti-step formwizardfile uploadform accessibility
Original author description

Form architecture skill. Multi-step wizards, validation (client + server, async), file uploads, accessible form design. Triggers on: /godmode:forms, "form validation", "multi-step form", "wizard", "file upload", "form accessibility".

How it works

  1. Activate When
  2. Workflow
  3. Key Behaviors
  4. HARD RULES
  5. Auto-Detection
  6. Output Format
  7. TSV Logging
  8. Keep/Discard Discipline
  9. Stop Conditions
  10. Error Recovery
Original SKILL.md headings · 221 lines, 891 words
SKILL.md preview
---
name: forms
description: |
  Form architecture skill. Multi-step wizards,
  validation (client + server, async), file uploads,
  accessible form design. Triggers on: /godmode:forms,
  "form validation", "multi-step form", "wizard",
  "file upload", "form accessibility".
---

# Forms — Form Architecture

## Activate When
- User invokes `/godmode:forms`
- User says "form validation", "multi-step form", "wizard"
- When building any form beyond a simple single input
- When handling file uploads or auditing form a11y

## Workflow

### Step 1: Assess Form Requirements

```bash
# Detect form libraries
grep -l "react-hook-form\|formik\|@hookform" \
  package.json 2>/dev/null

# Detect validation libraries
grep -l "zod\|yup\|joi\|superstruct" \
  package.json 2>/dev/null

# Count existing form components
find src/ -name "*form*" -o -name "*Form*" \
  2>/dev/null | wc -l
```

```
FORM REQUIREMENTS:
Purpose: <registration/checkout/settings/survey>
Framework: <React/Vue/Angular/Svelte>
Fields: <N> total
Multi-step: YES/NO (<N> steps)
File uploads: YES/NO (<types, max size>)
Async validation: YES/NO (uniqueness checks)

IF fields > 5: use React Hook Form (not useState)
IF multi-step: persist state in sessionStorage
IF file uploads: validate MIME, size, count client-side
```

### Step 2: Form State Management

```
DECISION MATRIX:
| Criterion     | RHF    | Formik | Native |
|--------------|--------|--------|--------|
| Re-renders   | Min    | Freq   | Min    |
| Bundle size  | ~9KB   | ~15KB  | 0KB    |
| TypeScript   | Excl.  | Good   | Manual |
| Complex forms| Excl.  | Good   | Verbose|

IF fields <= 3 AND no validation: native useState OK
IF fields > 3 OR has validation: React Hook Form
IF existing Formik codebase: keep Formik
```

### Step 3: Validation Patterns

```
VALIDATION TIMING:
  On blur (first visit): show after user leaves field
  On change (after error): re-validate immediately
  On submit: validate all, focus first error
  Never on mount: no errors before interaction

CLIENT + SERVER SHARED SCHEMA (Zod):
  Single schema shared between client and server
  Client: fast UX feedback
  Server: security (never trust client)

ASYNC VALIDATION:
  Debounce: 500ms minimum
  Show loading indicator during check
  Cancel previous request on new input

THRESHOLDS:
  Debounce delay: 300-500ms for async validation
  Max file size: 10MB default (configurable)
  Max file count: 10 per upload field
  Form submission timeout: 30 seconds
```

### Step 4: Multi-Step Wizard

```
WIZARD ARCHITECTURE:
  Step 1 → Step 2 → Step 3 → Review → Submit
  Each step has its own Zod schema
  Full schema validates on final submit
  State persists in sessionStorage (survives refresh)

RULES:
  IF user navigates back: restore previous values
  IF browser refreshes: restore from sessionStorage
  IF submit succeeds: clear sessionStorage
  Progress indicator shows current step
```

### Step 5: File Upload Handling

```
FILE VALIDATION CHECKLIST:
  MIME type: validate against allowlist
  Extension: cross-check with MIME type
  File size: reject > max before upload starts
  File count: enforce maximum per field
  Preview: show for images (use createObjectURL)
  Progress: show upload percentage
  Drop zone: must be keyboard-accessible

THRESHOLDS:
  Image max: 5MB
  Document max: 10MB
  Total upload max: 50MB per form submission
```

### Step 6: Accessible Form Design

```
FORM ACCESSIBILITY CHECKLIST:
Labels:
  [ ] Every input has visible <label> with htmlFor
  [ ] Required fields marked (asterisk + sr text)
  [ ] Placeholder is NOT used as label substitute
  [ ] Related fields grouped in <fieldset>/<legend>

Errors:
  [ ] Errors via aria-describedby on field
  [ ] aria-invalid="true" on fields with errors
  [ ] Error summary at top on submit failure
  [ ] role="alert" on error messages

Focus:
  [ ] On submit failure: focus first invalid field
  [ ] On step change: focus first field of new step
  [ ] Tab order follows visual order
  [ ] All form controls keyboard-accessible
```

### Step 7: Report

```
Form: <name>, Fields: <N>, Steps: <N>
Library: <RHF/Formik/native>
Validation: <Zod/Yup>, Mode: <onBlur/onChange>
A11y: <PASS|FAIL>, Tests: <pass>/<total>
```

Commit: `"forms: <form-name> — <library> + <validation>"`

## Key Behaviors

Never ask to continue. Loop autonomously until done.

1. **Validation on both client and server.**
   Share the schema (Zod) between both.
2. **Errors on blur, not on mount.**
3. **Focus management mandatory.** Focus first invalid
   field on submit failure.
4. **Every field has a visible label.**
5. **Multi-step forms persist state.**
6. **File uploads need full validation.**
7. **Use RHF for 5+ fields.** Manual useState leads
   to re-render storms.

## HARD RULES

1. Every input must have a visible `<label>`.
2. Never show errors before user interaction.
3. Always validate on both client and server.
4. Always focus first invalid field on submit.
5. Never use alert() for form errors.
6. Always persist multi-step data in sessionStorage.
7. Always validate file MIME, extension, size, count.
8. Never manage 5+ fields with raw useState.
9. Always use aria-invalid and aria-describedby.
10. Always share same Zod schema client and server.

## Auto-Detection
```
1. Libraries: react-hook-form, formik, zod, yup
2. Components: *Form*, *Wizard*, *Step* files
3. Validation: inline vs schema-based
```

## Output Format
Print: `Forms: {name} — {fields} fields,
  {validation}, a11y {PASS|FAIL}. Status: {status}.`

## TSV Logging
```
timestamp	form_name	fields	validation	a11y	status
```

## Keep/Discard Discipline
```
KEEP if: validation timing correct AND a11y passes
  AND server matches client schema
DISCARD if: errors on first keystroke OR focus lost
  OR schemas diverge between client/server
```

## Stop Conditions
```
STOP when ANY of:
  - All forms have labels, inline errors, shared schemas
  - Multi-step persists across steps and refresh
  - Keyboard navigation works for all interactions
  - User requests stop
```

<!-- tier-3 -->

## Error Recovery
- Fires every keystroke: switch to onBlur mode.
- State lost on navigation: persist in sessionStorage.
- Server errors not shown: map server fields to form.
- Multi-step loses progress: save per step, restore.

Versions

RepositoryScoreLicence
This page · arbazkhan971/godmode100MIT
lukedj78/dev-flow100MIT
krishna-modi12/frontend-design-pro100MIT
mgifford/accessibility-skills95AGPL-3.0
PIXARTSeu/Synapse95AGPL-3.0
sukirman1901/frontend-expert90MIT
aladicf/better-web-ui90MIT

Database snapshot: 13.11.2026 · package version f1ce9aed6fd7 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95form-validation-architect
    End-to-end form handling with react-hook-form, Zod schemas, validation patterns, error messaging, field arrays, and multi-step wizards. Use for complex forms, validation architecture, autosave, field dependencies. Activate on "form validation", "react-hook-form", "Zod", "form…
  • 100forms-pro
    Build excellent web forms: UX patterns, validation, accessibility, multi-step flows, and file uploads. Use for any form beyond trivial inputs.
  • 90nextjs-tanstack-form
    Use when building forms in Next.js 16 with TanStack Form v1 — Server Actions, Zod validation, multi-step wizards, field arrays.
  • 100enhance-web-forms
    Build or upgrade web forms: accessible structure, schema-driven validation, client↔server parity. Use when "improve this form", "form validation", "accessible form", "multi-step form", "form error handling", or "the form UX is bad".
  • 100fec-form-handling
    Use when building or reviewing substantial forms with React Hook Form, Zod schemas, typed validation, dynamic fields, controlled third-party inputs, file upload, multi-step flows, dependent validation, or form performance. Do not use for trivial 1-3 field forms without…
  • 100vue-forms
    Vue 3 form patterns: native v-model, vee-validate + zod (most common), VueUse helpers, defineModel for custom inputs, controlled vs uncontrolled, field arrays, multi-step wizards. Use this skill to: - Wire vee-validate with a validation schema (zod / yup). - Build custom form…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.