Image DNA
Turn references into a structured profile a downstream model can execute, rather than
a vibe you carry in your head. The deliverable is the profile (or a composed token set),
not one finished asset — gfx-prompt, image-handoff, image-request and forgegui
consume what this produces.
The core failure this prevents: looking at references, forming an impression, and
generating from the impression. The impression is lossy in a predictable direction —
perceived colour drifts toward familiar palette defaults by a ΔE of 10+, described faces
get sculpted as 3D geometry, one stated light source silently becomes two. Measure and
constrain instead.
1. Pick the schema
The method below is the same for every domain; the field list depends on what the
references are. Read exactly one:
| References are… |
Read |
Also read |
| Renders, GFX character art, stills, thumbnails, key art, VFX shots, product renders |
references/schema-render.md |
references/override-risk-render.md — always, for render work |
| A full web page / landing page / marketing site |
references/schema-web.md |
references/generate-web.md when a Phase-3 build follows |
| A UI surface, HUD, dashboard, component, button set, frame, icon set |
references/schema-ui.md |
— |
| A mix (e.g. a site plus its hero render) |
the closest schema per reference |
note the split in the profile header |
references/profile-template.md is the fill-in skeleton for the output. Copy its shape;
don't invent a fresh structure per run.
2. Extract — references in, profile out
- Reference table first. One row per reference: an id or signature, what it is, its
dominant palette in words. A profile whose references can't be named one by one can't
be audited later, and every rule under it becomes unfalsifiable.
- Measure the palette — do not estimate hex by eye. For every reference that exists
as an image file, run the deterministic measurement. Resolve
SKILL_ROOT to the
absolute directory holding this SKILL.md; never assume the current project directory
contains scripts/. Use absolute paths and one uniquely named output per reference:npm install --prefix "$SKILL_ROOT/scripts" --silent # first run only; pulls sharp
node "$SKILL_ROOT/scripts/measure-colors.mjs" "$REF_IMAGE" > "$MEASURE_JSON"
The output gives exact hexes with coverage (a 0–1 fraction) and a role
(background / text / accent / unassigned). Use those hexes verbatim in the
profile's palette block, mapped by role. Keep the raw measurement config (including
k) in the profile so verify.mjs can reuse the same clustering later. Fall back to
visual sampling only when measurement is impossible — a URL-only reference that can't
be screenshotted.
--k N (2–16, default 8): raise it for a busy reference with many distinct regions,
lower it for a flat two- or three-colour reference.
- Fill every field in the chosen schema, each rule carrying its evidence: the rule in
bold, which references obey it, what breaks when it's violated. "Duotone grade, never
neutral — all 7; a flat neutral grade is the fastest way to look wrong" is usable
downstream. "Cool palette" is not.
- Scope each rule to its evidence: state N, name the family. A rule seen in 7
references is a rule about those 7. When this vault's GFX set grew from 7 to 18, the
rim-light rule turned out to describe one style family, not the medium
(
Knowledge/Design/gfx/style-families.md). A rule written wider than its evidence gets
applied where it doesn't hold, and the failure reads as bad taste rather than bad
sampling.
- Tag every rule
derived or general (see §6). Don't write a hypothesis as settled
fact.
- Render work: order the profile by override risk, most-violated rule first. See
references/override-risk-render.md — face-render technique, lighting logic, material
intensity words and edge treatment silently lose to the generation model's own prior
unless stated first and explicitly. Put them at the top of the profile, not mid-paragraph.
- Output the profile in
profile-template.md's shape — every field populated, no
empty strings. Then ask: "Adjust any values before this feeds generation?"
When references conflict, note the dominant pattern and name the variants — don't average
them into mush.
3. Learn — file a handed-over style into the library
References arrive in ClaudeFX/Knowledge/Design/_inbox/ or in chat with a line of context.
Extract a profile, file it under the matching domain, empty the inbox back out. Two steps
in that flow are the ones that actually get skipped:
- Write the reference to
Knowledge/Design/<domain>/refs/ before writing any rule from
it. Every refs/ folder in this library except gfx/ is empty, and the reason is
instructive: the 18 renders behind gfx/style-families.md existed only in the
conversation that produced them, so they can never be re-examined — the vault now holds
two GFX rule-sets that disagree and neither one's evidence can be checked. A rule tagged
derived whose reference isn't on disk is derived in name only. If an image genuinely
can't be saved, say so in the profile header rather than letting the citation imply a
file that isn't there.
- Say what's new versus what merely confirms, and tag each resulting rule derived or
general the way
Knowledge/Design/gfx/README.md does. A reference that only confirms
an existing rule still earns its place — it widens N, which is what lets that rule be
stated at greater width later.
Pick the domain from each folder's own README.md scope line — poses vs animation vs
motion, and brand vs logo/color/typography, are the pairs most often confused.
Filing the first real profile into an empty domain is normal, not a mistake. Domain index:
ClaudeFX/Index/00 - Design MOC.md.
4. Compose — several profiles into one token set
Conflicts are the whole job; if two profiles agree, composing them is concatenation. When
they disagree:
- Wider evidence wins over narrower, and later over earlier when both are equally
sourced. Sample size beats seniority —
style-families.md (18 refs) corrected
visual-dna.md's (7) "rim light is the signature" to family-specific.
- Correct the loser in place; don't leave two parallel truths standing. Two files that
disagree with no cross-reference is how a wrong rule survives — whoever reads only the
older one never learns it was overturned.
- Name what got dropped and why in the composed output. A resolved token set that hides
its own conflicts can't be argued with later.
- A composition targeting one asset type inherits only the rules that apply to it. A
named sub-style is the clean form of this —
gfx/emissive-prop-macro.md is one family's
rules narrowed to a single prop-lit macro shot with its own prompt template.
5. Verify — score the output, don't eyeball it
When the profile carries a measured palette and a generated asset comes back:
- Save the profile JSON to a file if it isn't one already.
- Render or screenshot the generated asset to a PNG.
- Score it:
node "$SKILL_ROOT/scripts/verify.mjs" "$GENERATED_PNG" "$MEASURE_JSON"
(A standalone measure-colors.mjs output works as the reference when that's the only
persisted artifact. For multiple references, verify against each separately.)
- The report gives per-colour ΔE and coverage drift with PASS/FAIL thresholds (mean ΔE
≤ 5, max ΔE ≤ 20, coverage drift ≤ 0.35). On FAIL, fix the offending colours and
re-verify — don't ask the user to judge fidelity by eye.
This only checks colour. Face technique, lighting logic and composition still need a human
look — but colour is the axis where perception drifts most and a number helps most.
6. Provenance
Every rule is derived (traced to a named reference in that domain's refs/, or to a
real regeneration failure) or general (researched or asserted without one — a
hypothesis until a reference confirms it). Tag it; don't write general rules as fact.
Knowledge/Design/gfx/README.md is the worked example of the convention.
Hands off to, doesn't replace
reference-hunt — finds and vets references when they don't exist yet. Run it first,
then this.
gfx-prompt — turns a render profile into a text-to-image prompt.
image-handoff / image-request — generation from the profile (Gemini web / Antigravity
bridge).
forgegui — Roblox GUI + thumbnail assets; supplies the contents of its style-reference
lock, doesn't compete with this.
design-system-spec — authors a formal DESIGN.md token spec with rationale and WCAG
checks for a codebase to consume. Different verb: that one designs a system; this one
reverse-engineers an observed look. Hand a schema-web / schema-ui profile to it as
input when the target is a real DESIGN.md.
Attribution
The scripts/ colour-measurement and verify pipeline is adapted from
zanwei/design-dna (MIT). Full text:
docs/UPSTREAM-LICENSE. The three-dimension web schema in references/schema-web.md and
references/generate-web.md also derives from that project.
1---2name: image-dna3description: Capture a look from references and reuse it instead of describing it from memory. Use the moment reference images, screenshots or style sets enter the conversation, before writing any prompt, render brief, CSS or token spec from them, because the usual failure is glancing at the refs and generating from impression, which drops the one detail that made the style work. Three modes. Extract (references in, structured DNA profile out). Learn (file a handed-over style into the Design library with provenance). Compose (several captured profiles plus a target asset type, conflicts resolved explicitly, one resolved token set out). Covers renders, GFX character art, thumbnails, VFX, logos, packaging, UI and HUD surfaces, button sets and full web-page designs. Triggers on match this reference, make it look like these, extract the style, design tokens from this screenshot, capture the visual DNA, saca el estilo de estas imagenes, que se vea igual que esta referencia, analiza este diseno.4---56# Image DNA78Turn references into a **structured profile** a downstream model can execute, rather than9a vibe you carry in your head. The deliverable is the profile (or a composed token set),10not one finished asset — `gfx-prompt`, `image-handoff`, `image-request` and `forgegui`11consume what this produces.1213The core failure this prevents: looking at references, forming an impression, and14generating from the impression. The impression is lossy in a predictable direction —15perceived colour drifts toward familiar palette defaults by a ΔE of 10+, described faces16get sculpted as 3D geometry, one stated light source silently becomes two. Measure and17constrain instead.1819## 1. Pick the schema2021The method below is the same for every domain; the **field list** depends on what the22references are. Read exactly one:2324| References are… | Read | Also read |25|---|---|---|26| Renders, GFX character art, stills, thumbnails, key art, VFX shots, product renders | `references/schema-render.md` | `references/override-risk-render.md` — always, for render work |27| A full web page / landing page / marketing site | `references/schema-web.md` | `references/generate-web.md` when a Phase-3 build follows |28| A UI surface, HUD, dashboard, component, button set, frame, icon set | `references/schema-ui.md` | — |29| A mix (e.g. a site plus its hero render) | the closest schema per reference | note the split in the profile header |3031`references/profile-template.md` is the fill-in skeleton for the output. Copy its shape;32don't invent a fresh structure per run.3334## 2. Extract — references in, profile out35361. **Reference table first.** One row per reference: an id or signature, what it is, its37 dominant palette in words. A profile whose references can't be named one by one can't38 be audited later, and every rule under it becomes unfalsifiable.392. **Measure the palette — do not estimate hex by eye.** For every reference that exists40 as an image file, run the deterministic measurement. Resolve `SKILL_ROOT` to the41 absolute directory holding this `SKILL.md`; never assume the current project directory42 contains `scripts/`. Use absolute paths and one uniquely named output per reference:43 ```bash44 npm install --prefix "$SKILL_ROOT/scripts" --silent # first run only; pulls sharp45 node "$SKILL_ROOT/scripts/measure-colors.mjs" "$REF_IMAGE" > "$MEASURE_JSON"46 ```47 The output gives exact hexes with `coverage` (a 0–1 fraction) and a `role`48 (`background` / `text` / `accent` / `unassigned`). Use those hexes **verbatim** in the49 profile's palette block, mapped by role. Keep the raw `measurement` config (including50 `k`) in the profile so `verify.mjs` can reuse the same clustering later. Fall back to51 visual sampling only when measurement is impossible — a URL-only reference that can't52 be screenshotted.53 - `--k N` (2–16, default 8): raise it for a busy reference with many distinct regions,54 lower it for a flat two- or three-colour reference.553. **Fill every field in the chosen schema**, each rule carrying its evidence: the rule in56 bold, which references obey it, what breaks when it's violated. *"Duotone grade, never57 neutral — all 7; a flat neutral grade is the fastest way to look wrong"* is usable58 downstream. *"Cool palette"* is not.594. **Scope each rule to its evidence: state N, name the family.** A rule seen in 760 references is a rule about those 7. When this vault's GFX set grew from 7 to 18, the61 rim-light rule turned out to describe one style family, not the medium62 (`Knowledge/Design/gfx/style-families.md`). A rule written wider than its evidence gets63 applied where it doesn't hold, and the failure reads as bad taste rather than bad64 sampling.655. **Tag every rule `derived` or `general`** (see §6). Don't write a hypothesis as settled66 fact.676. **Render work: order the profile by override risk, most-violated rule first.** See68 `references/override-risk-render.md` — face-render technique, lighting logic, material69 intensity words and edge treatment silently lose to the generation model's own prior70 unless stated first and explicitly. Put them at the top of the profile, not mid-paragraph.717. **Output the profile** in `profile-template.md`'s shape — every field populated, no72 empty strings. Then ask: "Adjust any values before this feeds generation?"7374When references conflict, note the dominant pattern and name the variants — don't average75them into mush.7677## 3. Learn — file a handed-over style into the library7879References arrive in `ClaudeFX/Knowledge/Design/_inbox/` or in chat with a line of context.80Extract a profile, file it under the matching domain, empty the inbox back out. Two steps81in that flow are the ones that actually get skipped:82831. **Write the reference to `Knowledge/Design/<domain>/refs/` before writing any rule from84 it.** Every `refs/` folder in this library except `gfx/` is empty, and the reason is85 instructive: the 18 renders behind `gfx/style-families.md` existed only in the86 conversation that produced them, so they can never be re-examined — the vault now holds87 two GFX rule-sets that disagree and neither one's evidence can be checked. A rule tagged88 *derived* whose reference isn't on disk is derived in name only. If an image genuinely89 can't be saved, say so in the profile header rather than letting the citation imply a90 file that isn't there.912. **Say what's new versus what merely confirms**, and tag each resulting rule *derived* or92 *general* the way `Knowledge/Design/gfx/README.md` does. A reference that only confirms93 an existing rule still earns its place — it widens N, which is what lets that rule be94 stated at greater width later.9596Pick the domain from each folder's own `README.md` scope line — `poses` vs `animation` vs97`motion`, and `brand` vs `logo`/`color`/`typography`, are the pairs most often confused.98Filing the first real profile into an empty domain is normal, not a mistake. Domain index:99`ClaudeFX/Index/00 - Design MOC.md`.100101## 4. Compose — several profiles into one token set102103Conflicts are the whole job; if two profiles agree, composing them is concatenation. When104they disagree:105106- **Wider evidence wins over narrower**, and later over earlier when both are equally107 sourced. Sample size beats seniority — `style-families.md` (18 refs) corrected108 `visual-dna.md`'s (7) "rim light is the signature" to family-specific.109- **Correct the loser in place; don't leave two parallel truths standing.** Two files that110 disagree with no cross-reference is how a wrong rule survives — whoever reads only the111 older one never learns it was overturned.112- **Name what got dropped and why** in the composed output. A resolved token set that hides113 its own conflicts can't be argued with later.114- **A composition targeting one asset type inherits only the rules that apply to it.** A115 named sub-style is the clean form of this — `gfx/emissive-prop-macro.md` is one family's116 rules narrowed to a single prop-lit macro shot with its own prompt template.117118## 5. Verify — score the output, don't eyeball it119120When the profile carries a measured palette and a generated asset comes back:1211221. Save the profile JSON to a file if it isn't one already.1232. Render or screenshot the generated asset to a PNG.1243. Score it:125 ```bash126 node "$SKILL_ROOT/scripts/verify.mjs" "$GENERATED_PNG" "$MEASURE_JSON"127 ```128 (A standalone `measure-colors.mjs` output works as the reference when that's the only129 persisted artifact. For multiple references, verify against each separately.)1304. The report gives per-colour ΔE and coverage drift with PASS/FAIL thresholds (mean ΔE131 ≤ 5, max ΔE ≤ 20, coverage drift ≤ 0.35). On FAIL, fix the offending colours and132 re-verify — don't ask the user to judge fidelity by eye.133134This only checks colour. Face technique, lighting logic and composition still need a human135look — but colour is the axis where perception drifts most and a number helps most.136137## 6. Provenance138139Every rule is **derived** (traced to a named reference in that domain's `refs/`, or to a140real regeneration failure) or **general** (researched or asserted without one — a141hypothesis until a reference confirms it). Tag it; don't write *general* rules as fact.142`Knowledge/Design/gfx/README.md` is the worked example of the convention.143144## Hands off to, doesn't replace145146- `reference-hunt` — finds and vets references when they don't exist yet. Run it first,147 then this.148- `gfx-prompt` — turns a render profile into a text-to-image prompt.149- `image-handoff` / `image-request` — generation from the profile (Gemini web / Antigravity150 bridge).151- `forgegui` — Roblox GUI + thumbnail assets; supplies the contents of its style-reference152 lock, doesn't compete with this.153- `design-system-spec` — authors a formal `DESIGN.md` token spec *with rationale and WCAG154 checks* for a codebase to consume. Different verb: that one designs a system; this one155 reverse-engineers an observed look. Hand a `schema-web` / `schema-ui` profile to it as156 input when the target is a real `DESIGN.md`.157158## Attribution159160The `scripts/` colour-measurement and verify pipeline is adapted from161[zanwei/design-dna](https://github.com/zanwei/design-dna) (MIT). Full text:162`docs/UPSTREAM-LICENSE`. The three-dimension web schema in `references/schema-web.md` and163`references/generate-web.md` also derives from that project.