design-token-extractor

Extracts design tokens from CSS, SCSS, JavaScript, and Tailwind config files into CSS custom properties, Tailwind config, and Style Dictionary JSON.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/rp4ri/pi-studios --skill design-token-extractor-rp4ri
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-token-extractor
Source: https://github.com/rp4ri/pi-studios/tree/main/design-studio/skills/design-token-extractor
Command: npx skills add https://github.com/rp4ri/pi-studios --skill design-token-extractor-rp4ri

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the extraction of design tokens from CSS, SCSS, JavaScript, or Tailwind config files, streamlining the process of documenting, migrating, and auditing design systems.

Core Features & Use Cases

  • Token Extraction: Scan and extract tokens from various code formats.
  • Categorization: Organize tokens by type (color, spacing, typography, etc.).
  • Coverage Audit: Detect hardcoded values and identify gaps in token usage.
  • Output Formatting: Provide tokens in CSS custom properties, Tailwind config, and Style Dictionary JSON formats.
  • Use Case: Ideal for designers and developers who need to maintain consistency across design systems and ensure that all design elements are tokenized.

Quick Start

Run the design-token-extractor skill on your project to automatically extract and document your design tokens.

Frequently Asked Questions about design-token-extractor

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

FAQPage Schema
How do I extract design tokens from CSS and Tailwind config files?

You can extract design tokens from SCSS and JavaScript by running this Skill to parse code files and identify hardcoded values. It audits token coverage across your stylesheets and scripts, isolating raw values and converting them into structured categories for your design system.

What is the best way to audit hardcoded values in a design system?

The best way to audit hardcoded values in a design system is to use an automated extraction tool that scans your codebase for raw values and identifies gaps in token usage. This process detects un-tokenized styling rules and categorizes them for standardization.

Can I format extracted design tokens as Style Dictionary JSON?

Yes, you can format extracted design tokens as Style Dictionary JSON. This Skill outputs categorized tokens in multiple formats including Style Dictionary JSON, CSS custom properties, and Tailwind config files, ensuring seamless integration with your existing design pipeline.

Does the design token extraction process work with Tailwind config files?

Yes, the design token extraction process works directly with Tailwind config files. It parses your configuration to identify existing design tokens, categorizes them by type, and can output the standardized tokens back into a valid Tailwind config format.

Why identify and categorize design tokens during a design system migration?

Identifying and categorizing design tokens during a design system migration is crucial for maintaining visual consistency. This process organizes raw styling values into structured categories like color and typography, auditing coverage to ensure all design elements are systematically tokenized and documented.