# /extract-design-md: Reverse-engineer a design system from frontend source

Source: https://trendhub.net/skills/google-labs-code-stitch-skills/extract-design-md
Skill folder: https://github.com/google-labs-code/stitch-skills/tree/main/plugins/stitch-design/skills/extract-design-md
Pack: Stitch Skills (https://trendhub.net/skills/google-labs-code-stitch-skills)
Works with: Codex, Claude Code, Cursor, Any Agent Skills host (selective), OpenCode

extract-design-md reads a codebase's styles directly, without building it, and writes a DESIGN.md describing its atmosphere, colours, type, components and layout. It detects the framework, follows framework-specific extraction notes, names and deduplicates colours by role, and ends with prompt notes so Stitch can generate screens in the same style.

## When to use it

- You want to document an app's visual language before redesigning it.
- The app will not build, but you still need its tokens and patterns.
- You plan to move an existing product's look into Stitch.

## How it works

1. **Discover the stack**: The agent reads package.json and looks for Tailwind, PostCSS, CSS-in-JS and token files, then loads the guidance for React, Vue, Svelte, Angular or plain CSS.
2. **Extract each dimension**: It works through atmosphere, colour roles, typography, key components and layout, describing intent rather than dumping properties.
3. **Name and consolidate**: It gives each colour a descriptive name, hex value and role, and merges near-duplicates.
4. **Write DESIGN.md**: It writes .stitch/DESIGN.md with the required YAML front matter and six sections, ending with Stitch generation notes and sample prompts.
5. **Optionally push to Stitch**: If you want, it hands the file to manage-design-system to create the design system in Stitch.

## What it steers the agent away from

- Listing raw CSS values without the intent behind them
- Keeping near-identical colours as separate tokens
- Omitting the YAML block other skills parse

## What it can touch

Reads frontend source, configs and stylesheets and writes .stitch/DESIGN.md; it needs no build and only calls Stitch if you continue to the integration step.

## Pairs well with

- `/code-to-design`
- `/manage-design-system`
- `/design-md`

## Questions

### How is it different from design-md?

design-md works from screens already in a Stitch project, while this skill reads your source code directly.

### Does it need Stitch?

Not for the document itself. Stitch is only needed if you push the resulting design system into a project.
