DESIGNSKILL AGENT
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:

  1. 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.
  2. 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.
  3. 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 using window.getComputedStyle(), ensuring dynamically generated styles are captured.
  4. 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).
  5. 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: