Better-UI-UX Skill
1. What This Skill Provides
Six MCP tools for production UI development: suggest_design_system returns 3 complete design system candidates with fonts, colors, icons, and type scale. search_palettes queries 172 curated palettes via BM25 scoring with synonym expansion. transform_component applies glassmorphism, neumorphism, brutalist, or minimal-animated styles to any HTML/JSX. generate_logo creates minimal SVG logos in three styles. generate_icon produces 114 parametric SVG icons from shape primitives with animation support. inject_animations injects GSAP + ScrollTrigger scroll-reveal, stagger, pin-scrub, hover-lift, or combination patterns. Curated database, smart typography pairing, and production-ready animation patterns included.
2. When to Apply — Activation Table
| Use when |
Skip when |
| User asks for design system, colors, palette, icons, animations, component styling, UI transformation |
User is debugging logic, writing tests, configuring CI, working on non-UI code |
| "Make it beautiful", "improve the design", "looks boring", "needs polish" |
Backend API development or database schema work |
| Building or styling web UIs — landing pages, dashboards, SaaS, portfolios, e-commerce |
DevOps, infrastructure, or deployment configuration |
| Choosing color palettes, typography pairings, or icon sets |
Unit testing, integration testing, or test coverage |
| Generating SVG logos or parametric icons not in standard libraries |
Performance tuning unrelated to visual interface |
| Adding GSAP/ScrollTrigger scroll animations or micro-interactions |
Non-visual automation scripts, CLI tools, data processing |
| Transforming component visual styles (glassmorphism, neumorphism, brutalist) |
Accessibility audit unrelated to visual design (semantic HTML, ARIA roles) |
| User says "this UI feels off" or "needs more personality" |
Build system configuration, bundler settings, dependency management |
Decision rule: If the task changes how something looks, feels, moves, or is interacted with visually, activate this skill.
3. Mandatory Elicitation Protocol
THIS SECTION IS MANDATORY. Before generating any design system, palette, icon, animation, or component transformation, the agent MUST gather requirements. Do not skip. Do not guess. Do not proceed with partial information without explicit user confirmation.
Required Questions (Must Ask Before ANY Generation)
| # |
Question |
Why It Matters |
Example Answers |
| 1 |
Project type — What are you building? |
Determines layout patterns, component density, interaction models |
SaaS, portfolio, e-commerce, blog, dashboard, mobile app, landing page, admin panel |
| 2 |
Industry/domain — What space is this in? |
Constrains palette (no neon green in healthcare), icon choices, trust signals |
Finance, healthcare, gaming, education, food, travel, real estate, tech, creative, legal |
| 3 |
Mood/tone — How should it feel? |
Drives typography personality, color saturation, animation intensity, spacing rhythm |
Professional, playful, elegant, minimal, bold, brutalist, luxury, warm, cool, futuristic |
| 4 |
Target audience — Who uses this? |
Affects information density, jargon tolerance, visual complexity, accessibility needs |
Developers, consumers, enterprise, creatives, kids, elderly, mixed audience |
| 5 |
Frontend stack — What tech? |
Determines CSS approach (Tailwind vs CSS modules vs inline), component patterns, animation library |
React, Vue, Svelte, vanilla, Next.js, Nuxt, Astro, HTML/CSS only |
| 6 |
Colors to avoid — Any exclusions? |
Prevents clash with existing brand, cultural sensitivities, accessibility requirements |
"No red", "avoid yellow", "nothing too saturated" |
Optional but Recommended
| # |
Question |
Why It Helps |
| 7 |
Existing brand colors — Hex values? |
Uses customColors parameter to honor brand constraints in design system |
| 8 |
Existing logo — Do you already have a logo file/URL? |
If yes, do NOT call generate_logo — preserve the user's brand asset |
| 9 |
Competitor designs — What to differentiate from? |
Avoids accidental similarity, helps find unique positioning |
| 10 |
Accessibility requirements — WCAG level? |
Constrains contrast ratios, font sizes, animation intensity (AAA vs AA) |
Inference Rules (When User Provides Partial Info)
Apply these inference rules automatically. State what you inferred and ask for confirmation before proceeding.
| If user mentions... |
Infer project type |
Infer mood |
| Project name contains "tech", "start.io", "app", "dev" |
Tech startup, SaaS |
Modern, minimal, clean |
| Description mentions "finance", "pay", "bank", "invest" |
Fintech, financial dashboard |
Professional, trustworthy, stable |
| Description mentions "kids", "young", "play", "learn" |
EdTech, children's app |
Playful, colorful, friendly |
| Description mentions "luxury", "premium", "exclusive", "boutique" |
Luxury brand, premium service |
Elegant, dark/gold, restrained |
| Description mentions "health", "med", "clinic", "well" |
Healthcare, wellness |
Calm, clean, trustworthy, blue/green |
| Description mentions "game", "esport", "stream" |
Gaming, entertainment |
Bold, vibrant, high-contrast, neon accents |
| Description mentions "food", "restaurant", "recipe", "menu" |
Food industry, restaurant |
Warm, appetizing, rich colors |
| Description mentions "travel", "hotel", "booking" |
Travel, hospitality |
Inviting, airy, aspirational |
| Description mentions "photo", "design", "art", "creative" |
Portfolio, creative agency |
Expressive, unconventional, strong typography |
| Description mentions "data", "analytics", "metrics", "monitor" |
Dashboard, analytics tool |
Functional, data-dense, neutral with accent |
Enforcement Rules
- The agent MUST include at least one elicitation question in its first response.
- If the user has already provided enough context (project type + industry + mood), the agent should state what it inferred and ask for confirmation — do NOT ask every question verbatim.
- If the user says "use your judgment" or "you decide", document your assumptions and proceed.
- Never generate a design system without knowing at least: project type + one of (industry or mood).
- If only project type is known, infer industry from name/description and state the inference.
4. MCP Tool Reference
Tool 1: suggest_design_system
When to call: Initial setup of any UI project. Returns 3 complete design system candidates with typography (heading + body fonts), color palette (primary/secondary/accent/background/text), icon library recommendation, type scale, and reasoning for each choice.
Required params:
projectName (string) — Name of the project
Optional params:
description (string) — Brief description of the project
mood (string) — One of: corporate, playful, minimal, modern, elegant, brutalist, saas, creative, luxury, tech, health, education, gaming, fintech
customColors (object) — Exact colors to use instead of suggested palette. Properties: primary, secondary, accent, background, text (each a hex string)
Returns: Object with 3 DesignSystemCandidate entries, each containing: name, description, headingFont (family, weights, googleFontsURL), bodyFont (family, weights, googleFontsURL), colorPalette (primary, secondary, accent, background, text), iconSet (set name + reason), typeScale (modular scale tokens), paletteId, wcagAA (boolean), wcagAAA (boolean).
Example:
{
"tool": "suggest_design_system",
"params": {
"projectName": "PayFlow",
"description": "Payment processing for small businesses",
"mood": "corporate",
"customColors": { "primary": "#1a73e8" }
}
}
Anti-patterns:
- Do not call without completing elicitation first
- Do not ignore
customColors when user provides brand colors
- Do not present all 3 candidates as equal — recommend one with reasoning
Tool 2: search_palettes
When to call: When user needs color palettes for a specific mood/industry, or when suggest_design_system candidates need refinement. Searches 172 curated palettes via BM25 scoring with synonym expansion, IDF weighting, and category boosting.
Required params:
query (string) — 2-5 keywords for palette search. Use format: [industry] [mood] [style modifier]
Optional params:
limit (number) — Number of results to return. Default: 10
Returns: Object with query, results array (each entry has palette name, hex values, mood tags, industry tags, contrast data, BM25 score), and totalFound count.
Example:
{
"tool": "search_palettes",
"params": {
"query": "fintech dark",
"limit": 5
}
}
Anti-patterns:
- Do not use vague queries like "nice colors" or "pretty" — always include industry + mood
- Do not fabricate results when 0 matches return — broaden the query
- Do not call when user provides exact hex colors — use
suggest_design_system with customColors instead
Tool 3: transform_component
When to call: When user wants one of 4 preset visual styles applied via class injection (cheerio). Not a full design rewrite — only adds style classes + CSS template. For fully custom styling, use design tokens.
Required params:
sourceCode (string) — The HTML/JSX source code to transform
targetStyle (string) — One of: glassmorphism, neumorphism, brutalist, minimal animated
Optional params: None
Returns: Object with transformedHTML (modified markup with style classes added), css (complete CSS for the applied style), js (initialization JavaScript if needed), requiredLibraries (array of dependencies like gsap).
Example:
{
"tool": "transform_component",
"params": {
"sourceCode": "<div class='card'><h3>Title</h3><p>Content</p></div>",
"targetStyle": "glassmorphism"
}
}
Anti-patterns:
- Do not apply glassmorphism to data-heavy tables (reduces readability of dense numbers)
- Do not use brutalist style for healthcare or finance (too aggressive for trust-critical contexts)
- Do not apply to already-styled components without checking existing CSS conflicts
- Do not expect more than 4 styles — this tool only injects preset classes + CSS; it does not generate new design systems
Tool 4: generate_logo
When to call: Only when the user has no existing logo and explicitly needs a placeholder. Generates 3 fixed minimal templates (minimal = initial in circle, geometric = rotated square + circle, abstract = curve + circle) — not AI generation. If the user already provided a logo file, URL, or brand mark, do NOT call this tool; preserve their asset.
Required params:
companyName (string) — Brand or project name
Optional params:
style (string) — One of: minimal, geometric, abstract. Default: minimal
Returns: Object with companyName, style, and svg (complete SVG markup string).
Example:
{
"tool": "generate_logo",
"params": {
"companyName": "PayFlow",
"style": "geometric"
}
}
Anti-patterns:
- Do not call if the user already has a logo — ask first (see elicitation Q8)
- Do not use for complex illustrations — this generates minimal mark/logotype only
- Do not generate multiple logos without user selecting a style preference
- Do not use
abstract style for enterprise/finance audiences (lacks recognizability)
Tool 5: generate_icon
When to call: When user needs a custom parametric SVG icon not available in standard libraries (Lucide, Phosphor, Tabler). Builds icons from shape primitives, not template lookup.
Required params:
iconName (string) — One of 114 icons: home, search, user, heart, star, settings, mail, bell, check, plus, minus, arrow_right, arrow_left, close, menu, globe, lock, unlock, calendar, clock, camera, download, upload, trash, edit, eye, zap, cloud, code, bookmark, layers, terminal, database, chevron_up, chevron_down, play, pause, stop, volume, mic, image, film, music, phone, message_circle, send, inbox, link, file, folder, copy, shield, filter, refresh_cw, bar_chart, pie_chart, trending_up, monitor, smartphone, gift, award, flag, sun, moon, fire, wind, key, scissors, and more (see availableIcons in response)
Optional params:
size (number) — Icon size in pixels. Default: 24
color (string) — Hex color. Default: #111827
strokeWidth (number) — Stroke width. Default: 2
fill (boolean) — Fill icon shapes. Default: false
animated (boolean) — Adds CSS animation keyframes. Default: false
animationType (string) — One of: spin, bounce, draw, pulse
Returns: Object with svg (complete SVG markup), name, animated, css (if animated), shapeCount, availableIcons (full list).
Example:
{
"tool": "generate_icon",
"params": {
"iconName": "home",
"size": 24,
"color": "#2563EB",
"animated": true,
"animationType": "bounce"
}
}
Anti-patterns:
- Do not use for complex multi-path illustrations — keep to single-concept icons
- Do not mix icon styles (filled + outline) at the same hierarchy level
- Do not generate animated icons for every element — reserve for key interactions
Tool 6: inject_animations
When to call: When user wants GSAP + ScrollTrigger animations added to their project. Supports scroll-reveal, stagger, pin-scrub, hover-lift, and combination patterns. Returns JavaScript code with GSAP setup, ScrollTrigger configuration, and cleanup guidance.
Required params:
htmlCode (string) — HTML code to add animations to
type (string) — One of: scroll-reveal, stagger, pin-scrub, hover-lift, combination
Optional params:
duration (number) — Animation duration in seconds (default: 0.8)
ease (string) — GSAP ease function name (default: "power3.out")
yOffset (number) — Y offset for reveal animations in pixels (default: 40)
staggerDelay (number) — Stagger delay between elements in seconds (default: 0.1)
Returns: Object with javascript (complete GSAP initialization code), html (modified HTML with animation classes), css (required CSS for animations), cleanup (function reference for ScrollTrigger cleanup).
Example:
{
"tool": "inject_animations",
"params": {
"htmlCode": "<section><h2>Title</h2><div class='card'>Content</div></section>",
"type": "combination",
"duration": 0.8,
"yOffset": 40
}
}
Anti-patterns:
- Do not animate layout properties (width, height, top, left) — use transform and opacity only
- Do not add animations to every element on the page — animate 1-2 key elements per view
- Do not skip
prefers-reduced-motion — always provide fallback for users who disable animations
- Do not use for dashboard data tables (analysts need fast data access, not decorative motion)
5. Search Query Contract
Rules for constructing search queries for search_palettes:
| Rule |
Correct Example |
Incorrect Example |
| Use 2-5 keywords per query |
"fintech dark modern" |
"colors" |
| One dominant intent per query |
"healthcare professional" |
"healthcare dark playful minimal bold" |
| Prefer specific over generic |
"fintech dark" |
"nice colors for my finance app" |
| Include industry keyword |
"gaming vibrant neon" |
"vibrant neon" |
| Include mood keyword |
"elegant luxury dark" |
"dark" |
| If 0 results, broaden query |
"dark modern" |
Repeat same query |
| Never fabricate results |
Report "no matches found" |
Invent palette data |
Query construction formula: [industry] [mood] [style modifier]
Examples by context:
- Fintech dashboard:
"fintech dark modern" — industry + mood
- Healthcare app:
"healthcare professional minimal" — industry + mood + style
- Gaming site:
"gaming vibrant neon" — industry + mood + color hint
- Luxury brand:
"luxury elegant dark" — industry + mood + tone
- Creative portfolio:
"creative bold expressive" — industry + mood + personality
- Education platform:
"education friendly warm" — industry + mood + tone
Fallback strategy: If exact query returns 0 results, try: (1) remove style modifier, (2) use broader industry term, (3) search by mood only. Report what you tried.
6. Design Reasoning Workflow
Follow this step-by-step process for every design task:
Step 1: Elicit Requirements (MANDATORY)
Complete the elicitation protocol from Section 3. Do not skip. Do not guess. Document answers.
Step 2: Search Palettes
Call search_palettes with keywords derived from gathered requirements:
search_palettes(query="[industry] [mood]", limit=5)
Review results for contrast data and mood alignment.
Step 3: Get Design System Candidates
Call suggest_design_system with full context:
suggest_design_system(query="[type] [industry] [mood]", projectName="[name]")
If user has custom colors, include the customColors parameter. If user provided brand hex values, ALWAYS pass them.
Step 4: Apply Custom Colors (if provided)
If user specified exact colors, use suggest_design_system with customColors — do NOT use search_palettes for exact color requests.
Step 5: Choose Animation Strategy
Based on project type:
- Landing pages:
scroll-reveal for hero/sections, stagger for feature lists, combination for full page
- Dashboards:
hover-lift for cards, minimal scroll effects, avoid motion on data views
- Portfolios:
pin-scrub for hero parallax, combination for project grid
- Blogs:
scroll-reveal for article cards, subtle stagger for related posts
- E-commerce:
stagger for product grids, hover-lift for product cards, scroll-reveal for reviews
- SaaS:
scroll-reveal for feature sections, hover-lift for pricing cards
Step 6: Explain WHY Each Choice Fits
For every recommendation, provide reasoning:
- "Space Grotesk was chosen because its geometric forms convey technical precision appropriate for a fintech product."
- "The blue-dominant palette works because finance industry users associate blue with trust and stability."
- "Restrained animation fits because dashboard users prioritize speed over delight."
Step 7: List Anti-Patterns for This Context
Always include what to avoid for the specific project type and industry. Reference Section 7.
Step 8: Show Before/After (if Transforming Existing UI)
If the user has existing code, show the transformation. Use transform_component and present diff or side-by-side.
7. Anti-Patterns
Things the agent MUST NOT do. Violating any of these produces unprofessional, inaccessible, or broken UI.
| Anti-Pattern |
Why It's Wrong |
Better Approach |
| Generic blue/gray palette without context |
Feels corporate and forgettable |
Choose palette from industry + mood data via search_palettes |
| Animating every element on the page |
Overwhelms users, hurts performance, causes motion sickness |
Animate 1-2 key elements per view maximum |
| Ignoring WCAG contrast ratios |
Excludes users with visual impairments, potential legal liability |
Verify 4.5:1 for body text, 3:1 for large text minimum |
| Font sizes below 14px for body text |
Unreadable on mobile, triggers iOS auto-zoom |
Use 16px minimum for body text, 14px absolute floor |
| Using more than 3 font families |
Visual chaos, slow loading, inconsistent personality |
Maximum 2 font families: 1 heading + 1 body |
| Skipping elicitation and guessing |
Misses user needs, wastes iterations, produces wrong design |
Always complete Section 3 requirements gathering first |
| Fabricating palette search results |
Misleads user, produces colors that don't exist in database |
Report "no matches" and broaden query, never invent data |
| Overriding user-specified colors |
Breaks brand identity, ignores client constraints |
Use customColors parameter, never replace user hex values |
| Using linear gradients as text backgrounds |
Reduces readability, fails accessibility, looks dated |
Use solid colors for text, gradients for decorative backgrounds only |
Using backdrop-filter: blur() without fallback |
Breaks in Firefox < 103, performance cost on mobile |
Provide solid background fallback, test in Firefox |
Animating width, height, top, left |
Triggers layout reflow, causes jank, drops frames |
Use transform and opacity only for animation |
| Hardcoding hex values in components |
Breaks theming, makes dark mode impossible,维护 nightmare |
Use CSS custom properties or design tokens |
| Using emoji as icons |
Inconsistent rendering across platforms, no scalability, no accessibility |
Use SVG icons from Lucide, Phosphor, or Tabler |
| Adding glassmorphism to data tables |
Reduces readability of dense numbers, hurts data comprehension |
Use glassmorphism sparingly — cards, overlays, hero sections only |
Ignoring prefers-reduced-motion |
Excludes users with vestibular disorders, accessibility violation |
Always wrap animations in reduced-motion media query |
8. Color Theory Rules
These rules govern all palette recommendations and color system generation.
| Rule |
Specification |
| 60-30-10 rule |
60% dominant (background/surface), 30% secondary (cards, sections), 10% accent (CTAs, highlights) |
| Complementary colors |
Use for high contrast — opposite on color wheel. Best for CTAs against neutral backgrounds. |
| Analogous colors |
Use for harmonious, calm feel — adjacent on color wheel. Best for wellness, healthcare, luxury. |
| Triadic colors |
Use for vibrant, balanced — three equidistant on wheel. Best for creative, gaming, youth brands. |
| Warm vs cool |
Warm colors (red, orange, yellow) advance visually. Cool colors (blue, green, purple) recede. Use warm for emphasis, cool for background. |
| Contrast ratio minimum |
Body text: 4.5:1 against background (WCAG AA). Large text (18px+ bold or 24px+): 3:1 minimum. UI components: 3:1 against adjacent colors. |
| Dark mode strategy |
Do NOT just invert colors. Use desaturated dark backgrounds (#121212 to #1E1E1E range). Reduce accent saturation by 10-20%. Use elevated surfaces (lighter) for cards, not darker. Text: #E0E0E0 for body, #FFFFFF for headings. |
| Semantic color tokens |
Define --color-primary, --color-secondary, --color-accent, --color-error, --color-success, --color-warning, --color-surface, --color-background, --color-text. Never use raw hex in components. |
| Color accessibility |
Never convey information by color alone — add icons, text labels, or patterns. Test with colorblindness simulators (deuteranopia, protanopia, tritanopia). |
9. Typography Rules
| Rule |
Specification |
| Maximum 2 font families |
1 heading font + 1 body font. Monospace acceptable as 3rd only for code/technical content. |
| Type scale |
Use modular scale: Major Third (1.25) for compact UIs, Perfect Fourth (1.333) for standard web, Augmented Fourth (1.414) for large displays. |
| Base font size |
16px minimum for body text. 14px absolute minimum for secondary labels only. |
| Line height |
Body text: 1.5 (150%). Headings: 1.2 (120%). Small text (12-14px): 1.6 for readability. |
| Measure (line length) |
45-75 characters per line. Optimal: 66 characters. Mobile: 35-50 characters. |
| Font weight hierarchy |
Headings: 600-700 (SemiBold to Bold). Body: 400 (Regular). Labels: 500 (Medium). Captions: 400. |
| Font loading |
Use font-display: swap to prevent invisible text (FOIT). Preload only critical fonts. |
| Number alignment |
Use tabular figures (font-variant-numeric: tabular-nums) for data columns, prices, timers. |
| Letter spacing |
Headings: -0.02em to -0.01em (tighter). Body: normal (0). Small caps/labels: 0.05em to 0.1em (wider). |
10. Animation Rules
| Rule |
Specification |
| Duration |
Micro-interactions (hover, focus, toggle): 200-300ms. Page transitions: 600-1200ms. Stagger entrance: 30-50ms delay between items. |
| Easing |
Entering elements: ease-out or power3.out. Exiting elements: ease-in or power3.in. Movement: power2.inOut. Springs: elastic.out(1, 0.3) for playful feel. |
| ScrollTrigger cleanup |
Always provide cleanup function. ScrollTrigger.getAll().forEach(t => t.kill()) on unmount. React: return cleanup in useEffect. |
| Never animate layout |
Never animate width, height, top, left, margin, padding. Use transform: translate(), scale(), rotate() and opacity only. |
| Compositor properties only |
Animate only transform and opacity — these run on GPU compositor thread, not main thread. |
| Respect prefers-reduced-motion |
Wrap all animations in @media (prefers-reduced-motion: no-preference) or check window.matchMedia. Provide instant alternative. |
| Maximum 3 animation types per page |
Choose max 3 from: scroll-reveal, stagger, pin-scrub, hover-lift. More than 3 causes visual chaos. |
| Exit faster than enter |
Exit animations: 60-70% of enter duration. Enter: 400ms → Exit: 250-280ms. |
| Interruptible |
Animations must be interruptible. User interaction should cancel in-progress animation immediately. |
| No blocking animation |
Never block user input during animation. UI must stay interactive throughout. |
11. Example Workflow
User request: "I'm building a landing page for my fintech startup and it looks boring. Make it beautiful."
Step 1: Elicitation
The agent asks:
Before I generate a design system, I need a few details:
- What's the project name?
- What does your fintech product do? (payments, lending, investing, banking, insurance?)
- How would you describe the mood? Professional and trustworthy, or modern and bold?
- Who is your target audience? (consumers, small businesses, enterprises?)
- What's your frontend stack?
- Any colors to avoid?
User responds: "It's called PayFlow. We do payment processing for small businesses. Professional but modern. React with Tailwind. Avoid red."
Step 2: Inference + Confirmation
The agent states:
Got it. Based on your answers, I'm inferring: fintech landing page, professional-modern mood, small business audience, trust-critical context. I'll avoid red and honor that fintech users associate blue with trust. Proceed?
Step 3: Search Palettes
search_palettes(query="fintech professional modern", limit=5)
Returns: 5 palettes including "Midnight Finance" (deep navy + teal accent), "Clean Ledger" (white + blue), "Trust Gradient" (navy to indigo).
Step 4: Design System
suggest_design_system(query="fintech landing page professional modern", projectName="PayFlow", customColors=["#1a73e8"])
Returns 3 candidates:
- Candidate A: Inter + JetBrains Mono — Navy/Teal palette — Lucide icons — Major Third scale
- Candidate B: DM Sans + IBM Plex Mono — Slate/Indigo palette — Phosphor icons — Perfect Fourth scale
- Candidate C: Plus Jakarta Sans + Fira Code — Dark blue/Amber palette — Tabler icons — Augmented Fourth scale
Step 5: Recommendation
Candidate A recommended because Inter's neutral geometry reads well across all screen sizes. JetBrains Mono provides clear number alignment for pricing tables. Navy/Teal palette conveys trust (navy) with modern differentiation (teal). Red excluded per your request. WCAG AA compliant.
Step 6: Animation Strategy
- Hero section:
scroll-reveal with power3.out easing, 0.8s duration — entrance from below
- Feature cards:
stagger with 100ms delay between items — clean entrance
- CTA section:
scroll-reveal with slight scale animation — draws attention
- Avoid: Heavy scroll animations on pricing (users need to scan quickly)
Step 7: Anti-Patterns for This Context
- Do not animate chart data on pricing page (would cause distraction during comparison)
- Do not use glassmorphism on the hero (fintech needs trust, not trendy visual effects)
- Do not add scroll-triggered animations to the navigation bar (must remain instantly accessible)
- Do not use neon or saturated accent colors (feels gambling-adjacent, not fintech)
Step 8: Implementation
The agent generates the design system CSS, component structure, and GSAP animation code with proper cleanup.
12. Quick Reference Table
| Rule |
Value |
| Elicitation |
MANDATORY before any generation |
| Max font families |
2 (heading + body) |
| Base font size |
16px minimum |
| Body line-height |
1.5 |
| Heading line-height |
1.2 |
| Characters per line |
45-75 (optimal: 66) |
| Type scale ratio |
1.25 (Major Third) or 1.333 (Perfect Fourth) |
| Color distribution |
60% dominant / 30% secondary / 10% accent |
| Body text contrast |
4.5:1 minimum (WCAG AA) |
| Large text contrast |
3:1 minimum |
| Micro-interaction duration |
200-300ms |
| Page transition duration |
600-1200ms |
| Stagger delay |
30-50ms per item |
| Exit duration |
60-70% of enter duration |
| Max animation types per page |
3 |
| Animate only |
transform and opacity |
| Palette query format |
[industry] [mood] [style] |
| Palette query keywords |
2-5 keywords |
| Custom colors |
Always pass to suggest_design_system, never to search_palettes |
| Dark mode background |
#121212 to #1E1E1E (desaturated, not inverted) |
| Touch target minimum |
44×44px (web) |
| Reduced motion |
Always provide fallback |
| Emoji as icons |
Never — use SVG from Lucide/Phosphor/Tabler |
1---2name: better-ui-ux-23description: UI/UX design system generation, palette search, component transformation, icon generation, and GSAP animation injection. Use when building or styling web UIs, choosing color palettes, generating icons, adding animations, or transforming component styles. Skip for non-UI tasks.4---56# Better-UI-UX Skill78## 1. What This Skill Provides910Six MCP tools for production UI development: `suggest_design_system` returns 3 complete design system candidates with fonts, colors, icons, and type scale. `search_palettes` queries 172 curated palettes via BM25 scoring with synonym expansion. `transform_component` applies glassmorphism, neumorphism, brutalist, or minimal-animated styles to any HTML/JSX. `generate_logo` creates minimal SVG logos in three styles. `generate_icon` produces 114 parametric SVG icons from shape primitives with animation support. `inject_animations` injects GSAP + ScrollTrigger scroll-reveal, stagger, pin-scrub, hover-lift, or combination patterns. Curated database, smart typography pairing, and production-ready animation patterns included.1112## 2. When to Apply — Activation Table1314| Use when | Skip when |15|----------|-----------|16| User asks for design system, colors, palette, icons, animations, component styling, UI transformation | User is debugging logic, writing tests, configuring CI, working on non-UI code |17| "Make it beautiful", "improve the design", "looks boring", "needs polish" | Backend API development or database schema work |18| Building or styling web UIs — landing pages, dashboards, SaaS, portfolios, e-commerce | DevOps, infrastructure, or deployment configuration |19| Choosing color palettes, typography pairings, or icon sets | Unit testing, integration testing, or test coverage |20| Generating SVG logos or parametric icons not in standard libraries | Performance tuning unrelated to visual interface |21| Adding GSAP/ScrollTrigger scroll animations or micro-interactions | Non-visual automation scripts, CLI tools, data processing |22| Transforming component visual styles (glassmorphism, neumorphism, brutalist) | Accessibility audit unrelated to visual design (semantic HTML, ARIA roles) |23| User says "this UI feels off" or "needs more personality" | Build system configuration, bundler settings, dependency management |2425**Decision rule**: If the task changes how something looks, feels, moves, or is interacted with visually, activate this skill.2627## 3. Mandatory Elicitation Protocol2829**THIS SECTION IS MANDATORY.** Before generating any design system, palette, icon, animation, or component transformation, the agent MUST gather requirements. Do not skip. Do not guess. Do not proceed with partial information without explicit user confirmation.3031### Required Questions (Must Ask Before ANY Generation)3233| # | Question | Why It Matters | Example Answers |34|---|----------|----------------|-----------------|35| 1 | **Project type** — What are you building? | Determines layout patterns, component density, interaction models | SaaS, portfolio, e-commerce, blog, dashboard, mobile app, landing page, admin panel |36| 2 | **Industry/domain** — What space is this in? | Constrains palette (no neon green in healthcare), icon choices, trust signals | Finance, healthcare, gaming, education, food, travel, real estate, tech, creative, legal |37| 3 | **Mood/tone** — How should it feel? | Drives typography personality, color saturation, animation intensity, spacing rhythm | Professional, playful, elegant, minimal, bold, brutalist, luxury, warm, cool, futuristic |38| 4 | **Target audience** — Who uses this? | Affects information density, jargon tolerance, visual complexity, accessibility needs | Developers, consumers, enterprise, creatives, kids, elderly, mixed audience |39| 5 | **Frontend stack** — What tech? | Determines CSS approach (Tailwind vs CSS modules vs inline), component patterns, animation library | React, Vue, Svelte, vanilla, Next.js, Nuxt, Astro, HTML/CSS only |40| 6 | **Colors to avoid** — Any exclusions? | Prevents clash with existing brand, cultural sensitivities, accessibility requirements | "No red", "avoid yellow", "nothing too saturated" |4142### Optional but Recommended4344| # | Question | Why It Helps |45|---|----------|--------------|46| 7 | **Existing brand colors** — Hex values? | Uses `customColors` parameter to honor brand constraints in design system |47| 8 | **Existing logo** — Do you already have a logo file/URL? | If yes, **do NOT call `generate_logo`** — preserve the user's brand asset |48| 9 | **Competitor designs** — What to differentiate from? | Avoids accidental similarity, helps find unique positioning |49| 10 | **Accessibility requirements** — WCAG level? | Constrains contrast ratios, font sizes, animation intensity (AAA vs AA) |5051### Inference Rules (When User Provides Partial Info)5253Apply these inference rules automatically. State what you inferred and ask for confirmation before proceeding.5455| If user mentions... | Infer project type | Infer mood |56|---------------------|-------------------|------------|57| Project name contains "tech", "start.io", "app", "dev" | Tech startup, SaaS | Modern, minimal, clean |58| Description mentions "finance", "pay", "bank", "invest" | Fintech, financial dashboard | Professional, trustworthy, stable |59| Description mentions "kids", "young", "play", "learn" | EdTech, children's app | Playful, colorful, friendly |60| Description mentions "luxury", "premium", "exclusive", "boutique" | Luxury brand, premium service | Elegant, dark/gold, restrained |61| Description mentions "health", "med", "clinic", "well" | Healthcare, wellness | Calm, clean, trustworthy, blue/green |62| Description mentions "game", "esport", "stream" | Gaming, entertainment | Bold, vibrant, high-contrast, neon accents |63| Description mentions "food", "restaurant", "recipe", "menu" | Food industry, restaurant | Warm, appetizing, rich colors |64| Description mentions "travel", "hotel", "booking" | Travel, hospitality | Inviting, airy, aspirational |65| Description mentions "photo", "design", "art", "creative" | Portfolio, creative agency | Expressive, unconventional, strong typography |66| Description mentions "data", "analytics", "metrics", "monitor" | Dashboard, analytics tool | Functional, data-dense, neutral with accent |6768### Enforcement Rules69701. The agent MUST include at least one elicitation question in its first response.712. If the user has already provided enough context (project type + industry + mood), the agent should state what it inferred and ask for confirmation — do NOT ask every question verbatim.723. If the user says "use your judgment" or "you decide", document your assumptions and proceed.734. Never generate a design system without knowing at least: project type + one of (industry or mood).745. If only project type is known, infer industry from name/description and state the inference.7576## 4. MCP Tool Reference7778### Tool 1: `suggest_design_system`7980**When to call**: Initial setup of any UI project. Returns 3 complete design system candidates with typography (heading + body fonts), color palette (primary/secondary/accent/background/text), icon library recommendation, type scale, and reasoning for each choice.8182**Required params**:83- `projectName` (string) — Name of the project8485**Optional params**:86- `description` (string) — Brief description of the project87- `mood` (string) — One of: `corporate`, `playful`, `minimal`, `modern`, `elegant`, `brutalist`, `saas`, `creative`, `luxury`, `tech`, `health`, `education`, `gaming`, `fintech`88- `customColors` (object) — Exact colors to use instead of suggested palette. Properties: `primary`, `secondary`, `accent`, `background`, `text` (each a hex string)8990**Returns**: Object with 3 `DesignSystemCandidate` entries, each containing: `name`, `description`, `headingFont` (family, weights, googleFontsURL), `bodyFont` (family, weights, googleFontsURL), `colorPalette` (primary, secondary, accent, background, text), `iconSet` (set name + reason), `typeScale` (modular scale tokens), `paletteId`, `wcagAA` (boolean), `wcagAAA` (boolean).9192**Example**:93```json94{95 "tool": "suggest_design_system",96 "params": {97 "projectName": "PayFlow",98 "description": "Payment processing for small businesses",99 "mood": "corporate",100 "customColors": { "primary": "#1a73e8" }101 }102}103```104105**Anti-patterns**:106- Do not call without completing elicitation first107- Do not ignore `customColors` when user provides brand colors108- Do not present all 3 candidates as equal — recommend one with reasoning109110---111112### Tool 2: `search_palettes`113114**When to call**: When user needs color palettes for a specific mood/industry, or when `suggest_design_system` candidates need refinement. Searches 172 curated palettes via BM25 scoring with synonym expansion, IDF weighting, and category boosting.115116**Required params**:117- `query` (string) — 2-5 keywords for palette search. Use format: `[industry] [mood] [style modifier]`118119**Optional params**:120- `limit` (number) — Number of results to return. Default: 10121122**Returns**: Object with `query`, `results` array (each entry has palette name, hex values, mood tags, industry tags, contrast data, BM25 score), and `totalFound` count.123124**Example**:125```json126{127 "tool": "search_palettes",128 "params": {129 "query": "fintech dark",130 "limit": 5131 }132}133```134135**Anti-patterns**:136- Do not use vague queries like "nice colors" or "pretty" — always include industry + mood137- Do not fabricate results when 0 matches return — broaden the query138- Do not call when user provides exact hex colors — use `suggest_design_system` with `customColors` instead139140---141142### Tool 3: `transform_component`143144**When to call**: When user wants one of 4 preset visual styles applied via class injection (cheerio). Not a full design rewrite — only adds style classes + CSS template. For fully custom styling, use design tokens.145146**Required params**:147- `sourceCode` (string) — The HTML/JSX source code to transform148- `targetStyle` (string) — One of: `glassmorphism`, `neumorphism`, `brutalist`, `minimal animated`149150**Optional params**: None151152**Returns**: Object with `transformedHTML` (modified markup with style classes added), `css` (complete CSS for the applied style), `js` (initialization JavaScript if needed), `requiredLibraries` (array of dependencies like `gsap`).153154**Example**:155```json156{157 "tool": "transform_component",158 "params": {159 "sourceCode": "<div class='card'><h3>Title</h3><p>Content</p></div>",160 "targetStyle": "glassmorphism"161 }162}163```164165**Anti-patterns**:166- Do not apply glassmorphism to data-heavy tables (reduces readability of dense numbers)167- Do not use brutalist style for healthcare or finance (too aggressive for trust-critical contexts)168- Do not apply to already-styled components without checking existing CSS conflicts169- Do not expect more than 4 styles — this tool only injects preset classes + CSS; it does not generate new design systems170171---172173### Tool 4: `generate_logo`174175**When to call**: Only when the user has no existing logo and explicitly needs a placeholder. Generates 3 fixed minimal templates (minimal = initial in circle, geometric = rotated square + circle, abstract = curve + circle) — not AI generation. If the user already provided a logo file, URL, or brand mark, **do NOT call this tool**; preserve their asset.176177**Required params**:178- `companyName` (string) — Brand or project name179180**Optional params**:181- `style` (string) — One of: `minimal`, `geometric`, `abstract`. Default: `minimal`182183**Returns**: Object with `companyName`, `style`, and `svg` (complete SVG markup string).184185**Example**:186```json187{188 "tool": "generate_logo",189 "params": {190 "companyName": "PayFlow",191 "style": "geometric"192 }193}194```195196**Anti-patterns**:197- Do not call if the user already has a logo — ask first (see elicitation Q8)198- Do not use for complex illustrations — this generates minimal mark/logotype only199- Do not generate multiple logos without user selecting a style preference200- Do not use `abstract` style for enterprise/finance audiences (lacks recognizability)201202---203204### Tool 5: `generate_icon`205206**When to call**: When user needs a custom parametric SVG icon not available in standard libraries (Lucide, Phosphor, Tabler). Builds icons from shape primitives, not template lookup.207208**Required params**:209- `iconName` (string) — One of 114 icons: `home`, `search`, `user`, `heart`, `star`, `settings`, `mail`, `bell`, `check`, `plus`, `minus`, `arrow_right`, `arrow_left`, `close`, `menu`, `globe`, `lock`, `unlock`, `calendar`, `clock`, `camera`, `download`, `upload`, `trash`, `edit`, `eye`, `zap`, `cloud`, `code`, `bookmark`, `layers`, `terminal`, `database`, `chevron_up`, `chevron_down`, `play`, `pause`, `stop`, `volume`, `mic`, `image`, `film`, `music`, `phone`, `message_circle`, `send`, `inbox`, `link`, `file`, `folder`, `copy`, `shield`, `filter`, `refresh_cw`, `bar_chart`, `pie_chart`, `trending_up`, `monitor`, `smartphone`, `gift`, `award`, `flag`, `sun`, `moon`, `fire`, `wind`, `key`, `scissors`, and more (see `availableIcons` in response)210211**Optional params**:212- `size` (number) — Icon size in pixels. Default: `24`213- `color` (string) — Hex color. Default: `#111827`214- `strokeWidth` (number) — Stroke width. Default: `2`215- `fill` (boolean) — Fill icon shapes. Default: `false`216- `animated` (boolean) — Adds CSS animation keyframes. Default: `false`217- `animationType` (string) — One of: `spin`, `bounce`, `draw`, `pulse`218219**Returns**: Object with `svg` (complete SVG markup), `name`, `animated`, `css` (if animated), `shapeCount`, `availableIcons` (full list).220221**Example**:222```json223{224 "tool": "generate_icon",225 "params": {226 "iconName": "home",227 "size": 24,228 "color": "#2563EB",229 "animated": true,230 "animationType": "bounce"231 }232}233```234235**Anti-patterns**:236- Do not use for complex multi-path illustrations — keep to single-concept icons237- Do not mix icon styles (filled + outline) at the same hierarchy level238- Do not generate animated icons for every element — reserve for key interactions239240---241242### Tool 6: `inject_animations`243244**When to call**: When user wants GSAP + ScrollTrigger animations added to their project. Supports scroll-reveal, stagger, pin-scrub, hover-lift, and combination patterns. Returns JavaScript code with GSAP setup, ScrollTrigger configuration, and cleanup guidance.245246**Required params**:247- `htmlCode` (string) — HTML code to add animations to248- `type` (string) — One of: `scroll-reveal`, `stagger`, `pin-scrub`, `hover-lift`, `combination`249250**Optional params**:251- `duration` (number) — Animation duration in seconds (default: 0.8)252- `ease` (string) — GSAP ease function name (default: "power3.out")253- `yOffset` (number) — Y offset for reveal animations in pixels (default: 40)254- `staggerDelay` (number) — Stagger delay between elements in seconds (default: 0.1)255256**Returns**: Object with `javascript` (complete GSAP initialization code), `html` (modified HTML with animation classes), `css` (required CSS for animations), `cleanup` (function reference for ScrollTrigger cleanup).257258**Example**:259```json260{261 "tool": "inject_animations",262 "params": {263 "htmlCode": "<section><h2>Title</h2><div class='card'>Content</div></section>",264 "type": "combination",265 "duration": 0.8,266 "yOffset": 40267 }268}269```270271**Anti-patterns**:272- Do not animate layout properties (width, height, top, left) — use transform and opacity only273- Do not add animations to every element on the page — animate 1-2 key elements per view274- Do not skip `prefers-reduced-motion` — always provide fallback for users who disable animations275- Do not use for dashboard data tables (analysts need fast data access, not decorative motion)276277## 5. Search Query Contract278279Rules for constructing search queries for `search_palettes`:280281| Rule | Correct Example | Incorrect Example |282|------|-----------------|-------------------|283| Use 2-5 keywords per query | `"fintech dark modern"` | `"colors"` |284| One dominant intent per query | `"healthcare professional"` | `"healthcare dark playful minimal bold"` |285| Prefer specific over generic | `"fintech dark"` | `"nice colors for my finance app"` |286| Include industry keyword | `"gaming vibrant neon"` | `"vibrant neon"` |287| Include mood keyword | `"elegant luxury dark"` | `"dark"` |288| If 0 results, broaden query | `"dark modern"` | Repeat same query |289| Never fabricate results | Report "no matches found" | Invent palette data |290291**Query construction formula**: `[industry] [mood] [style modifier]`292293**Examples by context**:294- Fintech dashboard: `"fintech dark modern"` — industry + mood295- Healthcare app: `"healthcare professional minimal"` — industry + mood + style296- Gaming site: `"gaming vibrant neon"` — industry + mood + color hint297- Luxury brand: `"luxury elegant dark"` — industry + mood + tone298- Creative portfolio: `"creative bold expressive"` — industry + mood + personality299- Education platform: `"education friendly warm"` — industry + mood + tone300301**Fallback strategy**: If exact query returns 0 results, try: (1) remove style modifier, (2) use broader industry term, (3) search by mood only. Report what you tried.302303## 6. Design Reasoning Workflow304305Follow this step-by-step process for every design task:306307### Step 1: Elicit Requirements (MANDATORY)308Complete the elicitation protocol from Section 3. Do not skip. Do not guess. Document answers.309310### Step 2: Search Palettes311Call `search_palettes` with keywords derived from gathered requirements:312```313search_palettes(query="[industry] [mood]", limit=5)314```315Review results for contrast data and mood alignment.316317### Step 3: Get Design System Candidates318Call `suggest_design_system` with full context:319```320suggest_design_system(query="[type] [industry] [mood]", projectName="[name]")321```322If user has custom colors, include the `customColors` parameter. If user provided brand hex values, ALWAYS pass them.323324### Step 4: Apply Custom Colors (if provided)325If user specified exact colors, use `suggest_design_system` with `customColors` — do NOT use `search_palettes` for exact color requests.326327### Step 5: Choose Animation Strategy328Based on project type:329- **Landing pages**: `scroll-reveal` for hero/sections, `stagger` for feature lists, `combination` for full page330- **Dashboards**: `hover-lift` for cards, minimal scroll effects, avoid motion on data views331- **Portfolios**: `pin-scrub` for hero parallax, `combination` for project grid332- **Blogs**: `scroll-reveal` for article cards, subtle `stagger` for related posts333- **E-commerce**: `stagger` for product grids, `hover-lift` for product cards, `scroll-reveal` for reviews334- **SaaS**: `scroll-reveal` for feature sections, `hover-lift` for pricing cards335336### Step 6: Explain WHY Each Choice Fits337For every recommendation, provide reasoning:338- "Space Grotesk was chosen because its geometric forms convey technical precision appropriate for a fintech product."339- "The blue-dominant palette works because finance industry users associate blue with trust and stability."340- "Restrained animation fits because dashboard users prioritize speed over delight."341342### Step 7: List Anti-Patterns for This Context343Always include what to avoid for the specific project type and industry. Reference Section 7.344345### Step 8: Show Before/After (if Transforming Existing UI)346If the user has existing code, show the transformation. Use `transform_component` and present diff or side-by-side.347348## 7. Anti-Patterns349350Things the agent MUST NOT do. Violating any of these produces unprofessional, inaccessible, or broken UI.351352| Anti-Pattern | Why It's Wrong | Better Approach |353|--------------|----------------|-----------------|354| Generic blue/gray palette without context | Feels corporate and forgettable | Choose palette from industry + mood data via `search_palettes` |355| Animating every element on the page | Overwhelms users, hurts performance, causes motion sickness | Animate 1-2 key elements per view maximum |356| Ignoring WCAG contrast ratios | Excludes users with visual impairments, potential legal liability | Verify 4.5:1 for body text, 3:1 for large text minimum |357| Font sizes below 14px for body text | Unreadable on mobile, triggers iOS auto-zoom | Use 16px minimum for body text, 14px absolute floor |358| Using more than 3 font families | Visual chaos, slow loading, inconsistent personality | Maximum 2 font families: 1 heading + 1 body |359| Skipping elicitation and guessing | Misses user needs, wastes iterations, produces wrong design | Always complete Section 3 requirements gathering first |360| Fabricating palette search results | Misleads user, produces colors that don't exist in database | Report "no matches" and broaden query, never invent data |361| Overriding user-specified colors | Breaks brand identity, ignores client constraints | Use `customColors` parameter, never replace user hex values |362| Using linear gradients as text backgrounds | Reduces readability, fails accessibility, looks dated | Use solid colors for text, gradients for decorative backgrounds only |363| Using `backdrop-filter: blur()` without fallback | Breaks in Firefox < 103, performance cost on mobile | Provide solid background fallback, test in Firefox |364| Animating `width`, `height`, `top`, `left` | Triggers layout reflow, causes jank, drops frames | Use `transform` and `opacity` only for animation |365| Hardcoding hex values in components | Breaks theming, makes dark mode impossible,维护 nightmare | Use CSS custom properties or design tokens |366| Using emoji as icons | Inconsistent rendering across platforms, no scalability, no accessibility | Use SVG icons from Lucide, Phosphor, or Tabler |367| Adding glassmorphism to data tables | Reduces readability of dense numbers, hurts data comprehension | Use glassmorphism sparingly — cards, overlays, hero sections only |368| Ignoring `prefers-reduced-motion` | Excludes users with vestibular disorders, accessibility violation | Always wrap animations in reduced-motion media query |369370## 8. Color Theory Rules371372These rules govern all palette recommendations and color system generation.373374| Rule | Specification |375|------|---------------|376| **60-30-10 rule** | 60% dominant (background/surface), 30% secondary (cards, sections), 10% accent (CTAs, highlights) |377| **Complementary colors** | Use for high contrast — opposite on color wheel. Best for CTAs against neutral backgrounds. |378| **Analogous colors** | Use for harmonious, calm feel — adjacent on color wheel. Best for wellness, healthcare, luxury. |379| **Triadic colors** | Use for vibrant, balanced — three equidistant on wheel. Best for creative, gaming, youth brands. |380| **Warm vs cool** | Warm colors (red, orange, yellow) advance visually. Cool colors (blue, green, purple) recede. Use warm for emphasis, cool for background. |381| **Contrast ratio minimum** | Body text: 4.5:1 against background (WCAG AA). Large text (18px+ bold or 24px+): 3:1 minimum. UI components: 3:1 against adjacent colors. |382| **Dark mode strategy** | Do NOT just invert colors. Use desaturated dark backgrounds (#121212 to #1E1E1E range). Reduce accent saturation by 10-20%. Use elevated surfaces (lighter) for cards, not darker. Text: #E0E0E0 for body, #FFFFFF for headings. |383| **Semantic color tokens** | Define `--color-primary`, `--color-secondary`, `--color-accent`, `--color-error`, `--color-success`, `--color-warning`, `--color-surface`, `--color-background`, `--color-text`. Never use raw hex in components. |384| **Color accessibility** | Never convey information by color alone — add icons, text labels, or patterns. Test with colorblindness simulators (deuteranopia, protanopia, tritanopia). |385386## 9. Typography Rules387388| Rule | Specification |389|------|---------------|390| **Maximum 2 font families** | 1 heading font + 1 body font. Monospace acceptable as 3rd only for code/technical content. |391| **Type scale** | Use modular scale: Major Third (1.25) for compact UIs, Perfect Fourth (1.333) for standard web, Augmented Fourth (1.414) for large displays. |392| **Base font size** | 16px minimum for body text. 14px absolute minimum for secondary labels only. |393| **Line height** | Body text: 1.5 (150%). Headings: 1.2 (120%). Small text (12-14px): 1.6 for readability. |394| **Measure (line length)** | 45-75 characters per line. Optimal: 66 characters. Mobile: 35-50 characters. |395| **Font weight hierarchy** | Headings: 600-700 (SemiBold to Bold). Body: 400 (Regular). Labels: 500 (Medium). Captions: 400. |396| **Font loading** | Use `font-display: swap` to prevent invisible text (FOIT). Preload only critical fonts. |397| **Number alignment** | Use tabular figures (`font-variant-numeric: tabular-nums`) for data columns, prices, timers. |398| **Letter spacing** | Headings: -0.02em to -0.01em (tighter). Body: normal (0). Small caps/labels: 0.05em to 0.1em (wider). |399400## 10. Animation Rules401402| Rule | Specification |403|------|---------------|404| **Duration** | Micro-interactions (hover, focus, toggle): 200-300ms. Page transitions: 600-1200ms. Stagger entrance: 30-50ms delay between items. |405| **Easing** | Entering elements: `ease-out` or `power3.out`. Exiting elements: `ease-in` or `power3.in`. Movement: `power2.inOut`. Springs: `elastic.out(1, 0.3)` for playful feel. |406| **ScrollTrigger cleanup** | Always provide cleanup function. `ScrollTrigger.getAll().forEach(t => t.kill())` on unmount. React: return cleanup in `useEffect`. |407| **Never animate layout** | Never animate `width`, `height`, `top`, `left`, `margin`, `padding`. Use `transform: translate()`, `scale()`, `rotate()` and `opacity` only. |408| **Compositor properties only** | Animate only `transform` and `opacity` — these run on GPU compositor thread, not main thread. |409| **Respect prefers-reduced-motion** | Wrap all animations in `@media (prefers-reduced-motion: no-preference)` or check `window.matchMedia`. Provide instant alternative. |410| **Maximum 3 animation types per page** | Choose max 3 from: scroll-reveal, stagger, pin-scrub, hover-lift. More than 3 causes visual chaos. |411| **Exit faster than enter** | Exit animations: 60-70% of enter duration. Enter: 400ms → Exit: 250-280ms. |412| **Interruptible** | Animations must be interruptible. User interaction should cancel in-progress animation immediately. |413| **No blocking animation** | Never block user input during animation. UI must stay interactive throughout. |414415## 11. Example Workflow416417**User request**: "I'm building a landing page for my fintech startup and it looks boring. Make it beautiful."418419### Step 1: Elicitation420421The agent asks:422423> Before I generate a design system, I need a few details:424> 1. What's the project name?425> 2. What does your fintech product do? (payments, lending, investing, banking, insurance?)426> 3. How would you describe the mood? Professional and trustworthy, or modern and bold?427> 4. Who is your target audience? (consumers, small businesses, enterprises?)428> 5. What's your frontend stack?429> 6. Any colors to avoid?430431**User responds**: "It's called PayFlow. We do payment processing for small businesses. Professional but modern. React with Tailwind. Avoid red."432433### Step 2: Inference + Confirmation434435The agent states:436437> Got it. Based on your answers, I'm inferring: fintech landing page, professional-modern mood, small business audience, trust-critical context. I'll avoid red and honor that fintech users associate blue with trust. Proceed?438439### Step 3: Search Palettes440441```442search_palettes(query="fintech professional modern", limit=5)443```444445**Returns**: 5 palettes including "Midnight Finance" (deep navy + teal accent), "Clean Ledger" (white + blue), "Trust Gradient" (navy to indigo).446447### Step 4: Design System448449```450suggest_design_system(query="fintech landing page professional modern", projectName="PayFlow", customColors=["#1a73e8"])451```452453**Returns 3 candidates**:4541. **Candidate A:** Inter + JetBrains Mono — Navy/Teal palette — Lucide icons — Major Third scale4552. **Candidate B:** DM Sans + IBM Plex Mono — Slate/Indigo palette — Phosphor icons — Perfect Fourth scale4563. **Candidate C:** Plus Jakarta Sans + Fira Code — Dark blue/Amber palette — Tabler icons — Augmented Fourth scale457458### Step 5: Recommendation459460> **Candidate A recommended** because Inter's neutral geometry reads well across all screen sizes. JetBrains Mono provides clear number alignment for pricing tables. Navy/Teal palette conveys trust (navy) with modern differentiation (teal). Red excluded per your request. WCAG AA compliant.461462### Step 6: Animation Strategy463464- **Hero section**: `scroll-reveal` with `power3.out` easing, 0.8s duration — entrance from below465- **Feature cards**: `stagger` with 100ms delay between items — clean entrance466- **CTA section**: `scroll-reveal` with slight scale animation — draws attention467- **Avoid**: Heavy scroll animations on pricing (users need to scan quickly)468469### Step 7: Anti-Patterns for This Context470471- Do not animate chart data on pricing page (would cause distraction during comparison)472- Do not use glassmorphism on the hero (fintech needs trust, not trendy visual effects)473- Do not add scroll-triggered animations to the navigation bar (must remain instantly accessible)474- Do not use neon or saturated accent colors (feels gambling-adjacent, not fintech)475476### Step 8: Implementation477478The agent generates the design system CSS, component structure, and GSAP animation code with proper cleanup.479480## 12. Quick Reference Table481482| Rule | Value |483|------|-------|484| Elicitation | MANDATORY before any generation |485| Max font families | 2 (heading + body) |486| Base font size | 16px minimum |487| Body line-height | 1.5 |488| Heading line-height | 1.2 |489| Characters per line | 45-75 (optimal: 66) |490| Type scale ratio | 1.25 (Major Third) or 1.333 (Perfect Fourth) |491| Color distribution | 60% dominant / 30% secondary / 10% accent |492| Body text contrast | 4.5:1 minimum (WCAG AA) |493| Large text contrast | 3:1 minimum |494| Micro-interaction duration | 200-300ms |495| Page transition duration | 600-1200ms |496| Stagger delay | 30-50ms per item |497| Exit duration | 60-70% of enter duration |498| Max animation types per page | 3 |499| Animate only | `transform` and `opacity` |500| Palette query format | `[industry] [mood] [style]` |501| Palette query keywords | 2-5 keywords |502| Custom colors | Always pass to `suggest_design_system`, never to `search_palettes` |503| Dark mode background | #121212 to #1E1E1E (desaturated, not inverted) |504| Touch target minimum | 44×44px (web) |505| Reduced motion | Always provide fallback |506| Emoji as icons | Never — use SVG from Lucide/Phosphor/Tabler |