Overview
Design tokens are the single source of truth for design decisions. This skill covers token taxonomy, color scales, typography, spacing systems, dark mode, and implementation via CSS custom properties and Tailwind.
Capabilities
- Define color scales with semantic naming (primary, success, error)
- Build typography scales with consistent line heights and weights
- Create spacing systems based on a base unit (4px or 8px)
- Implement dark mode via token swapping
- Export tokens to CSS custom properties, Tailwind, and Figma
When to Use
Trigger phrases:
"design tokens"
"designing tokens"
"Design token systems — color, typography, spacing, and theme architecture for co"
Starting a new design system from scratch
Inconsistencies in colors, fonts, or spacing across the app
Need to support dark mode or multiple themes
Syncing design decisions between Figma and code
When NOT to Use
- Task is about content strategy, not creation (use strategy skills)
- Task is about content distribution (use distribution skills)
- You need to analyze content performance (use analytics skills)
- Task is about content moderation (use moderation tools)
- You don't have content guidelines
- Task requires domain expertise (consult experts)
Pseudo Code
The design-tokens workflow follows a standard pipeline pattern.
Core flow:
# design-tokens primary flow
input = prepare(raw_data)
result = process(input, config={architecture, color, consistent, design, spacing})
validate(result)
deliver(result)
Error handling:
on error:
log(error_details)
retry_with_backoff(max=3)
if still_failing: alert_and_escalate()
Core Workflow
# design-tokens primary flow
input = prepare(raw_data)
result = process(input, config={architecture, color, consistent, design, spacing})
validate(result)
deliver(result)
Error Handling
on error:
log(error_details)
retry_with_backoff(max=3)
if still_failing: alert_and_escalate()
Token Definition
{
"color": {
"primary": { "50": "#eff6ff", "500": "#3b82f6", "900": "#1e3a8a" },
"success": { "500": "#22c55e" },
"error": { "500": "#ef4444" }
},
"spacing": { "xs": "4px", "sm": "8px", "md": "16px", "lg": "24px", "xl": "32px" },
"fontSize": { "xs": "12px", "sm": "14px", "base": "16px", "lg": "18px", "xl": "24px" }
}
CSS Custom Properties
:root {
--color-primary: var(--color-primary-500);
--color-bg: #ffffff;
--color-text: #171717;
}
[data-theme="dark"] {
--color-bg: #0a0a0a;
--color-text: #fafafa;
}
Common Patterns
- Semantic naming: Use
primary, success, error — not blue-500, green-500
- Scale by 100s: Color shades: 50, 100, 200, ..., 900
- 4px base unit: All spacing multiples of 4px for rhythm
- Dark mode swap: Swap 50↔900, 100↔800, etc.
How to Use
- Define content goal (traffic, engagement, conversion, brand awareness)
- Research target audience pain points and search intent
- Generate content using appropriate AI tools
- Edit and humanize output for authenticity
- Optimize for target platform (SEO, hashtags, format)
- Schedule and distribute across channels
- Measure performance and iterate
Red Flags
- AI-generated content sounds robotic: Always run through humanizer before publishing
- Engagement dropping week-over-week: Content fatigue or algorithm change — vary formats
- Duplicate content across platforms: Adapt content per platform, don't just cross-post
- No content calendar: Sporadic posting kills audience retention
- Ignoring analytics: Content without measurement is just publishing, not marketing
Verification
Process
- Analyze the task requirements
- Apply domain expertise
- Verify output quality
Anti-Rationalization Table
| Rationalization |
Reality |
| "Good enough content works" |
Quality content drives engagement. Mediocre content gets ignored. |
| "I will optimize later" |
SEO and distribution need optimization from the start. |
| "Templates are good enough" |
Templates are a starting point. Custom content outperforms generic. |
Video / Motion Graphics
Design tokens ensure brand consistency across Remotion video compositions. Define brand colors, spacing, and typography tokens once, use across all video scenes. Tokens map directly to CSS custom properties in Remotion components.
1---2name: design-tokens3description: Use when design token systems — color, typography, spacing, and theme architecture for consistent design. Use when designing token systems — color, typography, spacing, and theme architecture.4license: Apache-2.05---678910## Overview1112Design tokens are the single source of truth for design decisions. This skill covers token taxonomy, color scales, typography, spacing systems, dark mode, and implementation via CSS custom properties and Tailwind.1314## Capabilities1516- Define color scales with semantic naming (primary, success, error)17- Build typography scales with consistent line heights and weights18- Create spacing systems based on a base unit (4px or 8px)19- Implement dark mode via token swapping20- Export tokens to CSS custom properties, Tailwind, and Figma2122## When to Use23**Trigger phrases:**24- "design tokens"25- "designing tokens"26- "Design token systems — color, typography, spacing, and theme architecture for co"272829- Starting a new design system from scratch30- Inconsistencies in colors, fonts, or spacing across the app31- Need to support dark mode or multiple themes32- Syncing design decisions between Figma and code3334## When NOT to Use3536- Task is about content strategy, not creation (use strategy skills)37- Task is about content distribution (use distribution skills)38- You need to analyze content performance (use analytics skills)39- Task is about content moderation (use moderation tools)40- You don't have content guidelines41- Task requires domain expertise (consult experts)424344## Pseudo Code4546The design-tokens workflow follows a standard pipeline pattern.4748Core flow:49```50# design-tokens primary flow51input = prepare(raw_data)52result = process(input, config={architecture, color, consistent, design, spacing})53validate(result)54deliver(result)55```5657Error handling:58```59on error:60 log(error_details)61 retry_with_backoff(max=3)62 if still_failing: alert_and_escalate()63```646566### Core Workflow67```68# design-tokens primary flow69input = prepare(raw_data)70result = process(input, config={architecture, color, consistent, design, spacing})71validate(result)72deliver(result)73```7475### Error Handling76```77on error:78 log(error_details)79 retry_with_backoff(max=3)80 if still_failing: alert_and_escalate()81```828384### Token Definition85```json86{87 "color": {88 "primary": { "50": "#eff6ff", "500": "#3b82f6", "900": "#1e3a8a" },89 "success": { "500": "#22c55e" },90 "error": { "500": "#ef4444" }91 },92 "spacing": { "xs": "4px", "sm": "8px", "md": "16px", "lg": "24px", "xl": "32px" },93 "fontSize": { "xs": "12px", "sm": "14px", "base": "16px", "lg": "18px", "xl": "24px" }94}95```9697### CSS Custom Properties98```css99:root {100 --color-primary: var(--color-primary-500);101 --color-bg: #ffffff;102 --color-text: #171717;103}104[data-theme="dark"] {105 --color-bg: #0a0a0a;106 --color-text: #fafafa;107}108```109110## Common Patterns111112- **Semantic naming**: Use `primary`, `success`, `error` — not `blue-500`, `green-500`113- **Scale by 100s**: Color shades: 50, 100, 200, ..., 900114- **4px base unit**: All spacing multiples of 4px for rhythm115- **Dark mode swap**: Swap 50↔900, 100↔800, etc.116117## How to Use1181191. Define content goal (traffic, engagement, conversion, brand awareness)1202. Research target audience pain points and search intent1213. Generate content using appropriate AI tools1224. Edit and humanize output for authenticity1235. Optimize for target platform (SEO, hashtags, format)1246. Schedule and distribute across channels1257. Measure performance and iterate126127## Red Flags128129- **AI-generated content sounds robotic**: Always run through humanizer before publishing130- **Engagement dropping week-over-week**: Content fatigue or algorithm change — vary formats131- **Duplicate content across platforms**: Adapt content per platform, don't just cross-post132- **No content calendar**: Sporadic posting kills audience retention133- **Ignoring analytics**: Content without measurement is just publishing, not marketing134135## Verification136137- [ ] Skill output matches expected behavior138139## Process1401411. Analyze the task requirements1422. Apply domain expertise1433. Verify output quality144145## Anti-Rationalization Table146147| Rationalization | Reality |148|---|---|149| "Good enough content works" | Quality content drives engagement. Mediocre content gets ignored. |150| "I will optimize later" | SEO and distribution need optimization from the start. |151| "Templates are good enough" | Templates are a starting point. Custom content outperforms generic. |152153## Video / Motion Graphics154155Design tokens ensure brand consistency across [Remotion](../video/remotion/SKILL.md) video compositions. Define brand colors, spacing, and typography tokens once, use across all video scenes. Tokens map directly to CSS custom properties in Remotion components.