
Design Tokens
Generate a consistent spacing, color, and type token file before you write UI components so solo builds do not hardcode magic values.
Install
npx skills add https://github.com/julianoczkowski/designer-skills --skill design-tokensWhat is this skill?
- Scans the repo first for existing `:root` vars, Tailwind config, MUI/Chakra/shadcn themes, and Style Dictionary JSON bef
- Extends existing tokens instead of replacing them when definitions are already present
- Outputs light and dark palettes plus spacing scale, type ramp, and component-level tokens from a chosen aesthetic philos
- Intended run order: after the design brief and before any components are built
- Detects UI stack from package.json (Tailwind, MUI, Chakra, etc.) to shape output format
Adoption & trust: 2.2k installs on skills.sh; 269 GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Web Design Guidelinesvercel-labs/agent-skills
Lark Whiteboardlarksuite/cli
Ui Ux Pro Maxnextlevelbuilder/ui-ux-pro-max-skill
Sleek Design Mobile Appssleekdotdesign/agent-skills
Impeccablepbakaus/impeccable
Design Taste Frontendleonxlnx/taste-skill
Journey fit
Common Questions / FAQ
Is Design Tokens safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Design Tokens
This skill generates the foundational design tokens for a project. Run this after the design brief and before building any components. Every component built after this references these tokens instead of hardcoding values. ## Example prompts - "Set up design tokens for this project" - "Generate a token system based on Dieter Rams" - "I need a spacing scale and color palette before I start building" - "Create tokens that match our brief" ## Process 1. **Check what already exists.** Before generating anything, scan the codebase for: - CSS variable definitions (`:root`, `[data-theme]`, custom property files) - Tailwind config (`tailwind.config.js`, `tailwind.config.ts`) and any theme extensions - Theme provider files (Material UI `createTheme`, Chakra `extendTheme`, shadcn `globals.css`) - Design token JSON files (Style Dictionary format, Figma token exports) - Any `tokens.css`, `variables.css`, `theme.css`, or similarly named files - `package.json` for UI framework dependencies (tailwindcss, @mui/material, @chakra-ui/react, etc.) If tokens already exist, **extend them** rather than replacing. Identify gaps (missing dark mode, incomplete spacing scale, no motion tokens) and fill those. 2. **Read the brief.** Look for a design brief at `.design/*/DESIGN_BRIEF.md`. If multiple subfolders exist, use the most recently modified one, or ask the user which feature they are working on. If a philosophy is named, use the parameters from `/frontend-design` to derive token values. If no brief exists, ask the user what direction they want. 3. **Generate tokens** in the format that matches the project's tech stack: - Tailwind project → extend `tailwind.config.js` and write to `globals.css` - CSS/HTML project → write to a `tokens.css` file - CSS-in-JS project → write to a `theme.ts` or `theme.js` file - If unclear, default to CSS custom properties (most portable) 4. **Always generate both light and dark mode palettes.** Use `[data-theme="dark"]` or `prefers-color-scheme` media query. Both palettes should feel intentional for the chosen philosophy, not just inverted values. ## Token Categories ### Color ```css /* Semantic color tokens, not raw values */ --color-bg-primary: /* Main background */ --color-bg-secondary: /* Secondary/card background */ --color-bg-tertiary: /* Subtle background (inputs, wells) */ --color-bg-inverse: /* Inverted background */ --color-text-primary: /* Main text */ --color-text-secondary: /* Subdued text */ --color-text-tertiary: /* Placeholder, disabled text */ --color-text-inverse: /* Text on inverse backgrounds */ --color-text-link: /* Link color */ --color-border-primary: /* Default borders */ --color-border-secondary: /* Subtle borders */ --color-border-focus: /* Focus ring color */ --color-accent-primary: /* Primary action color */ --color-accent-primary-hover: --color-accent-primary-active: --color-accent-secondary: /* Secondary action color */ --color-status-success: --color-status-warning: --color-status-error: --color-status-info: --color-surface-overlay: /* Modal/dropdown backdrop */ ``` ### Spacing Generate a consistent scale. The base unit should match the philosophy: - Tight philosophies (Brutalist, Swiss): 4px base - Balanced philosophies (Rams, Scandinavian): 4px or 8px base - Spacious philosophies (Japanese Minimalism, Editorial): 8px base with larger multipliers ```css --space-0: 0; --space-1: /* base * 0.25 */ --space-2: /* base * 0.5 */ --space-3: /* base * 0.75 */ --space-4: /* base * 1 */ --spa