UI Forge — 5-Stage Design Forge
A production-grade UI design workflow that forges pixel-perfect, accessible, animated interfaces from Figma designs or text descriptions.
When to Use
- Building any UI from scratch: landing pages, dashboards, mobile apps, component libraries
- Converting a Figma design to code
- Creating branded interfaces that need design system consistency
- Adding motion and micro-interactions to existing components
- When the user says "build me a page", "design a UI", "implement this Figma", or "create a component"
Arguments
| Arg |
Default |
Description |
--figma-url URL |
— |
Figma file URL (triggers Entry A) |
--brand NAME |
— |
Brand from awesome-design-md (e.g. stripe, vercel, linear) |
--skip PHASES |
— |
Comma-separated phases to skip (e.g. animate,polish) |
--intensity LEVEL |
auto |
Motion intensity: low/medium/high (auto-detected from product type) |
The 5 Stages
Entry A (Figma) ──┐
├─→ Phase 1: Discover → Phase 2: Tokenize → Phase 3: Compose → Phase 4: Animate → Phase 5: Polish → Delivery
Entry B (Text) ──┘
↓
[Figma writeback?]
Quality Gate Protocol
Each phase has a quality gate. If a gate fails:
- Roll back to the previous phase and adjust
- Maximum 2 retries per phase
- After 2 retries, report the issue and ask user for guidance
Phase 1: Discover — Direction Finding
Entry A: Figma Design
When --figma-url is provided:
- Use
figma-developer-mcp → get_figma_data to extract node tree, components, styles
- Map Figma structures:
- Auto Layout → Flexbox (reliable)
- Nested Auto Layout → CSS Grid (reliable)
- Auto Layout wrap → Flex wrap (reliable)
- Absolute positioning + Constraints → Responsive (needs manual adjustment)
- Figma Variants → Component variants (partial support)
- Extract component instances → identify reusable components
- Extract Figma Variables → direct CSS variable conversion
Entry B: Text / Brand Description
When no Figma URL:
- Use
ui-ux-pro-max to search style direction:python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<user description>" --domain style
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<user description>" --domain product
- Use
awesome-design-md to match brand tokens — read ~/.claude/skills/awesome-design-md/design-md/<brand>.md
- Use
frontend-design-direction to set: purpose, audience, tone, memorable detail, constraints
Mixed Mode
When user provides "reference this site + change to dark style":
- Extract layout/structure from the reference
- Take colors/fonts from brand tokens
- Merge both into the design direction
Reference Sites
| Site |
How to use |
| Godly |
Browse similar product sites for visual direction. Use kimi-webbridge to navigate godly.website and filter by category. |
| Pageflow |
For narrative/scrolling pages, reference scrollytelling structures. Use kimi-webbridge to browse pageflow.app. |
Accessibility Pre-constraint
- Verify primary color contrast ratio ≥ 4.5:1 at this stage
- Confirm accessibility target: AA or AAA
Quality Gate Output
design-direction.md:
product_type: SaaS | landing | mobile | component-library
style_direction: [ui-ux-pro-max style name + AI prompt keywords]
brand_token_source: [awesome-design-md brand] | [custom]
reference_sites: [specific pages from Godly/Pageflow]
figma_node_id: [if applicable]
tech_stack: [detected from project]
interaction_mode: SPA | SSR | SSG | native
accessibility_level: AA | AAA
Skip Condition
- Project has DESIGN.md < 30 days old AND requirements unchanged → skip
- DESIGN.md > 30 days old → suggest re-discovery
Phase 2: Tokenize — Design Token Generation
Token Generation Flow
- Brand token base →
awesome-design-md brand → extract colors/typography/spacing/rounded/shadows
- Style enhancement →
ui-ux-pro-max search:python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<style>" --domain style
python3 ~/.claude/sskills/ui-ux-pro-max/scripts/search.py "<style>" --domain typography
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<style>" --domain color
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<style>" --design-system --variance N --motion N --density N
- Token systemization →
design-system skill → three-layer tokens (primitive → semantic → component)
- Figma variable mapping (if applicable) → Figma Variables → CSS variables
Reference Sites
| Site |
How to use |
| Animate UI |
Reference for motion timing/easing tokens |
| GSAP |
Standard motion durations: fast 150ms, normal 300ms, slow 600ms |
Accessibility Pre-constraint
- All color palettes validated for contrast at generation time
- Dark mode tokens generated simultaneously, not deferred
Quality Gate Output
Generate design-tokens.json with:
/* Primitive tokens */
:root {
/* Colors — light */
--color-primary: oklch(68% 0.21 250);
--color-canvas: oklch(98% 0 0);
--color-ink: oklch(18% 0 0);
/* Colors — dark */
--color-primary-dark: oklch(72% 0.21 250);
--color-canvas-dark: oklch(15% 0 0);
--color-ink-dark: oklch(95% 0 0);
/* Typography */
--text-display-xl: clamp(3rem, 1rem + 7vw, 8rem);
--text-body: clamp(1rem, 0.92rem + 0.4vw, 1.125rem);
/* Spacing */
--space-xs: 4px; --space-sm: 8px; --space-md: 16px;
--space-lg: 32px; --space-xl: 64px;
--space-section: clamp(4rem, 3rem + 5vw, 10rem);
/* Rounded */
--rounded-xs: 4px; --rounded-sm: 8px; --rounded-md: 12px;
--rounded-lg: 16px; --rounded-xl: 24px; --rounded-full: 9999px;
/* Shadows */
--shadow-subtle: 0 1px 2px rgba(0,0,0,0.05);
--shadow-medium: 0 4px 12px rgba(0,0,0,0.08);
--shadow-prominent: 0 8px 24px rgba(0,0,0,0.12);
/* Motion */
--motion-fast: 150ms; --motion-normal: 300ms; --motion-slow: 600ms;
--ease-default: cubic-bezier(0.16, 1, 0.3, 1);
--ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
--ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
--stagger-default: 50ms; --stagger-fast: 30ms; --stagger-slow: 80ms;
--distance-micro: 4px; --distance-small: 8px;
--distance-medium: 16px; --distance-large: 32px;
}
Skip Condition
- Project has token system + consistent with Phase 1 direction + brand unchanged → skip
- Brand or style changed → do not skip
- Minor tweaks → skip, do incremental update
Phase 3: Compose — Component Building
Component Generation Order (Strict Priority)
- Layout skeleton → Layout / Header / Main / Footer / Sidebar
- Core blocks → Hero / Data tables / Primary interaction areas
- Reusable components → Button / Card / Badge / Input / Select
- Auxiliary components → Toast / Tooltip / Modal / Dropdown
Build skeleton first, then fill in. Never generate all components at once.
UI Type Routing
| Type |
Strategy |
Sub-skills |
| Landing page |
Hero/CTA/Feature/Testimonial structure |
banner-design + ui-styling |
| SaaS dashboard |
Table/Form/Modal/Sidebar/Charts |
ui-styling + design-system |
| Mobile UI |
Responsive + platform patterns |
ui-styling + responsive tokens |
| Component library |
shadcn/ui base + custom variants |
ui-styling |
| Advanced motion |
3D Canvas + particles + Lottie placeholders |
ui-styling + motion scaffolds |
Component Reuse Detection
Before generating, scan existing project components:
- Has shadcn Button? → Don't regenerate
- Has custom Card? → Check token compatibility, reuse if compatible
- Use
find and grep to detect existing components
Accessibility Pre-constraint
- Component skeletons include ARIA attributes from the start
- Interactive components include keyboard navigation from the start
- Touch targets ≥ 44px
Reference Sites
| Site |
How to use |
| React Bits |
Small components + micro-interaction snippets. Browse reactbits.dev for copy-ready patterns. |
| Aceternity UI |
High-end motion components (3D Card, Spotlight, Beam, etc.). Reference ui.aceternity.com. |
| shadcn/ui |
Base component specs. Reference ui.shadcn.com for accessible component patterns. |
Quality Gate Output
component-tree.md:
tech_stack: [detected]
generation_order: [layout → core → reusable → auxiliary]
component_tree:
Layout → Header / Main / Footer
Header → Nav / Logo / CTA
Main → Hero / Features / CTA
reusable_components: [list with token compatibility check]
file_structure: src/components/{hero,features,ui}/
responsive_breakpoints: 320 / 768 / 1024 / 1440
code_skeletons: [props + structure + class names only, not full implementation]
Skip Condition
- Existing component library compatible with token system → skip
- Only needs animation/polish → skip
Phase 4: Animate — Motion Injection
Motion Intensity Auto-Detection
| Product Type |
Intensity |
Typical Motion |
| Landing page |
High |
Scroll narrative, parallax, entrance, particles |
| SaaS dashboard |
Low |
Micro-interactions, state transitions, skeleton screens |
| Mobile UI |
Medium |
Gestures, page transitions, haptic feedback |
| Component library |
Micro |
hover, focus, active, loading states |
Override with --intensity high|medium|low.
Motion Pattern Matching
| Motion Type |
Implementation |
Reference |
| Entrance |
motion/react whileInView / GSAP ScrollTrigger |
Motion / Motion Primitives |
| State transition |
AnimatePresence + motion variants |
Framer Motion |
| Scroll narrative |
GSAP Timeline + ScrollTrigger |
GSAP / Pageflow |
| Micro-interaction |
CSS transitions / motion/react whileHover/whileTap |
Animate UI / React Bits |
| 3D / Particles |
Three.js / ts-particles / Lottie |
GSAP Showcase |
Using ui-ux-pro-max for GSAP Patterns
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "scroll reveal" --domain gsap
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "stagger entrance" --domain gsap
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "page transition" --domain gsap
Tech Stack Motion Mapping
| Stack |
Motion Library |
| React + Tailwind |
motion/react + GSAP (for complex) |
| Next.js + Tailwind |
motion/react + GSAP (for complex) |
| Vue + Nuxt |
@vueuse/motion |
| Svelte |
svelte/motion + svelte/transition |
| SwiftUI |
.animation() + withAnimation |
| Flutter |
AnimationController + ImplicitlyAnimatedWidget |
Accessibility Pre-constraint
- ALL motion must support
prefers-reduced-motion
- Reduced motion fallback: opacity transitions only, duration: 0ms
- Implement via:
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
// motion/react
const shouldReduceMotion = useReducedMotion()
Reference Sites
| Site |
How to use |
| Framer Motion |
React motion standard library. Reference motion.dev for API patterns. |
| Motion Primitives |
Base animation modules (entrance, exit, spring). Reference motion-primitives.com. |
| GSAP |
Professional animation (ScrollTrigger, Timeline, SVG path). Reference gsap.com. |
| GSAP Showcase |
Top-tier motion case studies. Reference gsap.com/showcase. |
| Animate UI |
Pure CSS motion fallback (hover, scroll-triggered). Reference animate-ui.com. |
Quality Gate Output
animation-spec.md:
intensity: high | medium | low
entrance: { type, duration, stagger, easing }
scroll: { type, trigger, scrub }
micro: { hover, focus, active }
states: { loading, success, error, empty }
reduced_motion: { fallback, duration }
implementation: [motion code per component]
Skip Condition
--skip animate flag
- SaaS dashboard + user explicitly declines motion
- Simple utility page with no interaction
Phase 5: Polish — Micro-interaction Refinement
1. Visual Polish (make-interfaces-feel-better)
Concentric radius: outer radius = inner radius + padding
Optical alignment: offset asymmetric icons by 1-2px
Layered shadows: transparent, subtle, background-compatible
Text wrapping:
text-wrap: balance on headings and short titles
text-wrap: pretty on body text, captions, descriptions
- Neither on long prose or code
Tabular numbers:
font-variant-numeric: tabular-nums for counters, prices, timers
Image outlines: outline: 1px solid rgba(0,0,0,0.1); outline-offset: -1px
Font smoothing: -webkit-font-smoothing: antialiased on macOS
2. Interaction State Completion
Every interactive component must have:
- hover — visual feedback on mouse-over
- focus — visible focus ring (2px offset, brand color)
- active — pressed/engaged state
- disabled — reduced opacity + not-interactive
- loading — skeleton or spinner
- error — error message + red accent
- empty — empty state illustration or message
Touch targets ≥ 44px. Keyboard navigation complete.
3. Brand Consistency Check (brand)
- Token usage: all colors/fonts/spacing strictly follow tokens
- Tone: copywriting style matches brand voice
- Dark mode: all components have complete dark mode variants
- No hardcoded values outside the token system
4. Responsive Verification
- 320px / 768px / 1024px / 1440px breakpoints
- No text overflow, no image clipping, no layout shift
clamp() for fluid typography and spacing
min() / max() for boundary constraints
5. Accessibility Final Verification
prefers-reduced-motion all motion degrades correctly
- All text meets AA (4.5:1) or AAA (7:1) contrast
- ARIA attributes complete on all interactive elements
- Keyboard navigation reaches every interactive element
- Screen reader order matches visual order
Reference Sites
| Site |
How to use |
| React Bits |
Micro-interaction detail patterns. Reference reactbits.dev. |
Quality Gate Output
polish-checklist.md:
visual: [concentric-radius ✓ optical-align ✓ shadows ✓ text-wrap ✓ tabular-nums ✓ image-outlines ✓ font-smoothing ✓]
interaction: [hover ✓ focus ✓ active ✓ disabled ✓ loading ✓ error ✓ empty ✓]
brand: [token-consistency ✓ tone ✓ dark-mode ✓]
responsive: [320 ✓ 768 ✓ 1024 ✓ 1440 ✓ no-overflow ✓]
accessibility: [reduced-motion ✓ focus-ring ✓ contrast ✓ ARIA ✓ keyboard ✓]
Final Deliverables
src/components/**/*.tsx — Component code
src/styles/tokens.css — CSS variables
src/styles/tokens.json — Token JSON (for Figma writeback)
DESIGN.md — Design direction document
polish-checklist.md — Polish checklist
Figma Writeback (when Entry A was used)
- New tokens → write back to Figma Variables
- Component variants → update Figma component library
- Forms Figma ↔ Code bidirectional loop
Skip Condition
Sub-Skill Call Map
| Phase |
Sub-Skills |
Reference Sites |
| Discover |
frontend-design-direction, ui-ux-pro-max, awesome-design-md, figma-developer-mcp |
Godly, Pageflow |
| Tokenize |
design-system, ui-ux-pro-max, awesome-design-md |
Animate UI, GSAP |
| Compose |
ui-styling, banner-design, design-system |
React Bits, Aceternity UI, shadcn/ui |
| Animate |
motion-ui, ui-ux-pro-max(--domain gsap) |
Framer Motion, Motion Primitives, GSAP, GSAP Showcase, Animate UI |
| Polish |
make-interfaces-feel-better, brand |
React Bits |
9 Reference Sites — Complete Assignment
| # |
Site |
Phases |
Role |
| 1 |
React Bits |
3, 5 |
Component snippets + micro-interaction details |
| 2 |
Motion Primitives |
4 |
Base animation modules |
| 3 |
Aceternity UI |
3 |
High-end motion component reference |
| 4 |
Framer Motion |
4 |
React motion standard library |
| 5 |
GSAP |
2, 4 |
Token standards + professional animation |
| 6 |
Pageflow |
1, 4 |
Narrative structure + scroll narrative |
| 7 |
Godly |
1 |
Similar product visual direction |
| 8 |
Animate UI |
2, 4 |
Motion tokens + CSS motion fallback |
| 9 |
GSAP Showcase |
4 |
Top-tier motion case studies |
Usage Examples
# Full pipeline from text
ui-forge "Build a Stripe-style pricing page for my SaaS"
# From Figma design
ui-forge --figma-url https://figma.com/design/abc123/My-Design
# Skip animation for a dashboard
ui-forge "Admin dashboard with user management" --skip animate
# Specific brand with high motion
ui-forge "Product launch landing page" --brand vercel --intensity high
# Component library only
ui-forge "Design system button variants" --skip animate,polish
Accessibility Throughout
Not just Phase 5 — every phase has pre-constraints:
| Phase |
Constraint |
| Discover |
Primary contrast ≥ 4.5:1, confirm AA/AAA target |
| Tokenize |
All palettes contrast-validated, dark mode generated simultaneously |
| Compose |
Skeletons include ARIA + keyboard navigation |
| Animate |
All motion supports prefers-reduced-motion |
| Polish |
Final verify: contrast + ARIA + focus + keyboard + reduced-motion |
Tech Stack Adaptation
| Stack |
Phase 3 Source |
Phase 4 Library |
| React + Tailwind |
shadcn/ui + Radix |
motion/react |
| Next.js + Tailwind |
shadcn/ui + Radix |
motion/react + GSAP |
| Vue + Nuxt |
Nuxt UI |
@vueuse/motion |
| Svelte + SvelteKit |
shadcn-svelte |
svelte/motion |
| SwiftUI |
Native components |
.animation() |
| Flutter |
Material/Cupertino |
Flutter animations |
1---2name: ui-forge3description: 5-stage UI design forge: Discover → Tokenize → Compose → Animate → Polish. Integrates 9 sub-skills (ui-ux-pro-max, awesome-design-md, ui-styling, motion-ui, frontend-design-direction, make-interfaces-feel-better, design-system, design, brand) + 9 reference sites (React Bits, Motion Primitives, Aceternity UI, Framer Motion, GSAP, Pageflow, Godly, Animate UI, GSAP Showcase) + Figma MCP. Covers landing pages, SaaS dashboards, mobile UI, component libraries, and advanced motion. Use when building any UI from scratch or from a Figma design.4---56# UI Forge — 5-Stage Design Forge78A production-grade UI design workflow that forges pixel-perfect, accessible, animated interfaces from Figma designs or text descriptions.910## When to Use1112- Building any UI from scratch: landing pages, dashboards, mobile apps, component libraries13- Converting a Figma design to code14- Creating branded interfaces that need design system consistency15- Adding motion and micro-interactions to existing components16- When the user says "build me a page", "design a UI", "implement this Figma", or "create a component"1718## Arguments1920| Arg | Default | Description |21|-----|---------|-------------|22| `--figma-url URL` | — | Figma file URL (triggers Entry A) |23| `--brand NAME` | — | Brand from awesome-design-md (e.g. stripe, vercel, linear) |24| `--skip PHASES` | — | Comma-separated phases to skip (e.g. `animate,polish`) |25| `--intensity LEVEL` | auto | Motion intensity: low/medium/high (auto-detected from product type) |2627---2829## The 5 Stages3031```32Entry A (Figma) ──┐33 ├─→ Phase 1: Discover → Phase 2: Tokenize → Phase 3: Compose → Phase 4: Animate → Phase 5: Polish → Delivery34Entry B (Text) ──┘35 ↓36 [Figma writeback?]37```3839### Quality Gate Protocol4041Each phase has a quality gate. If a gate fails:421. Roll back to the previous phase and adjust432. Maximum 2 retries per phase443. After 2 retries, report the issue and ask user for guidance4546---4748## Phase 1: Discover — Direction Finding4950### Entry A: Figma Design5152When `--figma-url` is provided:53541. Use `figma-developer-mcp` → `get_figma_data` to extract node tree, components, styles552. Map Figma structures:56 - Auto Layout → Flexbox (reliable)57 - Nested Auto Layout → CSS Grid (reliable)58 - Auto Layout wrap → Flex wrap (reliable)59 - Absolute positioning + Constraints → Responsive (needs manual adjustment)60 - Figma Variants → Component variants (partial support)613. Extract component instances → identify reusable components624. Extract Figma Variables → direct CSS variable conversion6364### Entry B: Text / Brand Description6566When no Figma URL:67681. Use `ui-ux-pro-max` to search style direction:69 ```bash70 python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<user description>" --domain style71 python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<user description>" --domain product72 ```732. Use `awesome-design-md` to match brand tokens — read `~/.claude/skills/awesome-design-md/design-md/<brand>.md`743. Use `frontend-design-direction` to set: purpose, audience, tone, memorable detail, constraints7576### Mixed Mode7778When user provides "reference this site + change to dark style":79- Extract layout/structure from the reference80- Take colors/fonts from brand tokens81- Merge both into the design direction8283### Reference Sites8485| Site | How to use |86|------|-----------|87| **Godly** | Browse similar product sites for visual direction. Use kimi-webbridge to navigate godly.website and filter by category. |88| **Pageflow** | For narrative/scrolling pages, reference scrollytelling structures. Use kimi-webbridge to browse pageflow.app. |8990### Accessibility Pre-constraint9192- Verify primary color contrast ratio ≥ 4.5:1 at this stage93- Confirm accessibility target: AA or AAA9495### Quality Gate Output9697```yaml98design-direction.md:99 product_type: SaaS | landing | mobile | component-library100 style_direction: [ui-ux-pro-max style name + AI prompt keywords]101 brand_token_source: [awesome-design-md brand] | [custom]102 reference_sites: [specific pages from Godly/Pageflow]103 figma_node_id: [if applicable]104 tech_stack: [detected from project]105 interaction_mode: SPA | SSR | SSG | native106 accessibility_level: AA | AAA107```108109### Skip Condition110111- Project has DESIGN.md < 30 days old AND requirements unchanged → skip112- DESIGN.md > 30 days old → suggest re-discovery113114---115116## Phase 2: Tokenize — Design Token Generation117118### Token Generation Flow1191201. **Brand token base** → `awesome-design-md` brand → extract colors/typography/spacing/rounded/shadows1212. **Style enhancement** → `ui-ux-pro-max` search:122 ```bash123 python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<style>" --domain style124 python3 ~/.claude/sskills/ui-ux-pro-max/scripts/search.py "<style>" --domain typography125 python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<style>" --domain color126 python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<style>" --design-system --variance N --motion N --density N127 ```1283. **Token systemization** → `design-system` skill → three-layer tokens (primitive → semantic → component)1294. **Figma variable mapping** (if applicable) → Figma Variables → CSS variables130131### Reference Sites132133| Site | How to use |134|------|-----------|135| **Animate UI** | Reference for motion timing/easing tokens |136| **GSAP** | Standard motion durations: fast 150ms, normal 300ms, slow 600ms |137138### Accessibility Pre-constraint139140- All color palettes validated for contrast at generation time141- Dark mode tokens generated simultaneously, not deferred142143### Quality Gate Output144145Generate `design-tokens.json` with:146147```css148/* Primitive tokens */149:root {150 /* Colors — light */151 --color-primary: oklch(68% 0.21 250);152 --color-canvas: oklch(98% 0 0);153 --color-ink: oklch(18% 0 0);154 /* Colors — dark */155 --color-primary-dark: oklch(72% 0.21 250);156 --color-canvas-dark: oklch(15% 0 0);157 --color-ink-dark: oklch(95% 0 0);158 /* Typography */159 --text-display-xl: clamp(3rem, 1rem + 7vw, 8rem);160 --text-body: clamp(1rem, 0.92rem + 0.4vw, 1.125rem);161 /* Spacing */162 --space-xs: 4px; --space-sm: 8px; --space-md: 16px;163 --space-lg: 32px; --space-xl: 64px;164 --space-section: clamp(4rem, 3rem + 5vw, 10rem);165 /* Rounded */166 --rounded-xs: 4px; --rounded-sm: 8px; --rounded-md: 12px;167 --rounded-lg: 16px; --rounded-xl: 24px; --rounded-full: 9999px;168 /* Shadows */169 --shadow-subtle: 0 1px 2px rgba(0,0,0,0.05);170 --shadow-medium: 0 4px 12px rgba(0,0,0,0.08);171 --shadow-prominent: 0 8px 24px rgba(0,0,0,0.12);172 /* Motion */173 --motion-fast: 150ms; --motion-normal: 300ms; --motion-slow: 600ms;174 --ease-default: cubic-bezier(0.16, 1, 0.3, 1);175 --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);176 --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);177 --stagger-default: 50ms; --stagger-fast: 30ms; --stagger-slow: 80ms;178 --distance-micro: 4px; --distance-small: 8px;179 --distance-medium: 16px; --distance-large: 32px;180}181```182183### Skip Condition184185- Project has token system + consistent with Phase 1 direction + brand unchanged → skip186- Brand or style changed → do not skip187- Minor tweaks → skip, do incremental update188189---190191## Phase 3: Compose — Component Building192193### Component Generation Order (Strict Priority)1941951. **Layout skeleton** → Layout / Header / Main / Footer / Sidebar1962. **Core blocks** → Hero / Data tables / Primary interaction areas1973. **Reusable components** → Button / Card / Badge / Input / Select1984. **Auxiliary components** → Toast / Tooltip / Modal / Dropdown199200Build skeleton first, then fill in. Never generate all components at once.201202### UI Type Routing203204| Type | Strategy | Sub-skills |205|------|----------|-----------|206| Landing page | Hero/CTA/Feature/Testimonial structure | `banner-design` + `ui-styling` |207| SaaS dashboard | Table/Form/Modal/Sidebar/Charts | `ui-styling` + `design-system` |208| Mobile UI | Responsive + platform patterns | `ui-styling` + responsive tokens |209| Component library | shadcn/ui base + custom variants | `ui-styling` |210| Advanced motion | 3D Canvas + particles + Lottie placeholders | `ui-styling` + motion scaffolds |211212### Component Reuse Detection213214Before generating, scan existing project components:215- Has shadcn Button? → Don't regenerate216- Has custom Card? → Check token compatibility, reuse if compatible217- Use `find` and `grep` to detect existing components218219### Accessibility Pre-constraint220221- Component skeletons include ARIA attributes from the start222- Interactive components include keyboard navigation from the start223- Touch targets ≥ 44px224225### Reference Sites226227| Site | How to use |228|------|-----------|229| **React Bits** | Small components + micro-interaction snippets. Browse reactbits.dev for copy-ready patterns. |230| **Aceternity UI** | High-end motion components (3D Card, Spotlight, Beam, etc.). Reference ui.aceternity.com. |231| **shadcn/ui** | Base component specs. Reference ui.shadcn.com for accessible component patterns. |232233### Quality Gate Output234235```yaml236component-tree.md:237 tech_stack: [detected]238 generation_order: [layout → core → reusable → auxiliary]239 component_tree:240 Layout → Header / Main / Footer241 Header → Nav / Logo / CTA242 Main → Hero / Features / CTA243 reusable_components: [list with token compatibility check]244 file_structure: src/components/{hero,features,ui}/245 responsive_breakpoints: 320 / 768 / 1024 / 1440246 code_skeletons: [props + structure + class names only, not full implementation]247```248249### Skip Condition250251- Existing component library compatible with token system → skip252- Only needs animation/polish → skip253254---255256## Phase 4: Animate — Motion Injection257258### Motion Intensity Auto-Detection259260| Product Type | Intensity | Typical Motion |261|-------------|-----------|---------------|262| Landing page | **High** | Scroll narrative, parallax, entrance, particles |263| SaaS dashboard | **Low** | Micro-interactions, state transitions, skeleton screens |264| Mobile UI | **Medium** | Gestures, page transitions, haptic feedback |265| Component library | **Micro** | hover, focus, active, loading states |266267Override with `--intensity high|medium|low`.268269### Motion Pattern Matching270271| Motion Type | Implementation | Reference |272|-------------|---------------|-----------|273| Entrance | `motion/react` whileInView / GSAP ScrollTrigger | Motion / Motion Primitives |274| State transition | AnimatePresence + motion variants | Framer Motion |275| Scroll narrative | GSAP Timeline + ScrollTrigger | GSAP / Pageflow |276| Micro-interaction | CSS transitions / `motion/react` whileHover/whileTap | Animate UI / React Bits |277| 3D / Particles | Three.js / ts-particles / Lottie | GSAP Showcase |278279### Using ui-ux-pro-max for GSAP Patterns280281```bash282python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "scroll reveal" --domain gsap283python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "stagger entrance" --domain gsap284python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "page transition" --domain gsap285```286287### Tech Stack Motion Mapping288289| Stack | Motion Library |290|-------|---------------|291| React + Tailwind | motion/react + GSAP (for complex) |292| Next.js + Tailwind | motion/react + GSAP (for complex) |293| Vue + Nuxt | @vueuse/motion |294| Svelte | svelte/motion + svelte/transition |295| SwiftUI | .animation() + withAnimation |296| Flutter | AnimationController + ImplicitlyAnimatedWidget |297298### Accessibility Pre-constraint299300- ALL motion must support `prefers-reduced-motion`301- Reduced motion fallback: opacity transitions only, duration: 0ms302- Implement via:303304```css305@media (prefers-reduced-motion: reduce) {306 *, *::before, *::after {307 animation-duration: 0.01ms !important;308 transition-duration: 0.01ms !important;309 }310}311```312313```tsx314// motion/react315const shouldReduceMotion = useReducedMotion()316```317318### Reference Sites319320| Site | How to use |321|------|-----------|322| **Framer Motion** | React motion standard library. Reference motion.dev for API patterns. |323| **Motion Primitives** | Base animation modules (entrance, exit, spring). Reference motion-primitives.com. |324| **GSAP** | Professional animation (ScrollTrigger, Timeline, SVG path). Reference gsap.com. |325| **GSAP Showcase** | Top-tier motion case studies. Reference gsap.com/showcase. |326| **Animate UI** | Pure CSS motion fallback (hover, scroll-triggered). Reference animate-ui.com. |327328### Quality Gate Output329330```yaml331animation-spec.md:332 intensity: high | medium | low333 entrance: { type, duration, stagger, easing }334 scroll: { type, trigger, scrub }335 micro: { hover, focus, active }336 states: { loading, success, error, empty }337 reduced_motion: { fallback, duration }338 implementation: [motion code per component]339```340341### Skip Condition342343- `--skip animate` flag344- SaaS dashboard + user explicitly declines motion345- Simple utility page with no interaction346347---348349## Phase 5: Polish — Micro-interaction Refinement350351### 1. Visual Polish (`make-interfaces-feel-better`)352353**Concentric radius:** outer radius = inner radius + padding354**Optical alignment:** offset asymmetric icons by 1-2px355**Layered shadows:** transparent, subtle, background-compatible356**Text wrapping:**357- `text-wrap: balance` on headings and short titles358- `text-wrap: pretty` on body text, captions, descriptions359- Neither on long prose or code360**Tabular numbers:** `font-variant-numeric: tabular-nums` for counters, prices, timers361**Image outlines:** `outline: 1px solid rgba(0,0,0,0.1); outline-offset: -1px`362**Font smoothing:** `-webkit-font-smoothing: antialiased` on macOS363364### 2. Interaction State Completion365366Every interactive component must have:367- **hover** — visual feedback on mouse-over368- **focus** — visible focus ring (2px offset, brand color)369- **active** — pressed/engaged state370- **disabled** — reduced opacity + not-interactive371- **loading** — skeleton or spinner372- **error** — error message + red accent373- **empty** — empty state illustration or message374375Touch targets ≥ 44px. Keyboard navigation complete.376377### 3. Brand Consistency Check (`brand`)378379- Token usage: all colors/fonts/spacing strictly follow tokens380- Tone: copywriting style matches brand voice381- Dark mode: all components have complete dark mode variants382- No hardcoded values outside the token system383384### 4. Responsive Verification385386- 320px / 768px / 1024px / 1440px breakpoints387- No text overflow, no image clipping, no layout shift388- `clamp()` for fluid typography and spacing389- `min()` / `max()` for boundary constraints390391### 5. Accessibility Final Verification392393- `prefers-reduced-motion` all motion degrades correctly394- All text meets AA (4.5:1) or AAA (7:1) contrast395- ARIA attributes complete on all interactive elements396- Keyboard navigation reaches every interactive element397- Screen reader order matches visual order398399### Reference Sites400401| Site | How to use |402|------|-----------|403| **React Bits** | Micro-interaction detail patterns. Reference reactbits.dev. |404405### Quality Gate Output406407```yaml408polish-checklist.md:409 visual: [concentric-radius ✓ optical-align ✓ shadows ✓ text-wrap ✓ tabular-nums ✓ image-outlines ✓ font-smoothing ✓]410 interaction: [hover ✓ focus ✓ active ✓ disabled ✓ loading ✓ error ✓ empty ✓]411 brand: [token-consistency ✓ tone ✓ dark-mode ✓]412 responsive: [320 ✓ 768 ✓ 1024 ✓ 1440 ✓ no-overflow ✓]413 accessibility: [reduced-motion ✓ focus-ring ✓ contrast ✓ ARIA ✓ keyboard ✓]414```415416### Final Deliverables417418```419src/components/**/*.tsx — Component code420src/styles/tokens.css — CSS variables421src/styles/tokens.json — Token JSON (for Figma writeback)422DESIGN.md — Design direction document423polish-checklist.md — Polish checklist424```425426### Figma Writeback (when Entry A was used)427428- New tokens → write back to Figma Variables429- Component variants → update Figma component library430- Forms Figma ↔ Code bidirectional loop431432### Skip Condition433434- `--skip polish` flag435436---437438## Sub-Skill Call Map439440| Phase | Sub-Skills | Reference Sites |441|-------|-----------|----------------|442| Discover | frontend-design-direction, ui-ux-pro-max, awesome-design-md, figma-developer-mcp | Godly, Pageflow |443| Tokenize | design-system, ui-ux-pro-max, awesome-design-md | Animate UI, GSAP |444| Compose | ui-styling, banner-design, design-system | React Bits, Aceternity UI, shadcn/ui |445| Animate | motion-ui, ui-ux-pro-max(--domain gsap) | Framer Motion, Motion Primitives, GSAP, GSAP Showcase, Animate UI |446| Polish | make-interfaces-feel-better, brand | React Bits |447448## 9 Reference Sites — Complete Assignment449450| # | Site | Phases | Role |451|---|------|--------|------|452| 1 | React Bits | 3, 5 | Component snippets + micro-interaction details |453| 2 | Motion Primitives | 4 | Base animation modules |454| 3 | Aceternity UI | 3 | High-end motion component reference |455| 4 | Framer Motion | 4 | React motion standard library |456| 5 | GSAP | 2, 4 | Token standards + professional animation |457| 6 | Pageflow | 1, 4 | Narrative structure + scroll narrative |458| 7 | Godly | 1 | Similar product visual direction |459| 8 | Animate UI | 2, 4 | Motion tokens + CSS motion fallback |460| 9 | GSAP Showcase | 4 | Top-tier motion case studies |461462## Usage Examples463464```465# Full pipeline from text466ui-forge "Build a Stripe-style pricing page for my SaaS"467468# From Figma design469ui-forge --figma-url https://figma.com/design/abc123/My-Design470471# Skip animation for a dashboard472ui-forge "Admin dashboard with user management" --skip animate473474# Specific brand with high motion475ui-forge "Product launch landing page" --brand vercel --intensity high476477# Component library only478ui-forge "Design system button variants" --skip animate,polish479```480481## Accessibility Throughout482483Not just Phase 5 — every phase has pre-constraints:484485| Phase | Constraint |486|-------|-----------|487| Discover | Primary contrast ≥ 4.5:1, confirm AA/AAA target |488| Tokenize | All palettes contrast-validated, dark mode generated simultaneously |489| Compose | Skeletons include ARIA + keyboard navigation |490| Animate | All motion supports prefers-reduced-motion |491| Polish | Final verify: contrast + ARIA + focus + keyboard + reduced-motion |492493## Tech Stack Adaptation494495| Stack | Phase 3 Source | Phase 4 Library |496|-------|---------------|----------------|497| React + Tailwind | shadcn/ui + Radix | motion/react |498| Next.js + Tailwind | shadcn/ui + Radix | motion/react + GSAP |499| Vue + Nuxt | Nuxt UI | @vueuse/motion |500| Svelte + SvelteKit | shadcn-svelte | svelte/motion |501| SwiftUI | Native components | .animation() |502| Flutter | Material/Cupertino | Flutter animations |