skills/frontend-design/design-foundation/SKILL.md
Establish or formalize your design system foundation. Create design tokens (color, typography, spacing, shadows, borders), define component architecture, document design principles, and build the structure that enables consistency and scalability. Works with Tailwind CSS and framework-agnostic approaches.
npx skillsauth add sanky369/vibe-building-skills design-foundationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A design foundation is the bedrock upon which all great products are built. It's not just a collection of colors and fonts—it's a system of decisions that enables your team to build consistently, quickly, and with intention.
This skill helps you create or formalize your design foundation, whether you're starting from scratch or documenting what already exists. It covers design tokens, component structure, design principles documentation, and the governance model for your system.
Modern design systems are built on the concept of design tokens—named entities that store design decisions. Rather than hardcoding colors or spacing values throughout your codebase, tokens centralize these decisions, making them easy to maintain, theme, and scale.
Design tokens are organized in layers, from most abstract to most concrete:
Layer 1: Global Tokens (The Foundation) These are your base design decisions—the raw materials of your system.
Global Tokens:
├── Colors
│ ├── Primary: #3B82F6
│ ├── Secondary: #8B5CF6
│ ├── Success: #10B981
│ ├── Warning: #F59E0B
│ ├── Error: #EF4444
│ ├── Neutral-50: #F9FAFB
│ ├── Neutral-100: #F3F4F6
│ └── ... (up to Neutral-950)
├── Typography
│ ├── Font-Family-Base: Inter, system-ui, sans-serif
│ ├── Font-Size-Base: 16px
│ ├── Line-Height-Base: 1.5
│ └── Font-Weight: (300, 400, 500, 600, 700, 800)
├── Spacing
│ ├── Space-0: 0
│ ├── Space-1: 0.25rem (4px)
│ ├── Space-2: 0.5rem (8px)
│ ├── Space-3: 0.75rem (12px)
│ └── ... (up to Space-12+)
├── Shadows
│ ├── Shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05)
│ ├── Shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1)
│ └── ...
└── Border Radius
├── Radius-sm: 0.25rem (4px)
├── Radius-md: 0.375rem (6px)
├── Radius-lg: 0.5rem (8px)
└── ...
Layer 2: Semantic Tokens (The Meaning) These tokens assign meaning to global tokens based on context and usage.
Semantic Tokens:
├── Colors
│ ├── Background-Primary: {Global.Neutral-50}
│ ├── Background-Secondary: {Global.Neutral-100}
│ ├── Text-Primary: {Global.Neutral-950}
│ ├── Text-Secondary: {Global.Neutral-600}
│ ├── Border-Primary: {Global.Neutral-200}
│ ├── Interactive-Primary: {Global.Primary}
│ ├── Interactive-Hover: {Global.Primary-600}
│ ├── Interactive-Active: {Global.Primary-700}
│ ├── State-Success: {Global.Success}
│ ├── State-Warning: {Global.Warning}
│ └── State-Error: {Global.Error}
├── Typography
│ ├── Heading-1: (Font-Size: 32px, Line-Height: 1.2, Font-Weight: 700)
│ ├── Heading-2: (Font-Size: 24px, Line-Height: 1.3, Font-Weight: 600)
│ ├── Body-Large: (Font-Size: 18px, Line-Height: 1.5, Font-Weight: 400)
│ ├── Body-Regular: (Font-Size: 16px, Line-Height: 1.5, Font-Weight: 400)
│ ├── Body-Small: (Font-Size: 14px, Line-Height: 1.5, Font-Weight: 400)
│ └── Caption: (Font-Size: 12px, Line-Height: 1.4, Font-Weight: 500)
├── Spacing
│ ├── Padding-Component: {Global.Space-4}
│ ├── Padding-Section: {Global.Space-8}
│ ├── Margin-Component: {Global.Space-3}
│ └── Gap-Component: {Global.Space-4}
└── Shadows
├── Elevation-1: {Global.Shadow-sm}
├── Elevation-2: {Global.Shadow-md}
└── Elevation-3: {Global.Shadow-lg}
Layer 3: Component Tokens (The Application) These tokens are specific to individual components and use semantic tokens as their values.
Component Tokens:
├── Button
│ ├── Button-Primary-Background: {Semantic.Interactive-Primary}
│ ├── Button-Primary-Background-Hover: {Semantic.Interactive-Hover}
│ ├── Button-Primary-Text: {Semantic.Text-Inverse}
│ ├── Button-Padding: {Semantic.Padding-Component}
│ └── Button-Border-Radius: {Global.Radius-md}
├── Card
│ ├── Card-Background: {Semantic.Background-Primary}
│ ├── Card-Border: {Semantic.Border-Primary}
│ ├── Card-Padding: {Semantic.Padding-Component}
│ ├── Card-Border-Radius: {Global.Radius-lg}
│ └── Card-Shadow: {Semantic.Elevation-1}
└── Input
├── Input-Background: {Semantic.Background-Primary}
├── Input-Border: {Semantic.Border-Primary}
├── Input-Border-Hover: {Semantic.Border-Secondary}
├── Input-Text: {Semantic.Text-Primary}
├── Input-Padding: {Semantic.Padding-Component}
└── Input-Border-Radius: {Global.Radius-md}
Tailwind CSS is designed around the concept of tokens. Your tailwind.config.js file is essentially your token system:
module.exports = {
theme: {
// Global Tokens
colors: {
primary: {
50: '#EFF6FF',
100: '#DBEAFE',
500: '#3B82F6',
600: '#2563EB',
700: '#1D4ED8',
950: '#0C2340',
},
secondary: {
50: '#F3E8FF',
500: '#8B5CF6',
600: '#7C3AED',
950: '#2E1065',
},
success: '#10B981',
warning: '#F59E0B',
error: '#EF4444',
neutral: {
50: '#F9FAFB',
100: '#F3F4F6',
600: '#4B5563',
950: '#030712',
},
},
// Semantic Tokens (via CSS variables or custom utilities)
extend: {
backgroundColor: {
'bg-primary': 'var(--color-bg-primary)',
'bg-secondary': 'var(--color-bg-secondary)',
},
textColor: {
'text-primary': 'var(--color-text-primary)',
'text-secondary': 'var(--color-text-secondary)',
},
spacing: {
'component': 'var(--space-component)',
'section': 'var(--space-section)',
},
},
},
};
When formalizing your design foundation, audit and document these elements:
These are the "why" behind your design decisions. They guide all future work.
Example Design Principles:
Document your color palette, including:
Audit Questions:
Document your typography, including:
Audit Questions:
Document your spacing, including:
Audit Questions:
Document your components, including:
Audit Questions:
Document your responsive design strategy:
Document:
"I'm using the design-foundation skill. Can you audit my current design system?
- Analyze my Tailwind config
- Identify inconsistencies in colors, spacing, typography
- Suggest improvements
- Create a design token system based on what I have"
Claude Code will:
"I'm starting from scratch. Can you help me create a design foundation?
- Define design principles for my product
- Create a color system (I want a modern, professional look)
- Create a typography system
- Create a spacing system
- Create a component library structure"
Claude Code will:
"We have a design system that's not well-documented. Can you:
- Extract design tokens from our current Tailwind config
- Document our component library
- Create design principles based on our current design
- Suggest improvements and inconsistencies"
Claude Code will:
"Can you create comprehensive documentation for our design system?
- Design principles
- Color system with usage guidelines
- Typography system with examples
- Spacing system with examples
- Component library with all variants and states
- Accessibility guidelines
- Responsive design guidelines"
Claude Code will generate:
Claude Code can critique your design foundation:
"Can you evaluate my design foundation?
- Is my color system coherent?
- Are my typography scales appropriate?
- Is my spacing system logical?
- Are there inconsistencies I'm missing?
- What's one thing I could improve immediately?"
The design-foundation skill is foundational to all other skills:
1. Tokens Enable Consistency When design decisions are centralized in tokens, consistency becomes automatic.
2. Semantic Tokens Enable Flexibility By separating global tokens from semantic tokens, you can support dark mode, theming, and accessibility features without duplicating code.
3. Documentation Enables Adoption A design system that's not documented won't be used. Invest in clear, comprehensive documentation.
4. Governance Enables Scale As your team grows, clear guidelines for adding new tokens and components prevent chaos.
5. Accessibility is Foundational Design tokens should encode accessibility from the start (e.g., color contrast ratios, readable font sizes).
Define tokens for both light and dark modes:
// Global tokens (same for both modes)
colors: {
primary: '#3B82F6',
neutral: { 50: '#F9FAFB', 950: '#030712' },
}
// Semantic tokens (mode-specific)
// Light mode
backgroundColor: { 'bg-primary': '{neutral.50}' }
textColor: { 'text-primary': '{neutral.950}' }
// Dark mode
@media (prefers-color-scheme: dark) {
backgroundColor: { 'bg-primary': '{neutral.950}' }
textColor: { 'text-primary': '{neutral.50}' }
}
Define tokens for component variants:
// Button variants
button: {
primary: {
background: '{interactive.primary}',
text: '{text.inverse}',
},
secondary: {
background: '{background.secondary}',
text: '{text.primary}',
},
ghost: {
background: 'transparent',
text: '{interactive.primary}',
},
}
Define tokens that change at different breakpoints:
// Typography that scales with viewport
fontSize: {
'heading-1': ['32px', { lineHeight: '1.2' }], // desktop
'@sm': { fontSize: '24px' }, // tablet
'@xs': { fontSize: '20px' }, // mobile
}
A strong design foundation is not built overnight, but the investment pays dividends in consistency, speed, and team alignment.
testing
Diagnose your marketing situation and sequence all 9 other skills strategically. Use when starting a new marketing initiative, auditing your current system, or optimizing your marketing strategy.
development
Use when creating an original visual design language, identity, or art direction for any artifact — infographics, video storyboards, websites, or mobile app UI/UX — or when a design feels generic, derivative, "AI-default," or inconsistent and needs one unifying idea. Triggers on "design language", "art direction", "make it original", "visual identity", "looks generic", "design a world".
development
Write viral, persuasive, engaging tweets and threads. Uses web research to find viral examples in your niche, then models writing based on proven formulas and X algorithm optimization. Use when creating tweets, threads, or X content strategy.
development
Complete DIY SEO strategy based on agency secrets. Covers winnable keyword research, programmatic content at scale, link building, technical SEO, and 90-day action plans. Reference the Complete_SEO_Playbook.md in references folder for deep dives.