# Extract a design system

Extracts design primitives (color, type, spacing) from a public website and generates starter token files.

Curated by The Design Project. Adapted from the original skills repo.

## How TDP uses it

Starting a new project: I point it at a reference site (competitor, design I admire, my own existing site) and get back starter tokens. Faster than from scratch, and gives a real baseline to iterate from.

Activation and available tools depend on the host and installed version.

## Your first task

Bring: Reference screens or source styles, target platform, and access to actual implementation values where possible.

Task: Inventory repeated colors, type, spacing, and components; label inferred values separately.

Check: Compare tokens against multiple screens; preserve exceptions until their purpose is understood.

## When to use this workflow

Use extraction to create an evidence-based starting inventory of a product’s visual foundations. It can identify repeated colors, type, spacing, and component patterns, but observation alone does not establish which variations are intentional or which source is authoritative.

## A worked example

For a dashboard exercise, inspect a form, a data view, and a feedback state. Record actual values and their sources, then propose roles such as primary text, secondary text, action background, and section spacing. Keep screenshot-based estimates distinct from values read from implementation styles.

## Decisions and common mistakes

Do not merge every identical value or delete every outlier. A field boundary and a divider can share a color while serving different responsibilities. An unusual card padding may be a deliberate featured layout. Ask the owner to resolve these cases before promoting the inventory into the design system.

## What to hand off

Validate the proposed map on one real screen and compare the result with the source. Deliver the inventory, semantic mapping, unresolved exceptions, and sampling limits. The related extraction guide explains how to turn that first pass into a maintained token source.

## Step-by-step setup

1. Choose one task, provide the relevant files or brief, and define the expected output.
2. Review the source and prerequisites; install the skill or open the original resource.
3. Apply it with current project context.
4. Review the result against the actual requirements.
5. Save approved outputs and record limitations.

```bash
npx skills add thedesignproject/agent-skills -s extract-design-system
```

[Full skill source](https://github.com/thedesignproject/agent-skills/tree/main/skills/extract-design-system)

## Starter request

Extract recurring colors, type styles, and spacing from this reference. Separate observed values from inferred token names and flag inconsistent or uncertain values.

## Use it in a workflow

### Tokens and component context

Starting a new project, rebranding, or making an existing DS usable by AI agents.

1. [Extract a design system](https://designproject.io/resources/skills/extract-design-system/) — Point it at a reference site — your own, a competitor, or one you admire — to extract color, typography, and spacing tokens
2. [Create AI component metadata](https://designproject.io/resources/skills/ai-component-metadata/) — Generate AI-consumable metadata for each component so an agent knows when and how to use it

[Browse all agent skills](https://designproject.io/resources/skills/)

[Original TDP skills repo](https://designproject.io/skills-repo/)

Canonical: https://designproject.io/resources/skills/extract-design-system/

## Keep learning

- [Create AI component metadata](https://designproject.io/resources/skills/ai-component-metadata/)
- [Context OS principles](https://designproject.io/resources/skills/context-principles/)
- [How to write a design.md file: a step-by-step guide](https://designproject.io/resources/guides/write-design-md/)
