mk:frontend-design
Designs and reviews UI components for typography, color, spacing, motion, responsiveness and WCAG 2.1 AA accessibility, with an anti-generic-design checklist.
| Source | .claude/skills/frontend-design/SKILL.md |
| Owner | utility |
| Runtime | claude-code |
| Risk | medium |
What it does
mk:frontend-design applies design rules to UI work and runs a checklist that catches generic, template-looking output before delivery. It runs in the build phase (output for the developer agent) and the review phase (design check for the reviewer agent).
When to use it
It activates on design tasks, component styling, "improve the design", "fix the UI", design review and CSS changes. Usage: /mk:frontend-design [concern], where the optional concern is typography, color, spacing, motion, responsive, accessibility or review.
| Need | Use instead |
|---|---|
| Design tokens and system assets | mk:ui-design-system |
| Backend or API work | not this skill |
Steps
- Detect the task type (new component, redesign, review, responsive fix) and load
references/design-rules.md. - Apply typography, color, spacing and motion rules. Run the anti-slop checklist. Keep WCAG 2.1 AA.
- Run the pre-delivery checklist, then hand off to the
revieweragent for the design dimension.
Design principles
Choose the typeface before colors or layout. Treat whitespace as design. Give every color a role. Animate only to show a state change. Treat accessibility as the default: 4.5:1 contrast, keyboard navigation, screen reader labels.
Anti-slop checklist
| Area | Avoid | Do |
|---|---|---|
| Typography | System stack with one weight, one size for all text | 2 to 3 weights, a deliberate pairing (mk:ui-design-system/assets/typography.csv), a clear hierarchy |
| Color | Unrelated colors, decoration that hides hierarchy | One primary, one accent, neutrals (mk:ui-design-system/assets/colors.csv) |
| Layout | Everything centered, equal 3-column card grid, default padding | Varied whitespace, bento or asymmetric layouts, a 4px spacing scale |
| Content | Lorem ipsum, "John Doe" | Real or realistic content |
| Effects | Heavy shadows, parallax on every section | Subtle shadows, motion reserved for key moments, prefers-reduced-motion respected |
| Components | Default browser inputs | Styled controls with hover, focus and disabled states |
| Icons and images | Emoji icons, stock hero photos | One SVG icon set (Lucide, Heroicons, Phosphor), screenshots or illustrations |
| Performance | Unoptimized images, layout shift | WebP or AVIF, explicit dimensions, skeleton loaders |
| Dark mode | Inverted colors | A separate palette with maintained contrast |
references/anti-slop-directives.md adds more patterns (default gradients, 24px+ corners everywhere, "Welcome to App" heroes, default MUI or shadcn themes) and the identity test: remove the logo and name, and if the design could be any app in the category, add one specific design decision.
Output
## Design: {component or page}
**Type:** {new design | redesign | review | responsive fix}
**Framework:** {Vue | React | vanilla CSS}
### Design Decisions
### Anti-Slop Check
### Accessibility (contrast ratio, keyboard navigable, screen reader labels)
### Files ModifiedIf the project has no design system, the skill applies a neutral palette and system fonts with fallbacks. A contrast ratio below 4.5:1 is adjusted, never shipped.
Gotchas
- Tailwind purges class names built by string interpolation. Use complete class strings or
safelist. - shadcn components read
--primary,--card,--muted. Auditglobals.cssafter everyshadcn add. - Figma token names do not map to CSS variable names automatically.
- A
dark:class without a matching variable in.darkrenders transparent. - Tailwind's
md: 768pxcan differ from the design system. Override breakpoints first. - Use the framework's icon package (
lucide-vue-nextin Vue, notlucide-react).