Design Intelligence — Token Generation & Design System Bootstrapping
This skill helps set up design systems from scratch. Give it your project context (industry, brand, users) and it generates ready-to-use design tokens with Tailwind config snippets and CSS variable files.
When to Use
- Setting up a new project's design system (
/spartan:ux system)
- Choosing color palettes for a specific industry/brand
- Generating typography scales
- Creating spacing systems
- Bootstrapping a component inventory
What This Skill Does
- Takes project context (what, who, industry, personality)
- Generates a complete design token set
- Outputs in 3 formats: token reference doc, Tailwind config, CSS variables
- Creates a component inventory based on the project type
How It Works
Step 1: Gather Context
Ask these questions (skip any the user already answered):
- What are you building? (dashboard, SaaS, marketplace, mobile app, landing page, etc.)
- Who uses it? (developers, business users, consumers, admins)
- What's the personality? Pick 2-3:
- Clean / Professional / Corporate
- Bold / Playful / Creative
- Minimal / Technical / Developer-focused
- Warm / Friendly / Approachable
- Premium / Luxury / Refined
- Data-heavy / Dense / Information-rich
- Light, dark, or both?
- Any brand colors already decided? (if yes, use those as the foundation)
- Reference apps? (apps that have the quality you want)
Step 2: Generate Color Palette
Based on the context, generate a complete palette:
For dark themes:
Background: #0F172A (slate-900 family)
Surface: rgba(30, 41, 59, 0.5) (glass effect)
Primary: [based on personality — blue for professional, green for growth, etc.]
Primary Hover: [10% darker]
Accent: [complementary or analogous — use sparingly, max 10-15%]
Text: #F8FAFC (near white)
Text Secondary: #94A3B8 (slate-400)
Text Muted: #64748B (slate-500)
Border: rgba(148, 163, 184, 0.1)
Success: #22C55E
Warning: #F59E0B
Error: #EF4444
For light themes:
Background: #FFFFFF or #F8FAFC
Surface: #FFFFFF
Primary: [based on personality]
Primary Hover: [10% darker]
Accent: [complementary]
Text: #0F172A (near black)
Text Secondary: #475569 (slate-600)
Text Muted: #64748B (slate-500)
Border: #E2E8F0 (slate-200)
Success: #16A34A
Warning: #D97706
Error: #DC2626
Color selection by personality:
| Personality |
Primary range |
Accent range |
| Professional / Corporate |
Blue (#2563EB → #1E40AF) |
Slate or Amber |
| Bold / Creative |
Purple (#7C3AED), Pink (#EC4899) |
Yellow or Cyan |
| Minimal / Technical |
Gray (#374151), Black (#111827) |
One bright accent |
| Warm / Friendly |
Orange (#EA580C), Teal (#0D9488) |
Amber or Rose |
| Premium / Luxury |
Deep Blue (#1E3A5F), Gold (#B8860B) |
Silver or Champagne |
| Data-heavy |
Neutral blue (#3B82F6) |
Green for positive, Red for negative |
Step 3: Generate Typography Scale
Pick a font pairing based on personality:
| Personality |
Font recommendation |
Why |
| Professional |
DM Sans, Plus Jakarta Sans |
Clean geometric, good for UI |
| Technical |
JetBrains Mono (code) + Inter (UI) |
Developer-friendly |
| Creative |
Outfit, Space Grotesk |
Distinctive but readable |
| Warm |
Nunito, Quicksand |
Rounded, friendly feel |
| Premium |
Playfair Display (headings) + Lato (body) |
Elegant contrast |
| Data-heavy |
Inter, Roboto Mono (numbers) |
Tabular nums, high readability |
Type scale (base 16px):
h1: 36px / 700 / 1.2 line-height
h2: 30px / 700 / 1.25
h3: 24px / 600 / 1.3
h4: 20px / 600 / 1.35
h5: 18px / 600 / 1.4
h6: 16px / 600 / 1.4
body: 16px / 400 / 1.6
body-sm: 14px / 400 / 1.5
caption: 12px / 500 / 1.4
Step 4: Generate Spacing & Radius
Spacing scale (8px base):
xs: 4px (0.25rem)
sm: 8px (0.5rem)
md: 16px (1rem)
lg: 24px (1.5rem)
xl: 32px (2rem)
2xl: 48px (3rem)
3xl: 64px (4rem)
Radius by personality:
| Personality |
Card |
Button |
Badge |
Input |
| Professional |
8px |
6px |
4px |
6px |
| Minimal |
0-4px |
4px |
2px |
4px |
| Friendly |
12-16px |
8px |
9999px |
8px |
| Premium |
12px |
8px |
6px |
8px |
Shadow by personality:
| Personality |
Style |
| Professional |
Subtle: 0 1px 3px rgba(0,0,0,0.1) |
| Minimal |
None or very subtle borders |
| Friendly |
Soft: 0 4px 12px rgba(0,0,0,0.08) |
| Premium |
Layered: 0 1px 2px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.08) |
| Dark theme |
Glow: 0 0 20px rgba(primary, 0.15) |
Step 5: Output in 3 Formats
Format 1: Token Reference Doc (.planning/design/system/tokens.md)
Human-readable markdown with all tokens, used by designers and all commands.
Format 2: Tailwind Config Snippet
// Paste into tailwind.config.ts → theme.extend
{
colors: {
primary: '[value]',
'primary-hover': '[value]',
accent: '[value]',
background: '[value]',
surface: '[value]',
// ... all color tokens
},
fontFamily: {
sans: ['[font]', 'sans-serif'],
},
borderRadius: {
card: '[value]',
button: '[value]',
},
boxShadow: {
card: '[value]',
},
}
Format 3: CSS Variables
:root {
/* Colors */
--color-primary: [value];
--color-primary-hover: [value];
--color-accent: [value];
--color-bg: [value];
--color-surface: [value];
--color-text: [value];
--color-text-secondary: [value];
--color-text-muted: [value];
--color-border: [value];
--color-success: [value];
--color-warning: [value];
--color-error: [value];
/* Typography */
--font-family: '[font]', sans-serif;
--font-size-h1: 36px;
/* ... full scale */
/* Spacing */
--space-xs: 4px;
--space-sm: 8px;
--space-md: 16px;
--space-lg: 24px;
--space-xl: 32px;
/* Radius */
--radius-card: [value];
--radius-button: [value];
--radius-badge: [value];
/* Shadows */
--shadow-sm: [value];
--shadow-md: [value];
--shadow-lg: [value];
}
Step 6: Generate Component Inventory
Based on the project type, list the components needed:
Dashboard / SaaS:
- Sidebar navigation, Top bar, Stat cards, Data tables, Charts, Modals, Forms, Toast notifications, Dropdown menus, Badges, Avatars, Breadcrumbs
Marketplace / E-commerce:
- Product cards, Search bar, Filters, Cart, Checkout form, Reviews, Ratings, Image galleries, Price displays, Category navigation
Mobile app:
- Bottom tab bar, Pull-to-refresh, Swipeable cards, Action sheets, Floating action button, List items, Empty states, Onboarding screens
Landing page:
- Hero section, Feature grid, Testimonials, Pricing table, CTA buttons, Footer, Navigation, Social proof
Save component inventory to .planning/design/system/components.md.
Design System Constraint for Code Generation
When generating UI code and design tokens already exist:
Read .planning/design/system/tokens.md or .planning/design-config.md FIRST. Your code MUST use these tokens. Do NOT use Tailwind defaults, generic colors, or made-up spacing.
Think of it like a jazz musician: the chord progression is set (tokens). Your job is to build beautifully within it. Don't change the key.
Checklist Before Delivering
1---2name: design-intelligence3description: Design system bootstrapping and token generation. Takes project context and outputs ready-to-use design tokens, Tailwind config, and CSS variables.4---56# Design Intelligence — Token Generation & Design System Bootstrapping78This skill helps set up design systems from scratch. Give it your project context (industry, brand, users) and it generates ready-to-use design tokens with Tailwind config snippets and CSS variable files.910## When to Use1112- Setting up a new project's design system (`/spartan:ux system`)13- Choosing color palettes for a specific industry/brand14- Generating typography scales15- Creating spacing systems16- Bootstrapping a component inventory1718## What This Skill Does19201. Takes project context (what, who, industry, personality)212. Generates a complete design token set223. Outputs in 3 formats: token reference doc, Tailwind config, CSS variables234. Creates a component inventory based on the project type2425## How It Works2627### Step 1: Gather Context2829Ask these questions (skip any the user already answered):30311. **What are you building?** (dashboard, SaaS, marketplace, mobile app, landing page, etc.)322. **Who uses it?** (developers, business users, consumers, admins)333. **What's the personality?** Pick 2-3:34 - Clean / Professional / Corporate35 - Bold / Playful / Creative36 - Minimal / Technical / Developer-focused37 - Warm / Friendly / Approachable38 - Premium / Luxury / Refined39 - Data-heavy / Dense / Information-rich404. **Light, dark, or both?**415. **Any brand colors already decided?** (if yes, use those as the foundation)426. **Reference apps?** (apps that have the quality you want)4344### Step 2: Generate Color Palette4546Based on the context, generate a complete palette:4748**For dark themes:**49```50Background: #0F172A (slate-900 family)51Surface: rgba(30, 41, 59, 0.5) (glass effect)52Primary: [based on personality — blue for professional, green for growth, etc.]53Primary Hover: [10% darker]54Accent: [complementary or analogous — use sparingly, max 10-15%]55Text: #F8FAFC (near white)56Text Secondary: #94A3B8 (slate-400)57Text Muted: #64748B (slate-500)58Border: rgba(148, 163, 184, 0.1)59Success: #22C55E60Warning: #F59E0B61Error: #EF444462```6364**For light themes:**65```66Background: #FFFFFF or #F8FAFC67Surface: #FFFFFF68Primary: [based on personality]69Primary Hover: [10% darker]70Accent: [complementary]71Text: #0F172A (near black)72Text Secondary: #475569 (slate-600)73Text Muted: #64748B (slate-500)74Border: #E2E8F0 (slate-200)75Success: #16A34A76Warning: #D9770677Error: #DC262678```7980**Color selection by personality:**8182| Personality | Primary range | Accent range |83|-------------|--------------|-------------|84| Professional / Corporate | Blue (#2563EB → #1E40AF) | Slate or Amber |85| Bold / Creative | Purple (#7C3AED), Pink (#EC4899) | Yellow or Cyan |86| Minimal / Technical | Gray (#374151), Black (#111827) | One bright accent |87| Warm / Friendly | Orange (#EA580C), Teal (#0D9488) | Amber or Rose |88| Premium / Luxury | Deep Blue (#1E3A5F), Gold (#B8860B) | Silver or Champagne |89| Data-heavy | Neutral blue (#3B82F6) | Green for positive, Red for negative |9091### Step 3: Generate Typography Scale9293Pick a font pairing based on personality:9495| Personality | Font recommendation | Why |96|-------------|-------------------|-----|97| Professional | DM Sans, Plus Jakarta Sans | Clean geometric, good for UI |98| Technical | JetBrains Mono (code) + Inter (UI) | Developer-friendly |99| Creative | Outfit, Space Grotesk | Distinctive but readable |100| Warm | Nunito, Quicksand | Rounded, friendly feel |101| Premium | Playfair Display (headings) + Lato (body) | Elegant contrast |102| Data-heavy | Inter, Roboto Mono (numbers) | Tabular nums, high readability |103104**Type scale (base 16px):**105```106h1: 36px / 700 / 1.2 line-height107h2: 30px / 700 / 1.25108h3: 24px / 600 / 1.3109h4: 20px / 600 / 1.35110h5: 18px / 600 / 1.4111h6: 16px / 600 / 1.4112body: 16px / 400 / 1.6113body-sm: 14px / 400 / 1.5114caption: 12px / 500 / 1.4115```116117### Step 4: Generate Spacing & Radius118119**Spacing scale (8px base):**120```121xs: 4px (0.25rem)122sm: 8px (0.5rem)123md: 16px (1rem)124lg: 24px (1.5rem)125xl: 32px (2rem)1262xl: 48px (3rem)1273xl: 64px (4rem)128```129130**Radius by personality:**131132| Personality | Card | Button | Badge | Input |133|-------------|------|--------|-------|-------|134| Professional | 8px | 6px | 4px | 6px |135| Minimal | 0-4px | 4px | 2px | 4px |136| Friendly | 12-16px | 8px | 9999px | 8px |137| Premium | 12px | 8px | 6px | 8px |138139**Shadow by personality:**140141| Personality | Style |142|-------------|-------|143| Professional | Subtle: `0 1px 3px rgba(0,0,0,0.1)` |144| Minimal | None or very subtle borders |145| Friendly | Soft: `0 4px 12px rgba(0,0,0,0.08)` |146| Premium | Layered: `0 1px 2px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.08)` |147| Dark theme | Glow: `0 0 20px rgba(primary, 0.15)` |148149### Step 5: Output in 3 Formats150151#### Format 1: Token Reference Doc (`.planning/design/system/tokens.md`)152153Human-readable markdown with all tokens, used by designers and all commands.154155#### Format 2: Tailwind Config Snippet156157```typescript158// Paste into tailwind.config.ts → theme.extend159{160 colors: {161 primary: '[value]',162 'primary-hover': '[value]',163 accent: '[value]',164 background: '[value]',165 surface: '[value]',166 // ... all color tokens167 },168 fontFamily: {169 sans: ['[font]', 'sans-serif'],170 },171 borderRadius: {172 card: '[value]',173 button: '[value]',174 },175 boxShadow: {176 card: '[value]',177 },178}179```180181#### Format 3: CSS Variables182183```css184:root {185 /* Colors */186 --color-primary: [value];187 --color-primary-hover: [value];188 --color-accent: [value];189 --color-bg: [value];190 --color-surface: [value];191 --color-text: [value];192 --color-text-secondary: [value];193 --color-text-muted: [value];194 --color-border: [value];195 --color-success: [value];196 --color-warning: [value];197 --color-error: [value];198199 /* Typography */200 --font-family: '[font]', sans-serif;201 --font-size-h1: 36px;202 /* ... full scale */203204 /* Spacing */205 --space-xs: 4px;206 --space-sm: 8px;207 --space-md: 16px;208 --space-lg: 24px;209 --space-xl: 32px;210211 /* Radius */212 --radius-card: [value];213 --radius-button: [value];214 --radius-badge: [value];215216 /* Shadows */217 --shadow-sm: [value];218 --shadow-md: [value];219 --shadow-lg: [value];220}221```222223### Step 6: Generate Component Inventory224225Based on the project type, list the components needed:226227**Dashboard / SaaS:**228- Sidebar navigation, Top bar, Stat cards, Data tables, Charts, Modals, Forms, Toast notifications, Dropdown menus, Badges, Avatars, Breadcrumbs229230**Marketplace / E-commerce:**231- Product cards, Search bar, Filters, Cart, Checkout form, Reviews, Ratings, Image galleries, Price displays, Category navigation232233**Mobile app:**234- Bottom tab bar, Pull-to-refresh, Swipeable cards, Action sheets, Floating action button, List items, Empty states, Onboarding screens235236**Landing page:**237- Hero section, Feature grid, Testimonials, Pricing table, CTA buttons, Footer, Navigation, Social proof238239Save component inventory to `.planning/design/system/components.md`.240241---242243## Design System Constraint for Code Generation244245**When generating UI code and design tokens already exist:**246247Read `.planning/design/system/tokens.md` or `.planning/design-config.md` FIRST. Your code MUST use these tokens. Do NOT use Tailwind defaults, generic colors, or made-up spacing.248249Think of it like a jazz musician: the chord progression is set (tokens). Your job is to build beautifully within it. Don't change the key.250251---252253## Checklist Before Delivering254255- [ ] All 3 output formats generated (token doc, Tailwind, CSS variables)256- [ ] Colors have enough contrast (4.5:1 for text)257- [ ] Typography scale is consistent and readable258- [ ] Spacing uses the grid (no arbitrary values)259- [ ] Component inventory matches project type260- [ ] design-config.md updated (if it existed before)