form-ux-optimizer
Reviews web forms for usability issues — field ordering, validation messages, error states, and accessibility.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reviews web forms for usability issues — field ordering, validation messages, error states, and accessibility.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Runs a systematic checklist review on any code diff or file, covering correctness, security, performance, and readability.
Writes a high-quality CLAUDE.md, .cursorrules, or .windsurfrules file that gives a coding agent the right project context, conventions, and constraints to work effectively.
Designs an eval suite for an LLM agent or pipeline including success metrics, trajectory scoring, LLM-as-judge setup, and regression test cases.
Designs a hybrid retrieval pipeline combining dense vector search and BM25 sparse search with reciprocal rank fusion, and explains when to use each configuration.
Converts a workflow description into a LangGraph node/edge graph with typed state, conditional routing, and human-in-the-loop checkpoints.
Audits an AI application for unnecessary token spend and recommends prompt caching, model routing, and token reduction techniques to cut costs.
| name | Form UX Optimizer |
| description | Reviews web forms for usability issues — field ordering, validation messages, error states, and accessibility. |
| category | coding |
| tags | ["forms","ux","accessibility","frontend"] |
| author | simplyutils |
This skill reviews the code and design of web forms to identify usability and accessibility issues. It checks for poor field ordering, confusing labels, missing or unhelpful error messages, incorrect input types, broken keyboard navigation, and accessibility violations. The output is a prioritized list of specific improvements with code examples for each fix.
Use this before shipping a registration, checkout, contact, or any data-entry form — especially when your form has a high abandonment rate or you're getting support requests about users not knowing what to enter.
Copy this file to .agents/skills/form-ux-optimizer/SKILL.md in your project root.
Then ask:
CheckoutForm.tsx."Provide the form component code and, if available, any validation logic.
Add the instructions below to your .cursorrules or paste them into the Cursor AI pane. Provide the form code to review.
Paste the form HTML/JSX and validation code. Ask Codex to follow the instructions below.
When asked to review a form for UX, follow this checklist systematically:
Labels
<label> element (not just placeholder text)for/htmlFor or wrappingField order
Input types
type="tel" (shows numeric keyboard on mobile)type="email" (enables autocomplete and basic validation)type="number" where appropriatetype="date" or a proper date picker, not three separate text inputstype="password"type="search"Autocomplete
autocomplete attributes set: autocomplete="email", autocomplete="given-name", autocomplete="tel", autocomplete="current-password", autocomplete="new-password", etc.Error messages
aria-describedby or aria-errormessageValidation timing
blur (when the user leaves a field) for format errorsInline validation
Error state styling
<form> element (not just <div>)<button type="submit"> or <input type="submit"> — not a <div> with an onClickoutline: none without a replacementaria-required="true" should be present on required fields in addition to HTML requiredaria-invalid="true" should be set on fields with validation errorsaria-live="polite" region should announce error messages to screen readers when they appear<fieldset> and <legend>## Form UX Review — [Form Name]
### Critical Issues (accessibility violations or blocking UX problems)
#### 1. [Issue title]
- **Field / Location**: [Field name or line number]
- **Problem**: [What's wrong and why it matters]
- **Fix**: [Specific code change with example]
### High-Priority Issues (significant UX degradation)
[Same format]
### Warnings (minor issues or best practice gaps)
[Same format]
### What's Already Good
[Brief acknowledgment of things done well]
Input to Agent:
"Use the Form UX Optimizer skill on this form:
<div> <input placeholder="Email" onChange={...} /> <input placeholder="Password" type="password" onChange={...} /> <div onClick={handleSubmit} className="btn">Go</div> </div> ```"
Output from Agent:
Form UX Review — Login Form
Critical Issues
1. No
<label>elements — placeholders used as labels
- Problem: When the user starts typing, the placeholder disappears and they lose the field context. Screen readers also cannot reliably read placeholders as labels.
- Fix:
<label htmlFor="email">Email</label> <input id="email" type="email" placeholder="you@example.com" autocomplete="email" />2. Submit is a
<div>, not a<button>
- Problem: A
<div>is not keyboard-accessible by default, is not announced as a button by screen readers, and doesn't submit the form on Enter.- Fix:
<button type="submit">Sign in</button>— rename "Go" to something descriptive.3. No
<form>wrapper
- Problem: Without a
<form>element, the browser's built-in form submission, validation, and Enter-to-submit behavior is lost.- Fix: Wrap in
<form onSubmit={handleSubmit}>and remove theonClickfrom the button.High-Priority Issues
4. Email input missing
type="email"
- Problem: Without
type="email", mobile devices show a standard keyboard instead of the optimized email keyboard. Browser-level email validation is also disabled.- Fix:
<input type="email" ... />