agentleFS
ManojDevHub1ManojDevHub1/visual-engineering-suite/skills/design-system-extraction/SKILL.md

design-system-extraction

Skill1 starsChanged 26 days agoMITView on GitHub

Identify design tokens and recurring visual patterns from mockups or screenshots, extract candidate colors, typography, spacing, radii, and shadows, and map them to the host project's existing design system.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to extract reusable design tokens and recurring UI patterns from visual references, and harmonize them with the target …

    line 9
  2. Distinctive:

    Sprawl Prevention: Avoid generating one-off arbitrary values or duplicate variables.

    line 15
  3. Distinctive:

    Run the token discovery script to locate Tailwind configs and CSS variables:

    line 23
  4. Distinctive:

    Follow the Token Mapping Guide:

    line 29
  5. Very specific:

    If Tailwind CSS is present: Map colors to Tailwind classes (e.g.

    line 36
  6. Very specific:

    If CSS Variables are present: Map properties to var(--primary), var(--background), var(--radius).

    line 37
  7. Distinctive:

    If no system exists: Define a consolidated set of CSS variables in the project's root stylesheet.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design System Extraction Skill

Use this skill to extract reusable design tokens and recurring UI patterns from visual references, and harmonize them with the target codebase's existing styling system.

Core Responsibilities

  1. Token Discovery: Extract candidate colors, spacing, typography scales, radii, and shadows.
  2. System Harmonization: Inspect the host repository using inspect-tokens.js to reuse existing Tailwind configurations or CSS custom properties.
  3. Sprawl Prevention: Avoid generating one-off arbitrary values or duplicate variables.
  4. Structured Token Spec: Output tokens adhering to token-schema.json.

Step-by-Step Procedure

1. Scan Host Codebase for Existing Tokens

Run the token discovery script to locate Tailwind configs and CSS variables:

node skills/design-system-extraction/scripts/inspect-tokens.js [path-to-workspace]

2. Extract Candidate Tokens

Follow the Token Mapping Guide:

  • Colors: Isolate primary brand, secondary, neutral surfaces, text contrasts, borders, and status cues.
  • Spacing: Align observed paddings and margins to a 4px or 8px grid (4, 8, 12, 16, 24, 32, 48px).
  • Typography: Record font families, size ladder, line heights, and weights.
  • Radii & Shadows: Record surface corner roundings and elevation depths.

3. Reconcile with Host Design System

  • If Tailwind CSS is present: Map colors to Tailwind classes (e.g. bg-slate-900, text-blue-600) or extend tailwind.config.js theme tokens cleanly.
  • If CSS Variables are present: Map properties to var(--primary), var(--background), var(--radius).
  • If no system exists: Define a consolidated set of CSS variables in the project's root stylesheet.

4. Output Design Token Specification

Format the extracted tokens into a clear specification matching token-schema.json for consumption by frontend-implementation.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.