design-dna

Extract design tokens, style, and visual effects from reference UIs into structured JSON profiles.

1|Updated Jul 19, 2026
One-click install
npx skills add https://github.com/leobbaroni/maestro --skill design-dna-leobbaroni
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: design-dna
Source: https://github.com/leobbaroni/maestro/tree/main/skills/maestro/library/design-dna
Command: npx skills add https://github.com/leobbaroni/maestro --skill design-dna-leobbaroni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sharp, and includes scripts (resource) and references (resource) components.

What problem does it solve? Recreating the look and feel of an existing UI usually relies on eyeballing colors and guessing typography, which produces inaccurate results. This Skill turns reference screenshots, images, or URLs into a complete, measurable Design DNA JSON profile and can generate new designs from that profile with verifiable color fidelity. ## Core Features & Use Cases - Three-dimension schema: Captures design system tokens (color, typography, spacing, layout, shape, elevation, motion, components), qualitative design style (mood, composition, brand voice), and visual effects (Canvas, WebGL, 3D, particles, shaders, scroll effects) in one JSON profile. - Deterministic color measurement: Clusters reference image pixels with k-means and perceptual ΔE merging to produce exact hex values with coverage fractions, instead of estimating colors by eye. - Generation with verification: Builds self-contained HTML/CSS/JS designs from a DNA profile, then screenshots the result and scores it against the reference with per-color ΔE and coverage drift PASS/FAIL thresholds. - Use Case: Provide a screenshot of a competitor's landing page, receive a full Design DNA JSON, then generate a new landing page in the same style and verify the palette matches within ΔE thresholds. ## Quick Start Analyze this screenshot of a reference website and extract its full design DNA into a JSON profile, then generate a landing page in the same style.

Frequently Asked Questions about design-dna

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract design tokens from a website screenshot?▼

Provide the screenshot as a reference and the skill runs a deterministic k-means color measurement script over the pixels, then analyzes typography, spacing, layout, shape, and elevation visually. The result is a complete Design DNA JSON with exact hex values and coverage fractions.

How to generate a web page that matches a reference design?▼

First extract a Design DNA JSON from the reference, then provide it with your content for generation. The skill maps tokens to CSS custom properties, implements visual effects per the profile, and outputs a self-contained HTML file.

Why should colors be measured instead of estimated from screenshots?▼

Colors perceived by eye drift toward familiar palette defaults, often by a ΔE of 10 or more. The measure-colors.mjs script clusters actual pixels with k-means and merges near-duplicates perceptually, producing exact hex values with coverage evidence.

How is color accuracy of a generated design verified?▼

The verify.mjs script re-measures a screenshot of the generated output and scores it against the reference DNA palette. It reports per-color ΔE and coverage drift, passing when mean ΔE is at most 5, max ΔE at most 20, and coverage drift at most 0.35.

What visual effects can the Design DNA schema capture?▼

The visual_effects dimension covers particle systems, 3D elements, custom GLSL shaders, scroll and parallax effects, text animations, cursor effects, glassmorphism, canvas drawings, and SVG animations. Each effect records its technology, parameters, and an enabled flag.

What dependencies are required to run the color measurement scripts?▼

The scripts require Node.js 18.17 or later and the sharp image processing library, installed via npm in the scripts directory. Sharp's platform-specific binaries are not vendored, so install them in a scratch directory rather than the skill folder.