Skip to content

iamnigellee/design.skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

design.skill

A Claude Code skill that extracts design systems from websites or screenshots into reproducible, agent-readable documents. Goes beyond token extraction to capture design identity — the decision-making logic that makes a brand's visual language unique and reproducible.

The Problem

Existing design-system extraction tools produce color palettes, font stacks, and component catalogues. These outputs are structurally identical across brands — swap the hex codes and you can't tell Apple from Linear. An AI agent reading such a document will generate UI that is correct (right colors, right fonts) but not on-brand (wrong feel, wrong decisions for new components).

The Solution

This skill produces a bundle that captures not just what a design system uses, but why and how to extend it:

File Purpose
DESIGN.md 9-section design system document with Design Decision Rules — actionable principles for building new components on-brand
STYLE-REFERENCES.md Design lineage, peer/anti-references, extended component gallery, style vocabulary, cross-medium guides
style-board.html Visual reference board with annotated screenshots of source, peer, and anti-reference sites
preview.html Self-contained HTML demo with extracted design tokens
preview-dark.html Dark-mode variant of the preview
screenshots/ Captured screenshots of all referenced sites

Key Concepts

Design Decision Rules

The core innovation. Tokens tell an agent what values to use. Decision Rules tell it how to think when building something new. Example (from Stripe):

Emphasis: When choosing how to make an element stand out, reduce weight rather than increase it. A weight-300 headline at 56px commands more attention than a bold one because it signals "I don't need to shout."

Color allocation: Purple means interactive. If the element is not clickable, tappable, or selectable, it does not get purple.

An agent reading these rules can build a toast notification, a pricing table, or a settings panel that feels on-brand — even though none of those components exist in the original website.

Genericness Test

Three checks that prevent token-dump outputs:

  1. Palette swap test — Swap all colors mentally. Does the document still read as correct? If yes, the identity layer is missing.
  2. Blind component test — Can an agent build a new component from Section 1 + Section 9 alone? If not, the Decision Rules are too vague.
  3. Twin test — Is your output interchangeable with the Stripe exemplar once you swap names and colors? If yes, something is wrong.

Style Board

A visual HTML reference board showing:

  • Source site screenshot with key characteristic tags
  • Peer reference screenshots with shared DNA (green) and difference (red) tags
  • Anti-reference screenshots showing what the brand is not
  • Style vocabulary for prompting AI design tools

Output Example

stripe/
  DESIGN.md              # 9-section design system + Decision Rules
  STYLE-REFERENCES.md    # Lineage, peers, components, vocabulary
  style-board.html       # Visual reference board
  preview.html           # Light-mode token demo
  preview-dark.html      # Dark-mode token demo
  screenshots/
    source-desktop.png
    peer-clerk.png
    peer-raycast.png
    anti-notion.png
    anti-vercel.png

Installation

git clone https://github.com/iamnigellee/design.skill.git
cd design.skill
./install.sh

This copies the skill to ~/.claude/skills/generating-design-md/ where Claude Code can load it.

Manual Installation

mkdir -p ~/.claude/skills/generating-design-md
cp SKILL.md ~/.claude/skills/generating-design-md/
cp -R reference ~/.claude/skills/generating-design-md/

Usage

In Claude Code, provide a website URL or screenshot and ask for a DESIGN.md:

> Extract the design system from https://stripe.com
> Generate a DESIGN.md from this screenshot [attach image]
> Create the design system docs for linear.app

The skill triggers automatically when you provide a URL or screenshot and ask for design system extraction.

Input Modes

Input Strategy
URL DOM extraction via Chrome DevTools MCP + full-page screenshots
Screenshot Vision-based analysis with approximate token extraction
URL + Screenshot DOM extraction for precise tokens, screenshot as authority for page state

DESIGN.md Structure

The 9 required sections, in order:

  1. Visual Theme & Atmosphere — Interpretive prose + Design Decision Rules
  2. Color Palette & Roles — Semantic colors with functional roles
  3. Typography Rules — Full hierarchy with OpenType features
  4. Component Stylings — Buttons, cards, badges, inputs with state variants
  5. Layout Principles — Spacing, grid, whitespace philosophy
  6. Depth & Elevation — Shadow system with formulas and philosophy
  7. Do's and Don'ts — Brand-specific behavioral guardrails
  8. Responsive Behavior — Breakpoints, collapsing strategy
  9. Agent Prompt Guide — Quick reference, example prompts, iteration rules

STYLE-REFERENCES.md Structure

6 sections for concrete style references:

  1. Design Lineage — Design tradition, historical references, contemporary evolution
  2. Peer References — 3–5 real sites sharing specific design DNA
  3. Anti-References — 2–3 sites representing the opposite approach
  4. Extended Component Gallery — 6–8 new components designed in the brand's style
  5. Style Vocabulary — Keywords for AI design tools (Midjourney, DALL-E, Figma AI)
  6. Cross-Medium Application — How the style adapts to email, presentations, docs, print

Examples

The repo includes two complete examples:

  • Stripereference/example-stripe.md + reference/example-stripe-references.md (the quality benchmark)
  • Linearlinear/DESIGN.md (demonstrates dark-theme extraction)

Chinese Language Support

A parallel Chinese skill is available at zh/SKILL.md. It produces DESIGN.md with Chinese prose while keeping color names, CSS properties, and Agent Prompt Guide examples in English. Install with:

# Copy the Chinese skill
cp zh/SKILL.md ~/.claude/skills/generating-design-md-zh/SKILL.md
cp -R zh/reference ~/.claude/skills/generating-design-md-zh/reference

Requirements

  • Claude Code CLI
  • One of the following for URL-based extraction:
    • Chrome DevTools MCP server (preferred)
    • Playwright MCP server (fallback)
  • Screenshots work without any MCP server (vision-based)

License

MIT

About

Claude Code skill: extract design systems from websites into reproducible DESIGN.md with style identity, visual references, and peer comparison boards

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors