/kenji:enhance-web-formsfrom kenji skills
Builds or upgrades web forms with accessible structure, schema-driven validation, client-server parity, and proper state handling for submitting, success, error, and unsaved states.
Ships in kenji skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Degree of freedom: MIXED. Schema and state-machine judgment [HIGH freedom]; a11y probes and playwright walks [LOW freedom — run exactly].
Forms are where users hand you their data and where apps most often feel broken: unlabeled fields, validation that fires on every keystroke, errors screen readers never announce, a submit button that does nothing visible for three seconds, and no recovery when the request fails. This skill fixes all of that on real forms in the repo.
A form is done when it is accessible, validated on both sides, gives feedback for every state, and recovers from failure. Compile-clean is not done.
Before any browser interaction, read protocol-browser-anti-stall and apply it.
Inventory: signup uses raw
<form>+ inlineif (!email); API validates with zod. Structure:htmlForlabels;autocomplete="email";aria-invalid+ summary. Parity: share the zod schema; validate on blur/submit; map "email taken" to the field. States: submit disables +aria-busy; values preserved on 500; dirty-nav warn.
enhance-web-ux; WCAG sweep → audit-accessibilitycat package.json | grep -iE "react-hook-form|formik|@tanstack/react-form|final-form|zod|yup|valibot|superstruct"
rg -n "<form|onSubmit|useForm|handleSubmit" -g "*.{tsx,jsx,vue,svelte}" -l
Record: form library (or native), validation/schema library, UI/component library, and the list of forms to enhance (auth, checkout, settings, contact, search, etc.). If there are no forms, bow out.
Follow /research: Context7 for the detected form/validation library's current API;
Firecrawl for current form UX/a11y guidance dated to now. Prioritize forms by traffic and
risk (auth, payment, destructive actions first).
For each form, verify/fix:
<label htmlFor> or aria-label; placeholder
is not a label.autocomplete — type="email|tel|url|number", inputmode,
autocomplete="email|current-password|cc-number|..." for autofill.<fieldset> + <legend> (radio groups, address blocks).required / aria-required.aria-describedby; invalid fields get
aria-invalid="true"; a form-level error summary with links to fields on submit failure.rg -n "placeholder=" -g "*.{tsx,jsx}" # placeholders masquerading as labels?
rg -n "aria-describedby|aria-invalid|htmlFor|aria-label" -g "*.{tsx,jsx}" -c
Wire the full state machine for each form and submit:
| State | Required behavior |
|---|---|
| Idle | Clean, submit enabled/disabled per validity policy |
| Validating | Inline field feedback (see Phase 3 timing) |
| Submitting | Submit shows spinner/label swap + disabled + aria-busy; prevent double-submit |
| Success | Confirmation (toast/inline/redirect); reset or lock as appropriate |
| Error | Preserve entered values; surface the failure; keep the user's place; retry path |
| Empty/optional | Sensible defaults; empty state for dependent selects |
Also handle:
design-motion conventions
(reduced-motion safe). Don't animate layout in a way that shifts fields.console. Confirm screen-reader names via the accessibility snapshot.
Screenshots to .playwright-mcp/.## Forms Enhancement — report
**Stack:** form=[..] · validation=[..] · UI=[..]
**Forms upgraded:** [list]
**Structure:** labels/types/autocomplete/fieldsets fixed on [N] forms
**Validation:** shared schema SSOT · client↔server parity · blur+submit timing
**States:** submitting/success/error/multi-step/unsaved-guard wired
**A11y:** error summary + aria-describedby/aria-invalid + focus management (evidence)
**Verification:** build ✓ · console clean ✓ · flows walked (screenshots [paths])
audit-accessibility — deep WCAG audit (run to verify the a11y work)audit-ux — form usability heuristics, microcopy, cognitive loadaudit-fe-api — validate the submit request/response contract against the backendbackend-error-handling — server-side validation + structured error responsesdesign-motion — reduced-motion-safe micro-feedback for error/successenhance-web-ux — broader page/flow UX beyond the form itselfWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
React, Vue, Svelte, Zod, TypeScript
npx claudepluginhub kensaurus/skills --plugin kenji162 skills in this plugin
/audit-accessibilityWCAG 2.2 AA audit via playwright-cli: axe-core, keyboard, contrast, target size, focus, ARIA. Use when "audit accessibility", "check a11y", "WCAG audit", "check keyboard nav", or "test screen reader".
/audit-agent-speedMeasure and fix a slow coding-agent setup: status line, hooks, instruction bloat, effort, worktree pile-up, antivirus and indexer scans. Use when "Claude is slow" or "CPU is pinned". App speed → audit-performance.
/audit-analyticsRead-only audit of product-analytics events (PostHog, Amplitude, Mixpanel, GA4): taxonomy, funnels, consent-gated firing, dead or duplicate events. Use when "audit our analytics", "are we tracking the right events", or "funnel instrumentation".
Other plugins' skills for the same job