Reverse-engineer a reference design — a screenshot, an image set, or a live URL — into a portable Design DNA JSON across three dimensions (measurable tokens, qualitative style, special-rendering effects), then generate a new self-contained artifact from that JSON. Carries the extraction rules (dominance-based colour roles, relative radius measurement, multi-reference conflict resolution), a performance-tier technology map for Canvas / WebGL / shader / scroll effects, and a delivery gate covering contrast, reduced motion, and animation-loop hygiene.
62
74%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/moai-domain-design-dna/SKILL.mdMost "make it look like this" requests fail the same way: the reference is looked at once, an impression is formed, and the impression is coded from memory. What survives is a vague resemblance — the palette drifts, the rhythm flattens, and the one effect that gave the reference its character is missing entirely.
This skill inserts an artifact between looking and building. The reference is first deconstructed into a Design DNA JSON, and only that JSON is used to generate. The intermediate step is what makes the result checkable: every colour, radius, and easing curve in the output traces to a recorded field, so a mismatch is a diff rather than an argument about taste.
Provenance: the three-dimension taxonomy and several extraction rules are adapted from the MIT-licensed
zanwei/design-dnaskill. See.claude/rules/moai/NOTICE.mdfor the retained copyright notice.
The split matters because the three are extracted differently and fail differently.
| Dimension | What it holds | How it is obtained |
|---|---|---|
design_system | What can be measured — colour hex values, type scale, spacing base unit, radius, elevation, motion timings, component patterns | Sampled and measured from the reference; numeric |
design_style | What can be felt — mood, ornamentation level, composition strategy, whitespace philosophy, interaction personality, microcopy tone | Judged holistically; descriptive words, not numbers |
visual_effects | What cannot be expressed in plain CSS — Canvas scenes, WebGL / 3D, shaders, particle systems, scroll-driven motion, cursor behaviour, glassmorphism | Read from source where available, described from screenshots where not |
Collapsing them loses information in both directions. A token dump with no style dimension reproduces the colours and none of the character; a mood board with no system dimension reproduces the vibe and no two elements align.
Field-by-field schema and enum vocabularies: references/dna-schema.md.
When the request is for the schema itself ("what does a design profile
contain?"), read references/dna-schema.md, present the three dimensions and
their field groups, and ask whether any dimension should be extended or
dropped before extraction begins.
Read references/dna-schema.md first, then work reference by reference.
<canvas> elements, WebGL
contexts, animation-library imports, custom shaders, IntersectionObserver
scroll triggers, and SVG <animate> are stated facts, where a screenshot
only supports inference.12px is meaningless once the button is a
different size, while "half the control height" survives rescaling. The
concentric-radius rule for nested surfaces is moai-ref-ui-polish's; do not
restate it here, apply it there.enabled: false. This is the
non-invention rule, and it is load-bearing: an unset flag invites the
generator to add a particle field nobody asked for.composite_notes. A screenshot shows
that a surface glows without showing how. Describing the observation beats
guessing the implementation and recording the guess as fact.Output the completed JSON, then ask whether any value should be adjusted before generation.
Read references/effects-implementation.md before implementing any
visual_effects entry.
Order matters, because early decisions constrain later ones. Colour and typography together carry most of a design's identity, so they are settled first; effects are layered onto a design that already works without them.
design_style qualitative fields — these guide the judgement calls the
token values do not determinevisual_effectsEmit design_system as CSS custom properties in a single :root block, so
every downstream value has one definition and a token swap is one edit.
Fetch real assets rather than approximating them. When the reference is a URL and the design needs its logo, image, or font, retrieve the actual asset from that source. A recreated approximation is the single most visible difference between a copy and a clone.
Default output is a self-contained file — inline CSS and JS, no build
step — unless a framework was specified. The self-contained convention itself
is documented once in moai-domain-html-report § output; the difference here
is scope: that skill renders a report from markdown, this one generates a
designed artifact from a DNA profile.
Phase 2 can end by saving the completed DNA JSON as a named profile, and
Phase 3 can start from the active profile instead of re-extracting the same
reference: references/diagram-profiles.md documents the mechanism — the
project-root .design-dna/ store, the marker-first active selector, the slug
grammar, schema validation with "not observed" backfill on load, and the
confirm-before-overwrite / verify-by-re-read save path. A project with no
profile marker proceeds exactly as above; persistence adds a save hook and a
start-from option, never a routing change.
Verify before handing over. Each item below has failed in practice.
prefers-reduced-motion: reduce is honoured — not merely detected.enabled flag is false.requestAnimationFrame; setInterval is not an
animation primitive and drifts against the display refresh.fallback_strategy is actually implemented, not just recorded.A first pass that reads thin is usually not a token problem — it is an attention problem, and re-reading the reference beats re-reading the output. Re-attach the same references and audit against them along six axes: hierarchy, ornamentation, typographic rhythm, motion, materiality, and overall interface finish. Merge the conclusions back into the current implementation rather than regenerating from scratch, which discards the parts that were already right.
| Request | Owner |
|---|---|
| Markdown report → HTML | moai-domain-html-report |
| Architecture / flow diagram | moai-domain-svg-infographic |
| Chart, dashboard, or categorical palette | dataviz |
| Component-level finish: concentric radius, optical alignment, hit areas, easing craft | moai-ref-ui-polish |
| Hosted claude.ai visual-identity page | artifact-design |
| Design-system sync with the Claude Design product | manager-design |
This skill owns one thing the others do not: turning an existing reference into a structured profile, and generating from that profile. Where the design is authored from first principles rather than deconstructed, those skills own it.
references/dna-schema.md — the three-dimension field list and enum vocabulariesreferences/diagram-profiles.md — named-profile persistence: the .design-dna/ store, marker-first resolution, slug grammar, load-time validationreferences/effects-implementation.md — performance tiers, technology selection, and per-effect implementation patterns2213871
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.