design-tokens

Generate CSS or Tailwind design tokens with light and dark mode palettes.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/yashmishra2006/LexWrite-Website --skill design-tokens-yashmishra2006
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-tokens
Source: https://github.com/yashmishra2006/LexWrite-Website/tree/main/.agents/skills/design-tokens
Command: npx skills add https://github.com/yashmishra2006/LexWrite-Website --skill design-tokens-yashmishra2006

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Starting a new frontend project without a consistent visual system leads to hardcoded colors, inconsistent spacing, and painful dark mode retrofits. This Skill generates a complete design token foundation before any components are built. ## Core Features & Use Cases - Full Token Generation: Produces semantic color, spacing, typography, layout, motion, and breakpoint tokens as CSS custom properties, Tailwind config extensions, or CSS-in-JS theme files. - Dual Theme Support: Always generates both light and dark mode palettes using [data-theme="dark"] selectors and prefers-color-scheme media queries, with intentional dark values rather than simple inversion. - Existing System Awareness: Scans the codebase for existing tokens, Tailwind configs, and theme providers, then extends gaps instead of replacing working systems. - Use Case: Before building components for a new app, ask for tokens based on a design philosophy like Dieter Rams, and receive a tokens.css or updated tailwind.config.js that every subsequent component references. ## Quick Start Set up design tokens for this project based on a Scandinavian aesthetic with light and dark mode support.

Frequently Asked Questions about design-tokens

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up design tokens for a new project?

Run the token generation step before building any components. The process scans for existing CSS variables or Tailwind config, reads your design brief, then writes tokens to tokens.css, globals.css, or a theme file matching your tech stack.

How to generate light and dark mode color palettes in CSS?

Define light tokens on :root and dark overrides under a [data-theme="dark"] selector, plus a prefers-color-scheme media query for system preference. Dark palettes should use intentionally adjusted values, not simple color inversion.

Does this work with Tailwind CSS projects?

Yes. For Tailwind projects the tokens extend tailwind.config.js or tailwind.config.ts and are written to globals.css. It detects Tailwind via package.json dependencies and existing config files before generating anything.

What happens if my project already has design tokens?

Existing tokens are extended rather than replaced. The process identifies gaps such as missing dark mode, incomplete spacing scales, or absent motion tokens, and fills only those gaps while preserving your current values.

When should design tokens be created in a project?

Create tokens after the design brief but before building any components. Every component built afterward should reference these tokens instead of hardcoding color, spacing, or typography values.