ui-craft
Installation
SKILL.md
UI Craft
Discipline for frontend engineering: five-state completeness, design system fidelity, and accessibility compliance.
When automated coding agents implement frontend components, they often suffer from "AI Slop": writing only the happy path with static mock data, neglecting loading skeletons, crashing on network errors, inventing arbitrary colors that deviate from the design system, and failing basic accessibility standards.
ui-craft governs any work touching .tsx, .jsx, CSS, or frontend components during /implement.
The Five-State Completeness Matrix
A user interface component or vertical slice ticket containing UI is incomplete unless all five states are explicitly implemented and verified:
| State | Requirement | Guardrail |
|---|---|---|
| 1. Loading | Skeleton loader matching the exact dimensions of final content. | Avoid single generic spinners that cause Cumulative Layout Shift (CLS) when content appears. |
| 2. Empty | Clear visual message explaining why there is no content. | Always include a prominent Call to Action (CTA) guiding the user on how to populate data. |
| 3. Error | Human-readable explanation of what went wrong. | Must include an actionable "Retry" button or recovery link; never leave the user at a blank screen. |
| 4. Partial / Optimistic | Immediate visual feedback when the user mutates state. | Show pending indicators or optimistic updates, and guarantee graceful rollback if the server rejects the action. |
| 5. Populated | The standard view with real data. | Enforce text truncation, container wrapping, and responsive sizing across all screen widths. |