TUTORIAL GUIDE
How to Extract CSS Design Tokens from Any Website
Quick Answer: To extract CSS design tokens from a website, open the DesignSkill Agent dashboard, paste your target URL, and click "Launch Scraper". The automated pipeline loads the page in a headless browser, extracts computed DOM style values, applies Google Gemini AI to categorize the typography and color variables, and bundles them into a downloadable ZIP package containing CSS custom properties, JSON tokens, and a
SKILL.md design system specification.
Step-by-Step Style Extraction Workflow
Follow these five steps to scrape design systems and style properties from any live URL:
-
Step 1: Obtain a Request Key
Before running extractions, navigate to the Request Key page and sign up for a free developer credentials key. Once approved, you will be allocated scraping credits. -
Step 2: Enter the Target URL
Open the Agent Dashboard, enter the canonical URL of the site you want to inspect (e.g.,https://example.com), and submit the request. -
Step 3: Automated Computed DOM Extraction
The system spins up a headless Puppeteer browser to load the page. Rather than copying static CSS files, it reads the live computed DOM values usingwindow.getComputedStyle(), ensuring dynamically generated styles are captured. -
Step 4: AI Semantic Enrichment
Our backend feeds the computed values to Google Gemini AI. The AI groups typography scales (weight, line-height, letter-spacing) and identifies semantic roles for color hex codes (e.g. mapping primary, accent-hover, and card-bg tokens). -
Step 5: Export the Design Skill Pack
Once complete, download the ZIP archive. Extract the folder to access your clean variables, design tokens, and LLM-friendly documentation.
Supported Export Outputs
The extracted design system ZIP bundle contains the following structured artifacts:
1. CSS Custom Properties (variables.css)
A CSS stylesheet containing variables mapped to the :root element, ready to drop into any stylesheet:
:root {
--color-primary: #0f172a;
--color-accent: #0b57d0;
--font-family-sans: 'Inter', sans-serif;
--font-size-base: 1rem;
--line-height-relaxed: 1.6;
}
2. Design Tokens JSON (tokens.json)
A structured JSON file format fully compatible with Style Dictionary, ready for multi-platform token translation.
3. Agent Design Specification (SKILL.md)
A dense, machine-readable specification designed to feed CSS and styling rules directly into AI coding subagents and IDE utilities.
Capabilities and Scraping Limitations
To ensure high performance and compliance, the scraper runs under the following parameters:
- Public URLs Only: The cloud scraper cannot access local development URLs or pages protected by logins, auth walls, or cookie sessions.
- Wait Time Limit: Headless page loads are capped at 30 seconds. Sites with slow dynamic renders may fail to resolve completely.
- Quota Budgets: Unauthenticated public scrapes are capped at 50 requests daily per IP pool. Registered developers bypass this via key authentication.