Frontend Design UI/UX Skill
Purpose
This is a design skill, not an implementation skill. It produces:
- Design artifacts and specifications
- Component briefs with TypeScript interfaces
- User flow documentation
- Design tokens and system definitions
- Clear handoff instructions for implementation
Target Agents:
nextjs-senior-engineer - For SSR, SEO-critical, App Router projects
react-vite-tailwind-engineer - For SPAs, CLI web UIs, Electron apps
Design Methodology
Phase 1: Discovery
Before designing, gather context:
User Research Questions:
- Who are the primary users? (roles, technical level, accessibility needs)
- What problem are they solving?
- Where will they use this? (device, context, environment)
- When do they need it? (frequency, urgency, duration)
- Why this feature now? (business goal, user pain point)
Context Analysis:
- Existing patterns in the codebase
- Design system constraints
- Tech stack limitations
- Performance requirements
- Accessibility requirements (WCAG 2.1 AA minimum)
Phase 2: Information Architecture
Content Inventory:
- List all data/content to display
- Identify required vs optional fields
- Define content hierarchy
User Flow Mapping:
- Entry points (how users arrive)
- Decision points (branching logic)
- Exit points (success, error, abandon)
- Edge cases and error states
State Mapping:
Document every state the UI can be in:
- Loading (initial, refresh, pagination)
- Empty (first use, no results, filtered empty)
- Partial (incomplete data, degraded)
- Success (complete, confirmed)
- Error (validation, network, permission, timeout)
Phase 3: Component Design
Atomic Design Hierarchy:
- Atoms - Basic elements (Button, Input, Icon, Text)
- Molecules - Simple combinations (SearchInput, FormField, Card)
- Organisms - Complex sections (Header, ProductList, CommentThread)
- Templates - Page layouts (DashboardLayout, AuthLayout)
- Pages - Specific instances (UserDashboard, LoginPage)
For Each Component, Define:
- Purpose (one sentence)
- Variants (visual/behavioral variations)
- Props with TypeScript types
- All possible states
- Responsive behavior at breakpoints
- Accessibility requirements
Phase 4: Interaction Design
User Interactions:
| Interaction |
Trigger |
Feedback |
Duration |
| Click/Tap |
Mouse/Touch |
Visual + State change |
Instant |
| Hover |
Mouse enter |
Visual highlight |
- |
| Focus |
Tab/Click |
Focus ring |
- |
| Drag |
Mouse down + move |
Ghost + Drop zones |
Continuous |
| Swipe |
Touch move |
Momentum scroll |
Gesture-based |
Feedback Patterns:
- Loading: Skeleton, spinner, progress bar
- Success: Toast, inline confirmation, redirect
- Error: Inline message, toast, modal (severity-based)
- Progress: Step indicator, progress bar, percentage
Animation Specifications:
const animations = {
duration: {
instant: '0ms',
fast: '150ms',
normal: '300ms',
slow: '500ms',
},
easing: {
default: 'cubic-bezier(0.4, 0, 0.2, 1)',
in: 'cubic-bezier(0.4, 0, 1, 1)',
out: 'cubic-bezier(0, 0, 0.2, 1)',
bounce: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',
},
}
Phase 5: Design Tokens
Define tokens for consistency across implementations:
Colors:
- Semantic naming (primary, secondary, destructive)
- Full scale for each (50-900)
- Light/dark mode variants
Typography:
- Font families (sans, mono, serif if needed)
- Size scale (xs through 4xl)
- Weight scale (normal, medium, semibold, bold)
- Line heights (tight, normal, relaxed)
Spacing:
- Base unit: 0.25rem (4px)
- Scale: 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 64
Other Tokens:
- Border radius (none, sm, md, lg, full)
- Shadows (sm, md, lg, xl)
- Z-index layers (base, dropdown, sticky, modal, toast)
- Breakpoints (sm: 640px, md: 768px, lg: 1024px, xl: 1280px)
Phase 6: Engineer Handoff
Agent Selection Logic:
| Criteria |
Agent |
| Server-side rendering needed |
nextjs-senior-engineer |
| SEO critical |
nextjs-senior-engineer |
| App Router / Server Components |
nextjs-senior-engineer |
| API routes / Server Actions |
nextjs-senior-engineer |
| Pure SPA / client-only |
react-vite-tailwind-engineer |
| CLI with web UI |
react-vite-tailwind-engineer |
| Electron/Tauri app |
react-vite-tailwind-engineer |
| Static site with no SSR |
Either (ask user) |
| Unclear |
Ask user |
Output Templates
Use these templates in references/ directory:
component-spec-template.md - Full component specifications
user-flow-template.md - User journey documentation
design-tokens-template.md - Token system definition
Quality Checklist
Before handoff to engineering agent, verify:
Session Management
Scope Control:
- Confirm scope before expanding beyond initial request
- Ask before adding "nice to have" features
- Keep specifications focused on requested functionality
Checkpoints:
- After discovery: Confirm understanding
- After IA: Validate user flows
- After component design: Review specs
- Before handoff: Final quality check
Handoff Signals:
When specifications are complete, clearly indicate:
## Ready for Implementation
Target Agent: [nextjs-senior-engineer | react-vite-tailwind-engineer]
The following specifications are ready for implementation:
1. [Component/Flow name] - [brief description]
2. ...
Invoke the target agent with these specifications to begin implementation.
Integration with Other Skills
This skill produces specifications that are consumed by:
nextjs-senior-engineer - Implements Next.js components
react-vite-tailwind-engineer - Implements React/Vite components
Do NOT implement code directly. Always hand off to the appropriate engineering agent.
1---2name: frontend-design-ui-ux3description: Design user interfaces with comprehensive UX methodology. Produces implementation-ready specifications, component briefs, and design tokens for handoff to Next.js and React engineering agents. Use when designing new features, creating design systems, planning user flows, or specifying component behavior.4---56# Frontend Design UI/UX Skill78## Purpose910This is a **design skill**, not an implementation skill. It produces:11- Design artifacts and specifications12- Component briefs with TypeScript interfaces13- User flow documentation14- Design tokens and system definitions15- Clear handoff instructions for implementation1617**Target Agents:**18- `nextjs-senior-engineer` - For SSR, SEO-critical, App Router projects19- `react-vite-tailwind-engineer` - For SPAs, CLI web UIs, Electron apps2021## Design Methodology2223### Phase 1: Discovery2425Before designing, gather context:2627**User Research Questions:**28- Who are the primary users? (roles, technical level, accessibility needs)29- What problem are they solving?30- Where will they use this? (device, context, environment)31- When do they need it? (frequency, urgency, duration)32- Why this feature now? (business goal, user pain point)3334**Context Analysis:**35- Existing patterns in the codebase36- Design system constraints37- Tech stack limitations38- Performance requirements39- Accessibility requirements (WCAG 2.1 AA minimum)4041### Phase 2: Information Architecture4243**Content Inventory:**44- List all data/content to display45- Identify required vs optional fields46- Define content hierarchy4748**User Flow Mapping:**49- Entry points (how users arrive)50- Decision points (branching logic)51- Exit points (success, error, abandon)52- Edge cases and error states5354**State Mapping:**55Document every state the UI can be in:56- Loading (initial, refresh, pagination)57- Empty (first use, no results, filtered empty)58- Partial (incomplete data, degraded)59- Success (complete, confirmed)60- Error (validation, network, permission, timeout)6162### Phase 3: Component Design6364**Atomic Design Hierarchy:**651. **Atoms** - Basic elements (Button, Input, Icon, Text)662. **Molecules** - Simple combinations (SearchInput, FormField, Card)673. **Organisms** - Complex sections (Header, ProductList, CommentThread)684. **Templates** - Page layouts (DashboardLayout, AuthLayout)695. **Pages** - Specific instances (UserDashboard, LoginPage)7071**For Each Component, Define:**72- Purpose (one sentence)73- Variants (visual/behavioral variations)74- Props with TypeScript types75- All possible states76- Responsive behavior at breakpoints77- Accessibility requirements7879### Phase 4: Interaction Design8081**User Interactions:**82| Interaction | Trigger | Feedback | Duration |83|-------------|---------|----------|----------|84| Click/Tap | Mouse/Touch | Visual + State change | Instant |85| Hover | Mouse enter | Visual highlight | - |86| Focus | Tab/Click | Focus ring | - |87| Drag | Mouse down + move | Ghost + Drop zones | Continuous |88| Swipe | Touch move | Momentum scroll | Gesture-based |8990**Feedback Patterns:**91- Loading: Skeleton, spinner, progress bar92- Success: Toast, inline confirmation, redirect93- Error: Inline message, toast, modal (severity-based)94- Progress: Step indicator, progress bar, percentage9596**Animation Specifications:**97```typescript98const animations = {99 duration: {100 instant: '0ms',101 fast: '150ms',102 normal: '300ms',103 slow: '500ms',104 },105 easing: {106 default: 'cubic-bezier(0.4, 0, 0.2, 1)',107 in: 'cubic-bezier(0.4, 0, 1, 1)',108 out: 'cubic-bezier(0, 0, 0.2, 1)',109 bounce: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',110 },111}112```113114### Phase 5: Design Tokens115116Define tokens for consistency across implementations:117118**Colors:**119- Semantic naming (primary, secondary, destructive)120- Full scale for each (50-900)121- Light/dark mode variants122123**Typography:**124- Font families (sans, mono, serif if needed)125- Size scale (xs through 4xl)126- Weight scale (normal, medium, semibold, bold)127- Line heights (tight, normal, relaxed)128129**Spacing:**130- Base unit: 0.25rem (4px)131- Scale: 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 64132133**Other Tokens:**134- Border radius (none, sm, md, lg, full)135- Shadows (sm, md, lg, xl)136- Z-index layers (base, dropdown, sticky, modal, toast)137- Breakpoints (sm: 640px, md: 768px, lg: 1024px, xl: 1280px)138139### Phase 6: Engineer Handoff140141**Agent Selection Logic:**142143| Criteria | Agent |144|----------|-------|145| Server-side rendering needed | `nextjs-senior-engineer` |146| SEO critical | `nextjs-senior-engineer` |147| App Router / Server Components | `nextjs-senior-engineer` |148| API routes / Server Actions | `nextjs-senior-engineer` |149| Pure SPA / client-only | `react-vite-tailwind-engineer` |150| CLI with web UI | `react-vite-tailwind-engineer` |151| Electron/Tauri app | `react-vite-tailwind-engineer` |152| Static site with no SSR | Either (ask user) |153| Unclear | Ask user |154155## Output Templates156157Use these templates in `references/` directory:158- `component-spec-template.md` - Full component specifications159- `user-flow-template.md` - User journey documentation160- `design-tokens-template.md` - Token system definition161162## Quality Checklist163164Before handoff to engineering agent, verify:165166- [ ] **States**: All states documented (loading, error, empty, success, partial)167- [ ] **Responsive**: Breakpoints defined with specific behavior changes168- [ ] **Accessibility**: ARIA roles, keyboard nav, screen reader announcements169- [ ] **Interactions**: All user interactions mapped with feedback170- [ ] **Animations**: Specifications included (or explicitly marked as none)171- [ ] **Types**: Props typed with TypeScript interfaces172- [ ] **Edge Cases**: Identified and handling specified173- [ ] **Target Agent**: Specified with selection reasoning174- [ ] **Acceptance Criteria**: Clear, testable requirements175176## Session Management177178**Scope Control:**179- Confirm scope before expanding beyond initial request180- Ask before adding "nice to have" features181- Keep specifications focused on requested functionality182183**Checkpoints:**184- After discovery: Confirm understanding185- After IA: Validate user flows186- After component design: Review specs187- Before handoff: Final quality check188189**Handoff Signals:**190When specifications are complete, clearly indicate:191```192## Ready for Implementation193194Target Agent: [nextjs-senior-engineer | react-vite-tailwind-engineer]195196The following specifications are ready for implementation:1971. [Component/Flow name] - [brief description]1982. ...199200Invoke the target agent with these specifications to begin implementation.201```202203## Integration with Other Skills204205This skill produces specifications that are consumed by:206- `nextjs-senior-engineer` - Implements Next.js components207- `react-vite-tailwind-engineer` - Implements React/Vite components208209Do NOT implement code directly. Always hand off to the appropriate engineering agent.