
design-tokens
Generate a design tokens file (CSS variables or Tailwind config) based on a chosen aesthetic philosophy, with light and dark mode palettes, spacing scale, type ramp, and component-level tokens. Use when starting a new project, establishing a visual system, setting up tokens, or mentions "tokens" or "design system".
- Installs
- 5.9K
- Last 24h
- +11
- Trending rank
- #8164
- Security
- Pass
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/julianoczkowski/designer-skills --skill design-tokens- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads design-tokens automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
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
-
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, ChakraextendTheme, shadcnglobals.css) - Design token JSON files (Style Dictionary format, Figma token exports)
- Any
tokens.css,variables.css,theme.css, or similarly named files package.jsonfor 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.
- CSS variable definitions (
-
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-designto derive token values. If no brief exists, ask the user what direction they want. -
Generate tokens in the format that matches the project's tech stack:
- Tailwind project → extend
tailwind.config.jsand write toglobals.css - CSS/HTML project → write to a
tokens.cssfile - CSS-in-JS project → write to a
theme.tsortheme.jsfile - If unclear, default to CSS custom properties (most portable)
- Tailwind project → extend
-
Always generate both light and dark mode palettes. Use
[data-theme="dark"]orprefers-color-schememedia query. Both palettes should feel intentional for the chosen philosophy, not just inverted values.
Token Categories
Color
/* 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
--space-0: 0;
--space-1: /* base * 0.25 */
--space-2: /* base * 0.5 */
--space-3: /* base * 0.75 */
--space-4: /* base * 1 */
--space-5: /* base * 1.5 */
--space-6: /* base * 2 */
--space-7: /* base * 3 */
--space-8: /* base * 4 */
--space-9: /* base * 6 */
--space-10: /* base * 8 */
--space-11: /* base * 12 */
--space-12: /* base * 16 */
Typography
--font-family-display: /* Headline/display font */
--font-family-body: /* Body text font */
--font-family-mono: /* Code/monospace font */
--font-size-xs:
--font-size-sm:
--font-size-base:
--font-size-md:
--font-size-lg:
--font-size-xl:
--font-size-2xl:
--font-size-3xl:
--font-size-4xl: /* Hero/display size */
--font-weight-normal:
--font-weight-medium:
--font-weight-semibold:
--font-weight-bold:
--line-height-tight: /* Headings: 1.1-1.3 */
--line-height-normal: /* Body: 1.4-1.6 */
--line-height-relaxed: /* Spacious body: 1.6-1.8 */
--letter-spacing-tight: /* Display type */
--letter-spacing-normal:
--letter-spacing-wide: /* All-caps, labels */
Layout
--max-width-content: /* Max reading width (65-75ch equivalent) */
--max-width-wide: /* Wide content area */
--max-width-page: /* Full page max width */
--border-radius-sm:
--border-radius-md:
--border-radius-lg:
--border-radius-full: /* Pill/circle */
--shadow-sm:
--shadow-md:
--shadow-lg:
--shadow-focus: /* Focus ring shadow */
Motion
--duration-instant: 50ms;
--duration-fast: 150ms;
--duration-normal: 250ms;
--duration-slow: 400ms;
--duration-slower: 600ms;
--easing-default: cubic-bezier(0.4, 0, 0.2, 1);
--easing-in: cubic-bezier(0.4, 0, 1, 1);
--easing-out: cubic-bezier(0, 0, 0.2, 1);
--easing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
Responsive Breakpoints
--breakpoint-sm: 375px; /* Mobile */
--breakpoint-md: 768px; /* Tablet */
--breakpoint-lg: 1024px; /* Small desktop */
--breakpoint-xl: 1280px; /* Desktop */
--breakpoint-2xl: 1536px; /* Wide desktop */
Dark Mode
Always generate dark mode tokens alongside light mode. Rules:
- Do not simply invert colors. Dark backgrounds should be warm or cool depending on the philosophy.
- Reduce contrast slightly in dark mode (pure white text on pure black is harsh).
- Shadows should use darker, more transparent values in dark mode, not the same shadows as light.
- Accent colors may need lightness adjustments to maintain contrast ratios.
- Include a
prefers-color-schememedia query AND a[data-theme="dark"]attribute selector so the user can support both system preference and manual toggle.
:root {
/* Light mode tokens */
}
[data-theme="dark"] {
/* Dark mode overrides */
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
/* System-preference dark mode, unless user explicitly chose light */
}
}
Output
Save the tokens file in the appropriate location for the project's tech stack. State which philosophy the tokens are derived from and note any deviations or choices made.
FAQ
What does the design-tokens skill do?
Generate a design tokens file (CSS variables or Tailwind config) based on a chosen aesthetic philosophy, with light and dark mode palettes, spacing scale, type ramp, and component-level tokens. Use when starting a new project, establishing a visual system, setting up tokens, or mentions "tokens" or "design system".
How do I install design-tokens?
Run npx skills add https://github.com/julianoczkowski/designer-skills --skill design-tokens in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/design-tokens/ (personal) or .claude/skills/design-tokens/ (project).
Which AI agents can use design-tokens?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is design-tokens safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed; ZeroLeaks passed. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains design-tokens?
It is published by julianoczkowski in julianoczkowski/designer-skills. It has 5,932 recorded installs.
More from julianoczkowski/designer-skills
information-architecture
julianoczkowski/designer-skills
Define the structural layer of a product or site before visual design begins. Covers navigation, content hierarchy, page structure, URL patterns, and user flows. Use when user wants to plan site structure, define navigation, map user flows, organize content, or mentions "IA" or "information architecture".
design-review
julianoczkowski/designer-skills
Run a structured design critique against the brief and codebase. Checks visual hierarchy, consistency, responsiveness, accessibility, and aesthetic fidelity. Use when user wants a design review, critique, QA pass, polish pass, or mentions "review" after building.
frontend-design
julianoczkowski/designer-skills
Build distinctive, production-grade frontend interfaces with high design quality, guided by named aesthetic philosophies. Use when building components, pages, or applications. Generates working code with exceptional attention to aesthetic details and creative choices that avoid generic AI output.
grill-me
julianoczkowski/designer-skills
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, challenge an approach, or mentions "grill me".
design-brief
julianoczkowski/designer-skills
Create a design brief through an interactive interview, codebase exploration, and experience design decisions. Saved as a markdown file in the project. Use when user wants to write a design brief, plan a new feature or page, define a UI direction, or mentions "brief".
design-flow
julianoczkowski/designer-skills
Run the full design-to-build workflow as a guided sequence. Orchestrates all designer skills in order, from grilling through review. Use when user wants to go through the complete design process, start a project from scratch, run the full flow, or mentions "design flow" or "full workflow".
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.