frontend-design
UI/UX design — color theory (60-30-10 rule), responsive layouts, WCAG accessibility, CSS/Tailwind patterns, wireframes, and visual review. Use when designing interfaces, choosing palettes, writing CSS, or fixing layout/accessibility issues.
What this skill does
# Frontend Design
Expert guidance for creating beautiful, accessible, and responsive frontend designs using modern UI principles, color theory, and React+Tailwind CSS patterns.
- Leverage native parallel subagent dispatch and 200k+ context windows where available.
## Activation Conditions
Use symptom -> action triggers: when one matches, apply this skill and verify with the protocol below.
**Color & Design:**
- Choosing color palettes for applications
- Applying the 60-30-10 design rule
- Creating accessible color combinations
- Designing backgrounds, text, and accent colors
- Triggered on color selection, UI color palette design, gradient creation
- Ensuring WCAG contrast compliance
**UI Components & Layouts:**
- Creating React UI components with Tailwind CSS
- Building forms, modals, cards, badges, buttons, inputs, tabs, tables
- Implementing responsive design patterns
- Designing accessible UI components
- Working with states, variants, and animations
**Design Review & Correction:**
- Reviewing website design (local or remote)
- Checking UI for consistency issues
- Finding and fixing layout breakage
- Detecting responsive design problems
- Fixing accessibility violations
- "Review website design", "check UI", "fix layout", "find design problems"
## Part 1: Color Theory & Palettes
### Color Categories
- **Hot Colors**: Oranges, reds, and yellows - energizing, attention-grabbing
- **Cool Colors**: Blues, greens, and purples - calming, professional
- **Neutral Colors**: Grays and grayscale variations - balancing, sophisticated
- **Binary Colors**: Black and white - high contrast, stark
### The 60-30-10 Rule
**Golden Ratio for Color Balance:**
| Proportion | Role | Recommended Colors |
|------------|------|-------------------|
| **60%** | Primary/Dominant | Cool or light colors, neutrals |
| **30%** | Secondary | Complementary or analogous colors |
| **10%** | Accent | Complementary hot color for emphasis |
### Application in Code
```css
/* Tailwind CSS CSS Variables Approach */
:root {
/* 60% - Primary (backgrounds, large areas) */
--color-primary-bg: #f5f7fa;
--color-primary-text: #374151;
/* 30% - Secondary (cards, sections) */
--color-secondary-bg: #ffffff;
--color-secondary-border: #e5e7eb;
--color-secondary-text: #1f2937;
/* 10% - Accent (buttons, highlights) */
--color-accent-primary: #3b82f6;
--color-accent-hover: #2563eb;
--color-accent-text: #ffffff;
}
/* Implementing in Tailwind config */
module.exports = {
theme: {
extend: {
colors: {
// 60% - Primary
primary: {
bg: 'var(--color-primary-bg)',
text: 'var(--color-primary-text)',
},
// 30% - Secondary
secondary: {
bg: 'var(--color-secondary-bg)',
border: 'var(--color-secondary-border)',
text: 'var(--color-secondary-text)',
},
// 10% - Accent
accent: {
primary: 'var(--color-accent-primary)',
hover: 'var(--color-accent-hover)',
text: 'var(--color-accent-text)',
},
},
},
},
};
```
## Part 2: Accessibility (WCAG Compliance)
### Web Content Accessibility Guidelines (WCAG 2.1 Level AA
#### Contrast Requirements
| Element | Minimum Contrast Ratio | Recommended |
|----------|----------------------|-------------|
| Normal text (< 18pt) | 4.5:1 | 7:1 |
| Large text (18pt+) or bold | 3:1 | 4.5:1 |
| Graphical objects and UI components | 3:1 | Higher is better |
### Contrast Validation
```javascript
// Calculate contrast ratio
function getContrastRatio(foreground: string, background: string): number {
const lum1 = getLuminance(foreground);
const lum2 = getLuminance(background);
function getLuminance(hex: string): number {
const rgb = hexToRgb(hex);
const [r, g, b] = rgb.map(c => {
c /= 255;
return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
});
return 0.2126 * r[0] + 0.7152 * r[1] + 0.0722 * r[2];
}
const lighter = Math.max(lum1, lum2);
const darker = Math.min(lum1, lum2);
return (lighter + 0.05) / (darker + 0.05);
}
// Validate
const ratio = getContrastRatio('#3b82f6', '#ffffff');
console.log(ratio >= 4.5 ? '✅ WCAG AA compliant' : '❌ Not compliant');
```
### Accessibility Best Practices
#### Color Independence
```css
/* ❌ BAD - Color-only indication */
.success {
color: green;
}
.error {
color: red;
}
/* ✅ GOOD - Color + other visual indicator */
.success {
color: #22c55e;
border-left: 4px solid #22c55e;
padding-left: 8px;
}
.error {
color: #ef4444;
border-left: 4px solid #ef4444;
padding-left: 8px;
}
```
#### Focus States
```css
/* Keyboard navigation needs visible focus */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
/* Tailwind */
<button className="focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
```
#### ARIA Labels
```jsx
// Icon-only buttons need labels
<button aria-label="Close dialog">
<CloseIcon />
</button>
// Toggle buttons need pressed state
<button aria-pressed={isSelected}>
{isSelected ? 'Selected' : 'Not selected'}
</button>
// Screen reader only text
<span className="sr-only">Required field</span>
```
### Responsive Typography
```css
/* Use relative units for scalability */
html {
font-size: 100%; /* Browser default usually 16px */
}
body {
font-size: 1rem; /* 16px */
line-height: 1.5; /* Readable line height */
}
/* Responsive scaling */
@media (min-width: 768px) {
body {
font-size: 1.125rem; /* 18px on tablets+ */
}
}
```
---
## Part 3: Responsive Design
### Mobile-First Approach
```css
/* Base styles - mobile by default */
.container {
width: 100%;
padding: 1rem;
display: block; /* Column layout on mobile */
}
/* Tablet - 768px+ */
@media (min-width: 768px) {
.container {
max-width: 720px;
display: grid; /* Grid on tablet */
grid-template-columns: 1fr 1fr;
}
}
/* Desktop - 1024px+ */
@media (min-width: 1024px) {
.container {
max-width: 1200px;
grid-template-columns: 1fr 1fr 1fr;
}
}
/* Large desktop - 1280px+ */
@media (min-width: 1280px) {
.container {
max-width: 1400px;
}
}
```
### Tailwind Responsive Classes
```jsx
// Mobile-first approach
<div className="
container
mx-auto
px-4 /* 16px padding on all sizes */
py-8
">
<div className="
grid
grid-cols-1 /* 1 column on mobile */
md:grid-cols-2 /* 2 columns on tablet */
lg:grid-cols-3 /* 3 columns on desktop */
gap-4
">
{items.map(item => (
<Card key={item.id}>{item.content}</Card>
))}
</div>
</div>
```
### Responsive Breakpoints (Tailwind Default)
| Breakpoint | Width | Device |
|-----------|--------|---------|
| sm | 640px | Small phones, portrait |
| md | 768px | Tablets, small laptops |
| lg | 1024px | Laptops, desktops |
| xl | 1280px | Large desktops |
| 2xl | 1536px | Extra large displays |
---
## Part 4: UI Component Patterns
### Button Component
```jsx
const buttonVariants = {
primary: 'bg-blue-600 hover:bg-blue-700 text-white',
secondary: 'bg-gray-200 hover:bg-gray-300 text-gray-900',
danger: 'bg-red-600 hover:bg-red-700 text-white',
ghost: 'hover:bg-gray-100 text-gray-700',
outline: 'border-2 border-blue-600 text-blue-600 hover:bg-blue-50',
};
const buttonSizes = {
sm: 'px-3 py-1.5 text-sm',
md: 'px-4 py-2 text-base',
lg: 'px-5 py-2.5 text-lg',
xl: 'px-6 py-3 text-xl',
};
export function Button({
variant = 'primary',
size = 'md',
disabled = false,
isLoading = false,
className = '',
children,
...props
}) {
return (
<button
disabled={disabled || isLoading}
className={cn(
// Base styles
'rounded-lg font-medium transition-all',
'focus:outline-none focus:ring-2 focus:ring-offset-2',
'disabled:opacity-50 disabled:cursor-not-allowed',
// Variant styles
buttonVariants[varRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.