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. |
Companion Domain Skills
Token systems are the substrate; these skills are the consumers that judge them:
better-colors — audits ramp structure, semantic token naming, and measures every rendered contrast pair against better-accessibility's required ratios.
better-typography — sets the type scale, font features, wrapping and truncation against the tokens you declare here.
better-layout — uses spacing/breakpoint tokens for grouping, alignment and responsive structure.
hallmark — enforces a non-waivable Floor (every color/font/spacing value must be a CSS variable at :root); this skill is the source of those tokens.
impeccable — extracts and documents a project's existing tokens into DESIGN.md before any design work.
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-tokens-23description: Use when design token systems — color, typography, spacing, and theme4 architecture for consistent design. Use when designing token systems — color, typography,5 spacing, and theme architecture.6domain: content7author: oyi778license: Apache-2.09subdomain: content-creation10tags:11- content-creation12- design13- digital-content14- media15- tokens16version: 1.0.017triggers:18- "design-tokens"19- "token system"20- "css variables"21- "design tokens"22- "color token"23category: content24metadata:25 source: https://skillmd.com/skills/oyi77/design-tokens-226---2728## Overview2930Design 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.3132## Capabilities3334- Define color scales with semantic naming (primary, success, error)35- Build typography scales with consistent line heights and weights36- Create spacing systems based on a base unit (4px or 8px)37- Implement dark mode via token swapping38- Export tokens to CSS custom properties, Tailwind, and Figma3940## When to Use41**Trigger phrases:**42- "design tokens"43- "designing tokens"44- "Design token systems — color, typography, spacing, and theme architecture for co"454647- Starting a new design system from scratch48- Inconsistencies in colors, fonts, or spacing across the app49- Need to support dark mode or multiple themes50- Syncing design decisions between Figma and code5152## When NOT to Use5354- Task is about content strategy, not creation (use strategy skills)55- Task is about content distribution (use distribution skills)56- You need to analyze content performance (use analytics skills)57- Task is about content moderation (use moderation tools)58- You don't have content guidelines59- Task requires domain expertise (consult experts)606162## Pseudo Code6364The design-tokens workflow follows a standard pipeline pattern.6566Core flow:67```68# design-tokens primary flow69input = prepare(raw_data)70result = process(input, config={architecture, color, consistent, design, spacing})71validate(result)72deliver(result)73```7475Error handling:76```77on error:78 log(error_details)79 retry_with_backoff(max=3)80 if still_failing: alert_and_escalate()81```828384### Core Workflow85```86# design-tokens primary flow87input = prepare(raw_data)88result = process(input, config={architecture, color, consistent, design, spacing})89validate(result)90deliver(result)91```9293### Error Handling94```95on error:96 log(error_details)97 retry_with_backoff(max=3)98 if still_failing: alert_and_escalate()99```100101102### Token Definition103```json104{105 "color": {106 "primary": { "50": "#eff6ff", "500": "#3b82f6", "900": "#1e3a8a" },107 "success": { "500": "#22c55e" },108 "error": { "500": "#ef4444" }109 },110 "spacing": { "xs": "4px", "sm": "8px", "md": "16px", "lg": "24px", "xl": "32px" },111 "fontSize": { "xs": "12px", "sm": "14px", "base": "16px", "lg": "18px", "xl": "24px" }112}113```114115### CSS Custom Properties116```css117:root {118 --color-primary: var(--color-primary-500);119 --color-bg: #ffffff;120 --color-text: #171717;121}122[data-theme="dark"] {123 --color-bg: #0a0a0a;124 --color-text: #fafafa;125}126```127128## Common Patterns129130- **Semantic naming**: Use `primary`, `success`, `error` — not `blue-500`, `green-500`131- **Scale by 100s**: Color shades: 50, 100, 200, ..., 900132- **4px base unit**: All spacing multiples of 4px for rhythm133- **Dark mode swap**: Swap 50↔900, 100↔800, etc.134135## How to Use1361371. Define content goal (traffic, engagement, conversion, brand awareness)1382. Research target audience pain points and search intent1393. Generate content using appropriate AI tools1404. Edit and humanize output for authenticity1415. Optimize for target platform (SEO, hashtags, format)1426. Schedule and distribute across channels1437. Measure performance and iterate144145## Red Flags146147- **AI-generated content sounds robotic**: Always run through humanizer before publishing148- **Engagement dropping week-over-week**: Content fatigue or algorithm change — vary formats149- **Duplicate content across platforms**: Adapt content per platform, don't just cross-post150- **No content calendar**: Sporadic posting kills audience retention151- **Ignoring analytics**: Content without measurement is just publishing, not marketing152153## Verification154155- [ ] Skill output matches expected behavior156157## Process1581591. Analyze the task requirements1602. Apply domain expertise1613. Verify output quality162163## Anti-Rationalization Table164165| Rationalization | Reality |166|---|---|167| "Good enough content works" | Quality content drives engagement. Mediocre content gets ignored. |168| "I will optimize later" | SEO and distribution need optimization from the start. |169| "Templates are good enough" | Templates are a starting point. Custom content outperforms generic. |170171## Companion Domain Skills172173Token systems are the substrate; these skills are the consumers that judge them:174- `better-colors` — audits ramp structure, semantic token naming, and measures every rendered contrast pair against `better-accessibility`'s required ratios.175- `better-typography` — sets the type scale, font features, wrapping and truncation against the tokens you declare here.176- `better-layout` — uses spacing/breakpoint tokens for grouping, alignment and responsive structure.177- `hallmark` — enforces a non-waivable Floor (every color/font/spacing value must be a CSS variable at `:root`); this skill is the source of those tokens.178- `impeccable` — extracts and documents a project's existing tokens into `DESIGN.md` before any design work.179## Video / Motion Graphics180181Design tokens ensure brand consistency across [Remotion](../../content/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.