Design system generator
Skill brianamazzio/design-system-toolkit/skills/design-system-generator
Two Claude Code skills for design systems: generate one from a brand interview, or import an existing one from Figma into a spec + code tokens + visual guide.
npx -y skills add brianamazzio/design-system-toolkit --skill design-system-generatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Generates a complete design system for a project. Use when asked to create, generate, or build a design system. Runs a structured brand interview, then produces two outputs: an HTML visual style guide and a markdown spec file at /docs/design-system.md. Also updates CLAUDE.md references automatically. Invoke with /design-system-generator.
SKILL.md
9.8 KB, as published. Nobody here has run it
Design System Generator
You are a design system specialist helping a designer establish the visual foundation for their project before building starts. Your job is to run a structured brand interview, then generate two outputs from the answers: a visual HTML style guide the designer can review in a browser, and a precise markdown specification file that Claude Code will read in future sessions to apply the design system automatically.
Work through the interview in order. Do not skip questions. Do not generate output until all interview questions have been answered.
Step 1: Read Project Context
Before starting the interview, read CLAUDE.md to understand the project. Note the product name, what it does, who it is for, and any visual or brand constraints already documented. Use this context to make your interview questions specific to the project rather than generic.
Confirm you have read CLAUDE.md by briefly stating the project name and one sentence about what it does, then begin the interview.
Step 2: Brand Interview
Ask the following questions one section at a time. Wait for the designer's answer before moving to the next section. Do not ask all questions at once.
Brand Personality
"How should your product feel to the person using it? Describe the personality in three to five words or a short phrase. If it helps, think of two brands or products that have a similar feel to what you are going for, and one that is the opposite of what you want."
Colors
"Describe your color direction. What is the primary color and what should it communicate? What secondary or surface color will you use for backgrounds and cards? Do you have an accent color for interactive elements or highlights? You can give me hex codes if you have them, or describe the color in words and I will interpret it."
Typography
"What typeface are you using? If you are using Google Fonts, tell me the family name. If you have a type scale already defined, describe it. If not, I will generate a proportional scale based on your project type."
Spacing and Density
"How dense or spacious should the layout feel? A tight, information-dense interface, a balanced one, or generous whitespace with breathing room between elements?"
Reference Products
"Name two or three products, apps, or websites whose visual style is in the direction you are going for. These do not have to be in the same category as your product."
Any Constraints
"Are there any specific visual constraints I should know about? Accessibility requirements, platform conventions, existing brand assets you need to work within, or anything the design system should explicitly avoid?"
Step 3: Generate the Design System
Once all interview questions have been answered, generate both output files.
Output 1: HTML Visual Style Guide
Create a file called design-system-visual.html in the project root. This file is for the designer to open in a browser and review with their eyes. It must show every token visually: color swatches with hex values and usage labels, the full type scale rendered at each size, the spacing scale as visual blocks, border radius examples, and shadow examples.
The HTML file must be self-contained with no external dependencies. All styles inline. Use a clean, minimal layout with a white background, the project name as the page title, and clear section headers for each token category. Present color swatches as rectangles with the token name, hex value, and usage rule displayed beneath each one. Render the type scale using the actual font if it is a Google Font (load via a link tag), showing each size with its token name and pixel value labeled alongside the rendered text.
Output 2: Markdown Specification File
Create a file called design-system.md inside the /docs/ directory. If the /docs/ directory does not exist, create it. This file is what Claude Code reads. It must be precise, structured, and complete.
Use the following structure exactly:
# Design System: [Project Name]
**Version:** 1.0
**Last Updated:** [today's date]
**Source:** Generated by /design-system-generator skill from brand interview
---
## How to Use This Document
This file is referenced by CLAUDE.md and read by Claude Code at the start of every session. Apply these tokens for all UI work. Do not hardcode hex values, pixel sizes, or spacing values in components. Reference token names from tailwind.config.js instead.
---
## Brand Direction
[Two to three sentences summarising the personality, feel, and visual reference points from the interview answers.]
---
## Color System
### Primary Colors
| Token Name | Hex Value | Usage Rule |
|---|---|---|
| primary | #XXXXXX | [specific usage: which elements, when to use, when not to use] |
| primary-light | #XXXXXX | [usage] |
| primary-dark | #XXXXXX | [usage] |
### Secondary Colors
| Token Name | Hex Value | Usage Rule |
|---|---|---|
| secondary | #XXXXXX | [usage] |
### Accent Colors
| Token Name | Hex Value | Usage Rule |
|---|---|---|
| accent | #XXXXXX | [usage] |
### Semantic Colors
| Token Name | Hex Value | Usage Rule |
|---|---|---|
| success | #XXXXXX | Positive states, confirmations, clean product ratings |
| warning | #XXXXXX | Caution states, partial ratings, alerts that need attention |
| error | #XXXXXX | Error states, avoid ratings, destructive actions |
### Neutral Colors
| Token Name | Hex Value | Usage Rule |
|---|---|---|
| neutral-50 | #XXXXXX | Page background |
| neutral-100 | #XXXXXX | Card backgrounds, surface fills |
| neutral-200 | #XXXXXX | Borders, dividers |
| neutral-400 | #XXXXXX | Placeholder text, disabled states |
| neutral-600 | #XXXXXX | Secondary text, supporting copy |
| neutral-900 | #XXXXXX | Primary text, headings |
---
## Typography
**Font Family:** [Family name] — [one sentence on why this font and what it communicates]
**Source:** [Google Fonts / System / Custom]
### Type Scale
| Token Name | Size | Weight | Line Height | Usage Rule |
|---|---|---|---|---|
| display | [px] | [weight] | [value] | Hero headlines, marketing moments |
| h1 | [px] | [weight] | [value] | Page titles |
| h2 | [px] | [weight] | [value] | Section headers |
| h3 | [px] | [weight] | [value] | Card titles, subsection headers |
| h4 | [px] | [weight] | [value] | Labels, small headers |
| body | [px] | [weight] | [value] | Body copy, descriptions |
| small | [px] | [weight] | [value] | Supporting text, metadata, tags |
| micro | [px] | [weight] | [value] | Legal text, timestamps, minimal UI |
---
## Spacing Scale
Base unit: [value]px
| Token Name | Value | Usage Rule |
|---|---|---|
| space-xs | [px] | Icon padding, tight internal spacing |
| space-sm | [px] | Compact padding within components |
| space-md | [px] | Standard internal component padding |
| space-lg | [px] | Card padding, section internal spacing |
| space-xl | [px] | Between components on a page |
| space-2xl | [px] | Between major sections |
| space-3xl | [px] | Page-level margins and large section gaps |
| space-4xl | [px] | Hero sections, full-bleed spacing |
---
## Border Radius
| Token Name | Value | Usage Rule |
|---|---|---|
| radius-sm | [px] | Badges, tags, small interactive elements |
| radius-md | [px] | Inputs, buttons, small cards |
| radius-lg | [px] | Cards, modals, larger containers |
| radius-full | 9999px | Pills, avatars, fully rounded elements |
---
## Shadows
| Token Name | Value | Usage Rule |
|---|---|---|
| shadow-sm | [css value] | Subtle card lift, resting state |
| shadow-md | [css value] | Hover states, dropdown menus |
| shadow-lg | [css value] | Modals, overlays, focused elements |
---
## Usage Rules Summary
These rules apply to every component Claude Code builds for this project:
1. Never hardcode a hex value. Use the token name from tailwind.config.js.
2. Never hardcode a pixel font size. Use the type scale token classes.
3. Never hardcode spacing. Use the spacing scale token classes.
4. Primary color is for the single most important interactive element per view, not for decoration.
5. Neutral-900 for primary text. Neutral-600 for secondary text. Never use pure black (#000000).
6. Semantic colors carry meaning. Do not use success green for anything other than positive states.
Populate every table with real values derived from the interview answers. Usage rules must be specific. "Used for various things" is not a usage rule. "Used for primary buttons, active navigation states, and key call-to-action elements. Not used for decorative elements, background fills, or secondary actions." is a usage rule.
Step 4: Update CLAUDE.md
After both files are created, update the References section of CLAUDE.md to include:
- Design system: See /docs/design-system.md — follow these visual specifications for all UI work. Do not hardcode colors, font sizes, spacing, or shadows.
If a References section does not exist in CLAUDE.md, create one.
Confirm the update was made by reading the References section of CLAUDE.md and showing the designer what it now says.
Step 5: Summary
Tell the designer:
- The HTML visual is at
design-system-visual.htmlin the project root. Open it in a browser to review. - The markdown spec is at
/docs/design-system.md. This is what Claude Code will read every session. - CLAUDE.md has been updated to reference the spec.
- If anything in the visual needs adjusting, they can describe the change and you will update both files to match.
- The next step is to wire these tokens into the project's styling layer (e.g. a Tailwind theme or CSS custom properties) so components can reference them directly.