Frontend Design
A frontend design skill for AI agents. Every UI you touch should feel hot, sleek, sexy, usable, fun, and addictive.
Core Philosophy
Design is not decoration. It's communication. Every pixel exists to serve the user's intent while making them feel something. The best interfaces are invisible — they get out of the way while being impossibly beautiful.
Principles:
- Clarity over cleverness — if it needs a tooltip, redesign it
- Motion with meaning — every animation tells a story
- Contrast is king — visual hierarchy through bold contrast, not clutter
- White space is not empty — it's breathing room
- Dark mode first — because we live in the future
Design Patterns
Cards
Cards are the atomic unit of modern UI. Rules:
- Subtle border, generous padding (1.25rem+)
- Hover state: slight lift (translateY -2px) + border glow
- Never more than 3 levels of text hierarchy per card
- Background should be 1-2 shades lighter than page bg
Buttons
- Primary: solid fill, bold, slight shadow
- Secondary: outlined, transparent bg
- Ghost: no border, text only, underline on hover
- Always include hover + active + focus states
- Min touch target: 44px
Forms
- Labels above inputs, never floating
- Generous input padding (0.875rem)
- Focus ring = accent color border, not browser default
- Error states: pink/red border + helper text below
- Success: green accent, brief animation
Layout Principles
Spacing Scale
Use a consistent spacing scale based on 0.25rem increments:
- xs: 0.25rem (4px)
- sm: 0.5rem (8px)
- md: 1rem (16px)
- lg: 1.5rem (24px)
- xl: 2rem (32px)
- 2xl: 3rem (48px)
- 3xl: 4rem (64px)
Grid
- Max content width: 1200px
- Side padding: 2rem (1rem mobile)
- Column gap: 1.5-2rem
- Mobile: single column, always
Typography
- Display: bold, tight letter-spacing (-0.02em)
- Body: 1rem, line-height 1.6
- Small: 0.875rem for metadata
- Handwriting fonts for personality moments
- Monospace for code, versions, hashes
Color System
Always define CSS variables. Never hardcode colors.
:root {
--bg-primary: #faf6f0; /* warm cream */
--bg-secondary: #f0ebe3;
--bg-card: #ffffff;
--text-primary: #1a1a1a;
--text-secondary: #555;
--text-muted: #999;
--border: rgba(0,0,0,0.08);
--accent: #e84a5f; /* rose */
--accent-2: #4a90e2; /* blue */
--radius-sm: 6px;
--radius-md: 12px;
--radius-lg: 20px;
}
Dark mode: invert the bg scale, keep accent colors, increase border opacity slightly.
Animation
- Hover transitions: 0.2-0.25s ease
- Page transitions: 0.3s ease
- Never exceed 0.5s for UI animations
- Use
transform and opacity only — no animating layout properties
will-change: transform on frequently animated elements
Component Checklist
Before shipping any component, verify:
Anti-Patterns
Never do these:
- Fixed pixel widths on text containers
!important in your CSS
- Z-index > 100 (symptom of stacking context chaos)
- Color without sufficient contrast (WCAG AA minimum)
- Hover-only interactions (mobile has no hover)
outline: none without a replacement focus style
Trigger Phrases
Activate on:
- "Design a [component]"
- "Make this look better"
- "Review my UI"
- "Build a landing page"
- "How should I style [X]"
- Any request involving visual design, CSS, or component architecture
1---2name: frontend-design-23description: Use this skill for frontend UI design tasks — designing or reviewing components (buttons, cards, forms, navbars, modals), specifying CSS with concrete values, layout and spacing decisions, typography selection, color systems, dark mode, and visual polish. Triggers on "design a [component]", "how should I style...", "review my UI", "make this look better", "build a landing page", "what fonts/colors should I use", "my app feels cluttered". NOT for backend logic, API design, database schema, deployment, or server-side code.4---56# Frontend Design78A frontend design skill for AI agents. Every UI you touch should feel hot, sleek, sexy, usable, fun, and addictive.910## Core Philosophy1112Design is not decoration. It's communication. Every pixel exists to serve the user's intent while making them *feel* something. The best interfaces are invisible — they get out of the way while being impossibly beautiful.1314**Principles:**15- **Clarity over cleverness** — if it needs a tooltip, redesign it16- **Motion with meaning** — every animation tells a story17- **Contrast is king** — visual hierarchy through bold contrast, not clutter18- **White space is not empty** — it's breathing room19- **Dark mode first** — because we live in the future2021## Design Patterns2223### Cards24Cards are the atomic unit of modern UI. Rules:25- Subtle border, generous padding (1.25rem+)26- Hover state: slight lift (translateY -2px) + border glow27- Never more than 3 levels of text hierarchy per card28- Background should be 1-2 shades lighter than page bg2930### Buttons31- Primary: solid fill, bold, slight shadow32- Secondary: outlined, transparent bg33- Ghost: no border, text only, underline on hover34- Always include hover + active + focus states35- Min touch target: 44px3637### Forms38- Labels above inputs, never floating39- Generous input padding (0.875rem)40- Focus ring = accent color border, not browser default41- Error states: pink/red border + helper text below42- Success: green accent, brief animation4344## Layout Principles4546### Spacing Scale47Use a consistent spacing scale based on 0.25rem increments:48- xs: 0.25rem (4px)49- sm: 0.5rem (8px)50- md: 1rem (16px)51- lg: 1.5rem (24px)52- xl: 2rem (32px)53- 2xl: 3rem (48px)54- 3xl: 4rem (64px)5556### Grid57- Max content width: 1200px58- Side padding: 2rem (1rem mobile)59- Column gap: 1.5-2rem60- Mobile: single column, always6162### Typography63- Display: bold, tight letter-spacing (-0.02em)64- Body: 1rem, line-height 1.665- Small: 0.875rem for metadata66- Handwriting fonts for personality moments67- Monospace for code, versions, hashes6869## Color System7071Always define CSS variables. Never hardcode colors.7273```css74:root {75 --bg-primary: #faf6f0; /* warm cream */76 --bg-secondary: #f0ebe3;77 --bg-card: #ffffff;78 --text-primary: #1a1a1a;79 --text-secondary: #555;80 --text-muted: #999;81 --border: rgba(0,0,0,0.08);82 --accent: #e84a5f; /* rose */83 --accent-2: #4a90e2; /* blue */84 --radius-sm: 6px;85 --radius-md: 12px;86 --radius-lg: 20px;87}88```8990Dark mode: invert the bg scale, keep accent colors, increase border opacity slightly.9192## Animation9394- Hover transitions: 0.2-0.25s ease95- Page transitions: 0.3s ease96- Never exceed 0.5s for UI animations97- Use `transform` and `opacity` only — no animating layout properties98- `will-change: transform` on frequently animated elements99100## Component Checklist101102Before shipping any component, verify:103- [ ] Hover state defined104- [ ] Focus state defined (keyboard accessible)105- [ ] Active/pressed state106- [ ] Loading state (if async)107- [ ] Empty state (if data-driven)108- [ ] Error state (if can fail)109- [ ] Mobile layout (< 768px)110- [ ] Dark mode compatible111112## Anti-Patterns113114Never do these:115- Fixed pixel widths on text containers116- `!important` in your CSS117- Z-index > 100 (symptom of stacking context chaos)118- Color without sufficient contrast (WCAG AA minimum)119- Hover-only interactions (mobile has no hover)120- `outline: none` without a replacement focus style121122## Trigger Phrases123124Activate on:125- "Design a [component]"126- "Make this look better"127- "Review my UI"128- "Build a landing page"129- "How should I style [X]"130- Any request involving visual design, CSS, or component architecture