Design DNA
Extract visual identity from any reference. Apply it to any content. Reuse it everywhere.
Three phases — use any combination:
- Analyze — screenshots, images, or URLs → Design DNA JSON
- Generate — Design DNA JSON + your content → faithful implementation
- Structure — show the full schema when asked
Read references/schema.md for the full field list.
Read references/generation-guide.md for generation rules.
Activation Boundary
Use this skill only when the user explicitly asks for visual DNA extraction, style analysis, brand/design-system extraction, or generation from an existing Design DNA JSON. Do not activate it for generic UI tasks unless the user supplied references or asked to match a reference.
When URLs or assets are supplied, use the references the user provided or assets already present in the project. Report which references were used. Do not try to judge ownership, sensitivity, or permission to analyze a reference; that is a human decision. Ask only when the reference itself is ambiguous, unavailable, or requires credentials you do not have.
The Three Dimensions
| Dimension |
What it captures |
| design_system |
Measurable tokens: colour, typography, spacing, layout, shape, elevation, motion, components |
| design_style |
Qualitative feel: mood, visual language, composition, brand voice, interaction personality |
| visual_effects |
Special rendering: Canvas, WebGL, particles, shaders, scroll effects, SVG animation |
Phase 1: Analyze
When the user provides screenshots, images, or URLs:
- Read
references/schema.md — know every field before starting
- For each reference: analyze or fetch and analyze
- Fill every field — no empty strings, no guesswork flagged as guesswork
- When references conflict: note the dominant pattern, mention variants
- Output complete Design DNA JSON
- Ask: "Want to adjust any values before generating?"
Key extraction rules:
- Colour: sample dominant palette by area. Primary = largest area, accent = CTA usage
- Typography: identify font class visually (geometric, humanist, serif). Estimate scale ratios from heading/body relationships
- Spacing: assess density by element proximity. Measure section rhythm consistency
- Visual effects: scan for Canvas, WebGL, Three.js, GSAP, particles, shaders, custom cursors. Set
enabled: false for anything not present
Phase 2: Generate
When the user provides DNA JSON + content:
- Read
references/generation-guide.md
- Build CSS custom properties from
design_system tokens
- Apply
design_style qualitative fields to subjective decisions
- Implement
visual_effects at the appropriate tech tier (CSS → Canvas → WebGL)
- Fetch real assets from original URLs when possible — don't recreate
- Default output: self-contained HTML with inline CSS/JS
Priority order:
- Colour & typography (80% of visual identity)
- Spacing & layout
- Shape & elevation
- Design style qualitative fields
- Visual effects
- Motion & interaction
Quality check before delivering:
- Does it actually look like the reference?
- Are all design tokens applied (not just some)?
- Is the output self-contained (no external dependencies that could break)?
- Do visual effects degrade gracefully without JS?
The DNA JSON as an Asset
The extracted JSON is the key output — not just the generated UI. Once extracted:
- Commit it to version control
- Share it across teams and projects
- Feed it to any agent for any future generation
- Refine it iteratively
This turns "make it look like that site" into a precise, reproducible spec.
Pair with no-slop-ui
When generating UI from DNA:
- Apply
no-slop-ui rules alongside DNA tokens
- DNA tells you WHAT the design is
no-slop-ui tells you what NOT to do (no AI defaults slipping in)
- Together: faithful to reference, clean execution
1---2name: visual-dna3description: Extract visual identity into reusable Design DNA JSON, then apply it to generate faithful UI from references.4---5# Design DNA67Extract visual identity from any reference. Apply it to any content. Reuse it everywhere.89Three phases — use any combination:10111. **Analyze** — screenshots, images, or URLs → Design DNA JSON122. **Generate** — Design DNA JSON + your content → faithful implementation133. **Structure** — show the full schema when asked1415Read `references/schema.md` for the full field list.16Read `references/generation-guide.md` for generation rules.171819## Activation Boundary2021Use this skill only when the user explicitly asks for visual DNA extraction, style analysis, brand/design-system extraction, or generation from an existing Design DNA JSON. Do not activate it for generic UI tasks unless the user supplied references or asked to match a reference.2223When URLs or assets are supplied, use the references the user provided or assets already present in the project. Report which references were used. Do not try to judge ownership, sensitivity, or permission to analyze a reference; that is a human decision. Ask only when the reference itself is ambiguous, unavailable, or requires credentials you do not have.2425## The Three Dimensions2627| Dimension | What it captures |28|-----------|-----------------|29| **design_system** | Measurable tokens: colour, typography, spacing, layout, shape, elevation, motion, components |30| **design_style** | Qualitative feel: mood, visual language, composition, brand voice, interaction personality |31| **visual_effects** | Special rendering: Canvas, WebGL, particles, shaders, scroll effects, SVG animation |3233## Phase 1: Analyze3435When the user provides screenshots, images, or URLs:36371. Read `references/schema.md` — know every field before starting382. For each reference: analyze or fetch and analyze393. Fill **every field** — no empty strings, no guesswork flagged as guesswork404. When references conflict: note the dominant pattern, mention variants415. Output complete Design DNA JSON426. Ask: "Want to adjust any values before generating?"4344**Key extraction rules:**45- Colour: sample dominant palette by area. Primary = largest area, accent = CTA usage46- Typography: identify font class visually (geometric, humanist, serif). Estimate scale ratios from heading/body relationships47- Spacing: assess density by element proximity. Measure section rhythm consistency48- Visual effects: scan for Canvas, WebGL, Three.js, GSAP, particles, shaders, custom cursors. Set `enabled: false` for anything not present4950## Phase 2: Generate5152When the user provides DNA JSON + content:53541. Read `references/generation-guide.md`552. Build CSS custom properties from `design_system` tokens563. Apply `design_style` qualitative fields to subjective decisions574. Implement `visual_effects` at the appropriate tech tier (CSS → Canvas → WebGL)585. Fetch real assets from original URLs when possible — don't recreate596. Default output: self-contained HTML with inline CSS/JS6061**Priority order:**621. Colour & typography (80% of visual identity)632. Spacing & layout643. Shape & elevation654. Design style qualitative fields665. Visual effects676. Motion & interaction6869**Quality check before delivering:**70- Does it actually look like the reference?71- Are all design tokens applied (not just some)?72- Is the output self-contained (no external dependencies that could break)?73- Do visual effects degrade gracefully without JS?7475## The DNA JSON as an Asset7677The extracted JSON is the key output — not just the generated UI. Once extracted:78- Commit it to version control79- Share it across teams and projects80- Feed it to any agent for any future generation81- Refine it iteratively8283This turns "make it look like that site" into a precise, reproducible spec.8485## Pair with no-slop-ui8687When generating UI from DNA:88- Apply `no-slop-ui` rules alongside DNA tokens89- DNA tells you WHAT the design is90- `no-slop-ui` tells you what NOT to do (no AI defaults slipping in)91- Together: faithful to reference, clean execution