Design System Generator
Analyze the user's provided design references (images, screenshots, PDFs, links, text descriptions, or existing code) and generate a comprehensive 3-file design system documentation.
Inputs
Accept ANY combination of:
- Images: Screenshots of UIs, mockups, design tool exports
- PDFs: Brand guidelines, style guides, design specs
- Links: URLs to design system documentation, component libraries, or live websites
- Text descriptions: Written descriptions of the design language
- Existing code: CSS files, theme configs, Tailwind configs, design tokens
If the user provides a link, use WebFetch to retrieve the content. If they provide a file path, read the file.
Output
Generate exactly 3 markdown files in the user's working directory (or a specified path):
- design.md — Token Reference
- design-guidelines.md — Accessibility & Do's/Don'ts
- design-components.md — Component Specs
File Specifications
design.md — Token Reference
# [System Name] Design System — Token Reference
> Always read this file first. For component specs see [design-components.md](design-components.md). For accessibility and do's/don'ts see [design-guidelines.md](design-guidelines.md).
[1-2 sentence intro: design language, core architecture, primary typeface, base spacing unit, platform coverage]
Required sections:
Colors
Group by semantic role using H3 subsections (e.g., ### Accent — Primary, ### Surface & Neutral, ### Semantic/Status).
| Role |
Hex |
Usage |
| primary |
#6442d6 |
High-emphasis fills, text, icons |
| on-primary |
#ffffff |
Text/icons on primary |
Include light/dark hex where detectable.
Typography
Default font family + fallback chain.
| Style |
Size |
Weight |
Line Height |
Spacing |
| Display Large |
57sp |
400 |
64sp |
-0.25sp |
| Body Medium |
14sp |
400 |
20sp |
0.25sp |
List all scale levels (Display, Headline, Title, Body, Label or equivalent).
Shape
| Token |
Radius |
Components |
| Small |
8dp |
Chips, snackbars |
| Medium |
12dp |
Cards |
| Full |
50% |
Buttons, search bars |
Elevation
| Level |
dp |
CSS Shadow |
Usage |
| 0 |
0 |
none |
Base surface |
| 1 |
1 |
0 1px 2px rgb(0 0 0/.3), 0 1px 3px 1px rgb(0 0 0/.15) |
Cards |
Interaction States
| State |
Layer Opacity |
Notes |
| Enabled |
0% |
Resting |
| Hover |
8% |
Cursor over |
| Focus |
10% |
Keyboard focus |
| Pressed |
10% |
Tap/click |
| Disabled |
38% content, 12% container |
Inoperable |
Layout
| Class |
Width |
Panes |
Navigation |
| Compact |
< 600dp |
1 |
Nav bar |
| Medium |
600–839dp |
1–2 |
Nav rail or bar |
| Expanded |
840–1199dp |
1–2 |
Nav rail or drawer |
Motion
Easing curves (CSS cubic-bezier values), duration tokens (short/medium/long), transition types.
Icons
Icon system specs: style, sizes, grid, stroke weight. Omit if not detectable.
Design Tokens
Naming convention format (e.g., md.sys.color.primary).
design-guidelines.md — Accessibility & Do's/Don'ts
# [System Name] Guidelines — Accessibility & Do's/Don'ts
> See [design.md](design.md) for token values. See [design-components.md](design-components.md) for component specs.
Required sections:
Accessibility
- Contrast Requirements: Table with Requirement | Ratio, then Component | 3:1 Against
- Touch Targets: Minimum sizes, spacing rules, density constraints
- Keyboard Navigation: Table with Key | Action
- Assistive Technology: Screen reader rules, labels, roles
Gestures
Table with Gesture | Use (Tap, Double tap, Long press, Scroll, Swipe, Drag, Pinch).
Content Design
Writing rules: tone, capitalization, line length, label constraints.
Do's and Don'ts
Organize by category with H3 subsections: Color, Shape, Elevation, Interaction, Layout, Typography, Motion, Components.
Format:
- Do use primary for the single most important action
- Don't apply primary fill to multiple buttons in a group
design-components.md — Component Specs
# [System Name] Components
> Full specifications for all [N] components. Grouped by workflow.
> For tokens see [design.md](design.md). For rules & accessibility see [design-guidelines.md](design-guidelines.md).
Find ALL components detectable from the provided references. Do not limit to a fixed list.
Organize by workflow category using H2 headings:
Actions
Input
Navigation
Containment
Data Display
Feedback
Each component as an H3 section:
### Button
**Types:** Filled (primary) > Tonal (secondary) > Elevated > Outlined > Text.
Height 40dp. Target 48dp. Label: 14sp/500. Sentence case.
| Property | Value |
|---|---|
| Contrast | 4.5:1 text, 3:1 icons/borders |
| States | Rest, Hover, Pressed, Focus, Disabled |
| Touch target | 48x48dp min |
**Do:** Use sentence case; keep labels concise (1-3 words).
**Don't:** Use "Click here"; end with punctuation.
---
Typical components to cover:
- Actions: Button, Icon Button, FAB, Toolbar, Link
- Input: Text Field, Checkbox, Radio, Switch, Slider, Dropdown/Select, Combobox, Picker, Textarea
- Navigation: Navigation Bar/Rail/Drawer, Tabs, Breadcrumb, Menu, Search, App Bar
- Containment: Card, Dialog, Bottom Sheet, Drawer, Popover, Accordion, Divider
- Data Display: Avatar, Badge, List, Carousel, Icon, Image, Tag/Chip, Skeleton, Tooltip
- Feedback: Progress Indicator, Spinner, Snackbar/Toast, Message Bar
General Rules
- Be specific: measurements in dp/sp/px, hex colors, CSS box-shadow values
- If a value cannot be determined from references, make a reasonable inference based on the design language and note it with "(inferred)"
- Use tables over prose — keep scannable
- Aim for 150–400 lines per file
- Each file must cross-reference the other two in its opening blockquote
- Separate components with horizontal rules (
---)
- Use consistent markdown formatting throughout
Workflow
- Gather all reference materials from the user (read files, fetch URLs)
- Analyze the design language: identify colors, typography, spacing patterns, component inventory
- Generate all 3 files
- Write each file to the specified directory
- Summarize what was generated: system name, token count, component count
1---2name: design-system3description: Generate a complete design system (design.md, design-guidelines.md, design-components.md) from any reference materials — images, PDFs, links, or descriptions.4---56# Design System Generator78Analyze the user's provided design references (images, screenshots, PDFs, links, text descriptions, or existing code) and generate a comprehensive 3-file design system documentation.910## Inputs1112Accept ANY combination of:13- **Images**: Screenshots of UIs, mockups, design tool exports14- **PDFs**: Brand guidelines, style guides, design specs15- **Links**: URLs to design system documentation, component libraries, or live websites16- **Text descriptions**: Written descriptions of the design language17- **Existing code**: CSS files, theme configs, Tailwind configs, design tokens1819If the user provides a link, use WebFetch to retrieve the content. If they provide a file path, read the file.2021## Output2223Generate exactly 3 markdown files in the user's working directory (or a specified path):24251. **design.md** — Token Reference262. **design-guidelines.md** — Accessibility & Do's/Don'ts273. **design-components.md** — Component Specs2829## File Specifications3031### design.md — Token Reference3233```markdown34# [System Name] Design System — Token Reference3536> Always read this file first. For component specs see [design-components.md](design-components.md). For accessibility and do's/don'ts see [design-guidelines.md](design-guidelines.md).3738[1-2 sentence intro: design language, core architecture, primary typeface, base spacing unit, platform coverage]39```4041**Required sections:**4243#### Colors44Group by semantic role using H3 subsections (e.g., ### Accent — Primary, ### Surface & Neutral, ### Semantic/Status).4546| Role | Hex | Usage |47|------|-----|-------|48| primary | `#6442d6` | High-emphasis fills, text, icons |49| on-primary | `#ffffff` | Text/icons on primary |5051Include light/dark hex where detectable.5253#### Typography54Default font family + fallback chain.5556| Style | Size | Weight | Line Height | Spacing |57|-------|------|--------|-------------|---------|58| Display Large | 57sp | 400 | 64sp | -0.25sp |59| Body Medium | 14sp | 400 | 20sp | 0.25sp |6061List all scale levels (Display, Headline, Title, Body, Label or equivalent).6263#### Shape6465| Token | Radius | Components |66|-------|--------|------------|67| Small | 8dp | Chips, snackbars |68| Medium | 12dp | Cards |69| Full | 50% | Buttons, search bars |7071#### Elevation7273| Level | dp | CSS Shadow | Usage |74|-------|-----|-----------|-------|75| 0 | 0 | none | Base surface |76| 1 | 1 | `0 1px 2px rgb(0 0 0/.3), 0 1px 3px 1px rgb(0 0 0/.15)` | Cards |7778#### Interaction States7980| State | Layer Opacity | Notes |81|-------|-------------|-------|82| Enabled | 0% | Resting |83| Hover | 8% | Cursor over |84| Focus | 10% | Keyboard focus |85| Pressed | 10% | Tap/click |86| Disabled | 38% content, 12% container | Inoperable |8788#### Layout8990| Class | Width | Panes | Navigation |91|-------|-------|-------|------------|92| Compact | < 600dp | 1 | Nav bar |93| Medium | 600–839dp | 1–2 | Nav rail or bar |94| Expanded | 840–1199dp | 1–2 | Nav rail or drawer |9596#### Motion97Easing curves (CSS cubic-bezier values), duration tokens (short/medium/long), transition types.9899#### Icons100Icon system specs: style, sizes, grid, stroke weight. Omit if not detectable.101102#### Design Tokens103Naming convention format (e.g., `md.sys.color.primary`).104105---106107### design-guidelines.md — Accessibility & Do's/Don'ts108109```markdown110# [System Name] Guidelines — Accessibility & Do's/Don'ts111112> See [design.md](design.md) for token values. See [design-components.md](design-components.md) for component specs.113```114115**Required sections:**116117#### Accessibility118- **Contrast Requirements**: Table with Requirement | Ratio, then Component | 3:1 Against119- **Touch Targets**: Minimum sizes, spacing rules, density constraints120- **Keyboard Navigation**: Table with Key | Action121- **Assistive Technology**: Screen reader rules, labels, roles122123#### Gestures124Table with Gesture | Use (Tap, Double tap, Long press, Scroll, Swipe, Drag, Pinch).125126#### Content Design127Writing rules: tone, capitalization, line length, label constraints.128129#### Do's and Don'ts130Organize by category with H3 subsections: Color, Shape, Elevation, Interaction, Layout, Typography, Motion, Components.131132Format:133- **Do** use primary for the single most important action134- **Don't** apply primary fill to multiple buttons in a group135136---137138### design-components.md — Component Specs139140```markdown141# [System Name] Components142143> Full specifications for all [N] components. Grouped by workflow.144> For tokens see [design.md](design.md). For rules & accessibility see [design-guidelines.md](design-guidelines.md).145```146147**Find ALL components** detectable from the provided references. Do not limit to a fixed list.148149**Organize by workflow category using H2 headings:**150- ## Actions151- ## Input152- ## Navigation153- ## Containment154- ## Data Display155- ## Feedback156157**Each component as an H3 section:**158159```markdown160### Button161162**Types:** Filled (primary) > Tonal (secondary) > Elevated > Outlined > Text.163Height 40dp. Target 48dp. Label: 14sp/500. Sentence case.164165| Property | Value |166|---|---|167| Contrast | 4.5:1 text, 3:1 icons/borders |168| States | Rest, Hover, Pressed, Focus, Disabled |169| Touch target | 48x48dp min |170171**Do:** Use sentence case; keep labels concise (1-3 words).172**Don't:** Use "Click here"; end with punctuation.173174---175```176177**Typical components to cover:**178- **Actions:** Button, Icon Button, FAB, Toolbar, Link179- **Input:** Text Field, Checkbox, Radio, Switch, Slider, Dropdown/Select, Combobox, Picker, Textarea180- **Navigation:** Navigation Bar/Rail/Drawer, Tabs, Breadcrumb, Menu, Search, App Bar181- **Containment:** Card, Dialog, Bottom Sheet, Drawer, Popover, Accordion, Divider182- **Data Display:** Avatar, Badge, List, Carousel, Icon, Image, Tag/Chip, Skeleton, Tooltip183- **Feedback:** Progress Indicator, Spinner, Snackbar/Toast, Message Bar184185## General Rules186187- Be specific: measurements in dp/sp/px, hex colors, CSS box-shadow values188- If a value cannot be determined from references, make a reasonable inference based on the design language and note it with "(inferred)"189- Use tables over prose — keep scannable190- Aim for 150–400 lines per file191- Each file must cross-reference the other two in its opening blockquote192- Separate components with horizontal rules (`---`)193- Use consistent markdown formatting throughout194195## Workflow1961971. Gather all reference materials from the user (read files, fetch URLs)1982. Analyze the design language: identify colors, typography, spacing patterns, component inventory1993. Generate all 3 files2004. Write each file to the specified directory2015. Summarize what was generated: system name, token count, component count