/mattpocock-skills:ui-craftfrom mattpocock-skills
Enforce frontend visual craft, five-state completeness, design system tokens, and WCAG AA accessibility. Use when implementing UI components, writing React or Next.js pages, modifying .tsx or .jsx files, editing styles with Tailwind or CSS, adding loading skeletons or empty states, or auditing frontend interfaces.
Ships in mattpocock-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.
Read when SKILL.md points to them.
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.
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. |
bg-[#1a2b3c] or p-[13px].bg-background, text-foreground, text-muted-foreground, border-border, bg-primary).shadcn/ui, Radix UI, or Tailwind UI) instead of re-inventing basic buttons, dialogs, dropdowns, or inputs from raw unstyled HTML elements.truncate, line-clamp, or break-words on user-generated text containers to prevent overflow.focus-visible:ring-2 focus-visible:ring-offset-2).<button>, <nav>, <main>, <article>, <header>) rather than div tags with onClick handlers.aria-label or visually hidden screen reader text (sr-only).Before marking any UI ticket or component complete:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub op3616windows/superskills --plugin mattpocock-skills50 skills in this plugin
/ask-mattAsk which skill or flow fits your situation. A router over the skills in this repo./brownfield-onboardSurvey an existing brownfield codebase, detect conflicting domain terminology, and bootstrap GLOSSARY.md and foundational ADRs./chief-of-staffPursue a long-running goal in a single session by co-ordinating subagents./claude-handoffHand the current conversation off to a fresh background agent that picks up the work immediately.