skills/frontend-ui-engineering/SKILL.md
Use when building or modifying user-facing interfaces. Use when creating components, implementing layouts, managing state, or when the output needs to look and feel production-quality rather than AI-generated.
npx skillsauth add paulund/ai frontend-ui-engineeringInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Component architecture — colocate implementation, tests, and hooks in one directory per component. Prefer composition over configuration. Separate data-fetching containers from presentation components. Split any component over 200 lines.
State management — choose the simplest approach that works:
useState → component-specific UI statesearchParams) → filters, pagination, shareable UI stateAvoid the AI aesthetic — AI-generated UI has recognisable patterns. Avoid all of them:
| AI Default | Production Quality |
|---|---|
| Purple/indigo everything | Use the project's actual colour palette |
| Excessive gradients | Flat or subtle gradients matching the design system |
| rounded-2xl on everything | Consistent border-radius from the design system |
| Equal oversized padding everywhere | Consistent spacing scale; hierarchy through variation |
| Stock card grids | Purpose-driven layouts based on content priority |
| Lorem ipsum placeholder copy | Realistic content that reveals actual layout problems |
Accessibility (WCAG 2.1 AA) — every interactive element must be keyboard-accessible. Label all inputs (<label htmlFor> or aria-label). Manage focus when dialogs open. Never rely on colour alone to convey state — always pair with text or an icon.
Responsive — mobile-first. Use the project's breakpoint scale. Test at 320px, 768px, 1024px, and 1440px before marking any layout task done.
Loading / error / empty states — all three must be handled for every data-driven component. Never show a blank screen. Use skeleton loading (not spinners) for content areas.
| Rationalization | Reality | |---|---| | "Accessibility is a nice-to-have" | Legal requirement in many jurisdictions and an engineering quality standard. | | "We'll make it responsive later" | Retrofitting responsive design is 3× harder than building it from the start. | | "The AI aesthetic is fine for now" | It signals low quality to reviewers. Use the project's design system from the start. | | "This is just a prototype" | Prototypes become production code. Build the foundation right. | | "I'll add error/empty states later" | "Later" doesn't happen. Three states, handled once, cost less than fixing them post-launch. |
rounded-2xl on everything, equal oversized padding, stock card grids)After building UI:
rounded-2xl on everything, equal oversized padding, stock card grids.| Topic | Reference | Load When | |-------|-----------|----------| | Accessibility Checklist | references/accessibility-checklist.md | Implementing or auditing any interactive component for WCAG 2.1 AA compliance |
development
Use when implementing any logic, fixing any bug, or changing any behaviour. Use when you need to prove code works, when a bug report arrives, or when modifying existing functionality. Do NOT use for config changes, data migrations, or dependency updates.
development
Use when starting a new feature, when requirements are unclear, when asked to write code without a clear spec, or before any non-trivial implementation. Do NOT use for trivial bug fixes or one-line changes.
development
Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters. Detects the stack from dependency files, fetches official documentation, implements following documented patterns, and cites sources for every framework-specific decision.
development
Use when preparing to ship a feature, release, or deployment. Use before merging to main, creating a release, or deploying to production. Do NOT use for CI-only changes or internal refactors that don't reach production.