/moai-domain-design-dna
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
Claude Code
$ npx -y skills add modu-ai/moai-adk --skill moai-domain-design-dna --agent claude-code
Codex
$ npx skills add modu-ai/moai-adk --skill moai-domain-design-dna -a codex -y
Cursor
$ npx skills add modu-ai/moai-adk --skill moai-domain-design-dna -a cursor -y
Gemini CLI
$ npx skills add modu-ai/moai-adk --skill moai-domain-design-dna -a gemini-cli -y
GitHub Copilot
$ npx skills add modu-ai/moai-adk --skill moai-domain-design-dna -a github-copilot -y
OpenCode
$ npx skills add modu-ai/moai-adk --skill moai-domain-design-dna -a opencode -y
Windsurf
$ npx skills add modu-ai/moai-adk --skill moai-domain-design-dna -a windsurf -y
SKILL.md
moai-domain-design-dna.SKILL.mdname: moai-domain-design-dna
description: >
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.
when_to_use: >
Use when someone points at an existing design and wants its look captured or
reproduced — "build this in the same style as this screenshot", "extract the
design tokens from this site", "make a page that feels like this reference" —
or when a Design DNA JSON already exists and a new artifact must be generated
from it. Not for report rendering (moai-domain-html-report), static diagrams
(moai-domain-svg-infographic), or charts (dataviz).
license: Apache-2.0
compatibility: Designed for Claude Code
allowed-tools: Read, Write, Edit, Grep, Glob, WebFetch, Bash
user-invocable: true
metadata:
version: "1.0.0"
category: domain
status: active
related-skills: moai-ref-ui-polish, moai-domain-html-report, moai-domain-svg-infographic
Design DNA
Most "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-dna` skill. See > `.claude/rules/moai/NOTICE.md` for the retained copyright notice.
The three dimensions
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`.
Phase 1 — Structure
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.
Phase 2 — Analyze (reference → DNA JSON)
Read `references/dna-schema.md` first, then work reference by reference.
- **Image or screenshot** → read it directly and analyse its visual properties.
- **URL** → fetch the page. Prefer the source: `<canvas>` elements, WebGL
contexts, animation-library imports, custom shaders, `IntersectionObserver` scroll triggers, and SVG `<animate>` are *stated* facts, where a screenshot only supports inference.
- **Video or interaction capture** → the only reliable source for motion
timings, scroll choreography, and transition personality.
Extraction rules
1. **Colour roles are assigned by dominance, not by hue.** Primary is the colour holding the most area, secondary the supporting surface, accent whatever carries the calls to action. Map the neutral scale as an ordered ramp from the lightest background to the darkest text. 2. **Measure radius relatively.** Record it against the element height that carries it — an absolute `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. 3. **Infer type scale from ratios**, not from absolute sizes. Heading-to-body ratio and line-height rhythm transfer across viewports; pixel sizes do not. 4. **Density is proximity.** Judge spacing from element gaps relative to the base unit, and section rhythm from whether those gaps stay constant or escalate between sections. 5. **When references conflict, record the dominant pattern and name the variant.** Averaging two references produces a design neither of them has. 6. **Fill every field.** An empty string is indistinguishable from "not looked at". Where the reference genuinely does not exercise a field, say so in the value — an explicit "not observed" is data; a blank is a gap. 7. **Effects absent from the reference get `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. 8. **What cannot be identified goes in `composite_notes`.** A screenshot shows that a surface glows without showing how. Describing
Read more
name: moai-domain-design-dna description: > 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. when_to_use: > Use when someone points at an existing design and wants its look captured or reproduced — "build this in the same style as this screenshot", "extract the design tokens from this site", "make a page that feels like this reference" — or when a Design DNA JSON already exists and a new artifact must be generated from it. Not for report rendering (moai-domain-html-report), static diagrams (moai-domain-svg-infographic), or charts (dataviz). license: Apache-2.0 compatibility: Designed for Claude Code allowed-tools: Read, Write, Edit, Grep, Glob, WebFetch, Bash user-invocable: true metadata: version: "1.0.0" category: domain status: active related-skills: moai-ref-ui-polish, moai-domain-html-report, moai-domain-svg-infographic
Design DNA
Most "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-dna` skill. See > `.claude/rules/moai/NOTICE.md` for the retained copyright notice.
The three dimensions
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`.
Phase 1 — Structure
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.
Phase 2 — Analyze (reference → DNA JSON)
Read `references/dna-schema.md` first, then work reference by reference.
- **Image or screenshot** → read it directly and analyse its visual properties.
- **URL** → fetch the page. Prefer the source: `<canvas>` elements, WebGL
contexts, animation-library imports, custom shaders, `IntersectionObserver` scroll triggers, and SVG `<animate>` are *stated* facts, where a screenshot only supports inference.
- **Video or interaction capture** → the only reliable source for motion
timings, scroll choreography, and transition personality.
Extraction rules
1. **Colour roles are assigned by dominance, not by hue.** Primary is the colour holding the most area, secondary the supporting surface, accent whatever carries the calls to action. Map the neutral scale as an ordered ramp from the lightest background to the darkest text. 2. **Measure radius relatively.** Record it against the element height that carries it — an absolute `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. 3. **Infer type scale from ratios**, not from absolute sizes. Heading-to-body ratio and line-height rhythm transfer across viewports; pixel sizes do not. 4. **Density is proximity.** Judge spacing from element gaps relative to the base unit, and section rhythm from whether those gaps stay constant or escalate between sections. 5. **When references conflict, record the dominant pattern and name the variant.** Averaging two references produces a design neither of them has. 6. **Fill every field.** An empty string is indistinguishable from "not looked at". Where the reference genuinely does not exercise a field, say so in the value — an explicit "not observed" is data; a blank is a gap. 7. **Effects absent from the reference get `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. 8. **What cannot be identified goes in `composite_notes`.** A screenshot shows that a surface glows without showing how. Describing
Agentic development harness for Claude Code — SPEC-driven plan/run/sync, TRUST 5 quality gates, model+effort routing, and Claude×GLM multi-LLM cost control. Single Go binary, 16 languages, zero deps.
Other skills on moai-adk.
More skills from other plugins.
agentmail
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
adr-create
Create a new Architecture Decision Record with sequential numbering and AgentDB registration
Questions about moai-domain-design-dna.
- Which coding agents can use moai-domain-design-dna?
- moai-domain-design-dna installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

