Agent skill

Design Dna

by ericrisco in ericrisco/rsc-harness

A skill your agent uses when a design has won and its look must survive: codify it into a permanent style skill with measured ratios, bans and tests that can fail, then build new pieces in that…

MITAuto-check passed

Install Design Dna

skills CLI
$ npx skills add ericrisco/rsc-harness --skill design-dna -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ericrisco/rsc-harness design-dna --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/design-dna .claude/skills/design-dna && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
design-dna
GitHub stars
174
Token cost
~3k tokens
SKILL.md length
1,765 words
Files
10 (incl. scripts, references)
Skills in repo
233
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when a design has won and its look must survive: codify it into a permanent style skill with measured ratios, bans and tests that can fail, then build new pieces in that…

  • Works in 10 steps: A specification that cannot fail is not… → Compile, do not paste. Two files,… → Always attach the reference image.… → …
  • A design has won and its look must survive: codify it into a permanent style skill with measured ratios
  • SKILL.md covers The problem this solves, Two modes, Hard rules (these are the skill) and CAPTURE - the seven steps, plus 5 more sections
  • Runs Python scripts from its folder; calls npx

What it does

Design Dna is an agent skill from ericrisco/rsc-harness. Use when a design has won and its look must survive: codify it into a permanent style skill with measured ratios, bans and tests that can fail, then build new pieces in that exact look. Fires on 'turn this into a skill', 'keep the same style', 'my output drifted'. NOT finding the winner (that is design-loop), NOT the words (that is marketing).

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts and reference files (for example `PROMPT.md`, `design-dna.schema.json` and `evals/README.md`).

The repository describes itself as: Your agent invents things because it has no memory, and can't touch your database because it has no arms. rsc is the meta-harness that gives it both, plus the trade to know the… The licence is MIT.

When your agent uses it

  • A design has won and its look must survive: codify it into a permanent style skill with measured ratios
  • Bans and tests that can fail
  • Then build new pieces in that exact look

Example prompts

  • “turn this into a skill”
  • “keep the same style”
  • “my output drifted”
  • “/design-dna”

Requirements

  • Python 3
  • Node.js

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. A specification that cannot fail is not a specification. If every rule you wrote is one a bad output could still satisfy, you wrote a mood…
  2. Compile, do not paste. Two files, always. dna.json is the record, any size, and it never enters a prompt. PROMPT.md is the payload, hard…
  3. Always attach the reference image. Highest-leverage move available and close to free: image conditioning runs on its own pathway, so it…
  4. Ratios, not values. "The headline is 96px" is nearly worthless. "The headline is 8x the body, never under 6x" is the identity.
  5. Coverage, not just colour. The same three hex codes at 60/30/10 and at 90/8/2 are two unrelated designs.
  6. Percentages, not pixels, in everything spatial. One spec has to drive a 1080x1350 carousel and a 1920x1080 slide with no rewrite.
  7. When output looks generic, add a ban, not a rule. A positive instruction is one weak vote against a landslide; "never centre the hero"…
  8. One skill per style. Never merge two identities into one spec. The average of two good designs is a bad design.
  9. Reproduce the system, never the marks. Real logos, wordmarks, licensed photographs and proprietary typefaces go in meta.not_copied with a…
  10. Step 5 is not optional. A spec that has never been used to rebuild its own source has never been tested.

What it can do on your machine

Read from SKILL.md and the folder at commit e3d5b33. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Design Dna loads about 3k tokens when it runs, and up to ~9.1k if it reads all its reference files. Until then it costs about 90 tokens; SKILL.md has 1,765 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ericrisco/rsc-harness at commit e3d5b33, republished under its MIT licence (© ericrisco). 1,765 words, ~3,005 tokens.

Download SKILL.mdSave it as .claude/skills/design-dna/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
design-dna
description
Use when a design has won and its look must survive: codify it into a permanent style skill with measured ratios, bans and tests that can fail, then build new pieces in that exact look. Fires on 'turn this into a skill', 'keep the same style', 'my output drifted'. NOT finding the winner (that is `design-loop`), NOT the words (that is `marketing`).
tags
design, style, dna, codify, skill-factory, consistency
recommends
design-loop, design, nextjs, marketing
origin
risco

Design DNA - one beautiful design into a permanent skill

A design loop finds you one beautiful thing. This turns that one thing into a skill you keep forever, so you can make more of it, in any format, without the look drifting.

Not only about "designs". The subject is anything that got built: a website, a landing page, a poster, a motion graphic, a carousel, a deck. Same system, same file, same tests. The format is an output, not the subject.

The problem this solves

Nobody wrote down why the winner was beautiful. Next time you ask for "the same style" you get something close, then something a bit off, then something generic. Every rule you do not write down, the model has to guess, and it does not guess randomly: it guesses the average of everything it has ever seen. That average is what people call slop. Slop is the sound of an unwritten rule.

Two modes

You sayModeWhat happens
"codify this", "turn this into a skill", here is the winnerCAPTURERun the seven steps below. Output: a new style skill folder.
"build X in <style>", "another one like the last", /<slug>REUSELoad that style's PROMPT.md only, build, then run its self-check before returning.

If a dna.json already exists for the style named, you are in REUSE. Never re-derive a style that has a record.

To find out which records exist — in either scope, without guessing at paths — run npx @ericrisco/rsc doctor --json and read designStartingPoint. A record it reports as unreadable is not a record you can reuse: say what is missing, do not use half of one.

Hard rules (these are the skill)

  1. A specification that cannot fail is not a specification. If every rule you wrote is one a bad output could still satisfy, you wrote a mood board.
  2. Compile, do not paste. Two files, always. dna.json is the record, any size, and it never enters a prompt. PROMPT.md is the payload, hard cap 2KB, and it is the only thing that does.
  3. Always attach the reference image. Highest-leverage move available and close to free: image conditioning runs on its own pathway, so it does not eat the attention your words are competing for.
  4. Ratios, not values. "The headline is 96px" is nearly worthless. "The headline is 8x the body, never under 6x" is the identity.
  5. Coverage, not just colour. The same three hex codes at 60/30/10 and at 90/8/2 are two unrelated designs.
  6. Percentages, not pixels, in everything spatial. One spec has to drive a 1080x1350 carousel and a 1920x1080 slide with no rewrite.
  7. When output looks generic, add a ban, not a rule. A positive instruction is one weak vote against a landslide; "never centre the hero" deletes the landslide from the options. Bans should outnumber positive style rules.
  8. One skill per style. Never merge two identities into one spec. The average of two good designs is a bad design.
  9. Reproduce the system, never the marks. Real logos, wordmarks, licensed photographs and proprietary typefaces go in meta.not_copied with a named substitute.
  10. Step 5 is not optional. A spec that has never been used to rebuild its own source has never been tested.

CAPTURE - the seven steps

Run PROMPT.md as written. It is the operative artefact and it is self-contained; this section is the map, not a second copy of it.

StepNameNon-negotiable output
1ObserveFlat inventory of literal measurements. Sampled hexes, coverage estimates, type counts, largest-to-smallest ratio, margins as percentages, texture, and what is absent. No judgements: interpreting here is how you end up specifying a design that is not the one in front of you.
2DebateLoop A argues exhaustive, Loop B argues nine moves and a wall of refusals, then adjudicate each property with one question: if I changed this value, would it stop looking like the reference? Yes is load-bearing, no is trivia, and trivia dilutes attention. Resolve it by splitting documents, not by compromising.
3Codifydna.json against design-dna.schema.json. Descriptive colour names ("dusty plum", never "accent-500": image and video models cannot read token names). Every family gets a fallback.
4Tests that can fail8 to 12, binary and measurable, each marked auto or human.
5Reconstruct and diffClose the reference. Rebuild it from dna.json alone. Put them side by side and list every difference: each one is a field the spec forgot. Fold them in, record them in reconstruction.gaps_found, go again. Expect two or three passes, and expect the gaps to be things you were sure were obvious.
6Emit the skillThe folder below.
7Declare uncertaintyEvery value inferred rather than measured, and every rule under 70% confidence, into meta.confidence_notes. That is where the style drifts first.
What gets emitted
~/.claude/skills/<slug>/
  SKILL.md          how to use this style, and when not to
  PROMPT.md         the 2KB payload. THIS is what enters a context window
  dna.json          the full record. NEVER pasted into a prompt
  design-dna.schema.json -> validated against the parent copy
  reference/        the original, kept forever
  example/          one worked output, the canonical proof
  scripts/check.py  the auto tests, exits non-zero on failure
The record is the harness's design identity

The folder above makes the style reusable. Writing the record into the harness is what makes it this project's identity rather than a loose folder in a global directory:

  • Write the record as an article under 02-DOCS/wiki/brand/, beside the brand study, and link it from 02-DOCS/wiki/index.md and the root CLAUDE.md ## Brand & voice section — the same convention design follows, and the same place marketing, presentations, brand-voice and content-engine already read.
  • It does not replace the brand study. The study is the judgement and the direction — why this identity, what it refuses. The record is the measurable contract that can fail a test. They share only a few fields; each carries what the other cannot.
  • One harness, one design identity. If a second appears, name the conflict. The average of two good designs is a bad design.
  • A style captured before this convention still works from its folder. To bring it into the harness, write its record as the article above; nothing needs re-deriving.

rsc doctor reports whether this harness has an identity, so the rule is not just prose.

Scaffold from templates/ and validate before you claim it works:

python3 ~/.claude/skills/design-dna/scripts/emit.py <slug>            # scaffold + validate
python3 ~/.claude/skills/<slug>/scripts/check.py <output-file>        # run the auto tests
Show full SKILL.md (700 more words)Show less
PROMPT.md ordering is fixed

Attention is strongest at the two ends and weakest in the middle, so the order is a mechanism, not a style choice:

  1. The reference image, attached and named first
  2. soul.one_line
  3. The weird move, alone, unmissable
  4. The 3-9 signature moves, as ratios
  5. The bans, as absolutes
  6. Palette and type: roles and coverage only, never a full ramp
  7. Archetype names and when to use each
  8. The self-check, last

Nothing else. If it does not change what the output looks like from three metres away, it belongs in dna.json. To add a tenth signature you must delete one.

Last line of every PROMPT.md, verbatim:

Before returning any output, run every test in the self-check. Name each test and its result. If any fails, repair the output and run them again. Never return output with a failing test and a note explaining it away.

REUSE - building with a captured style

  1. Load only that style's PROMPT.md. Attach reference/. Do not read dna.json into context; read it only to answer a specific measured question or to regenerate the payload.
  2. Pick an archetype by name before writing anything. Structure first: unnamed layouts are why piece 8 does not sit beside piece 1 as a set.
  3. Build. For web, hand the build to ../nextjs/SKILL.md and the words to ../marketing/SKILL.md; the identity stays here.
  4. Run the self-check, name each test and its result, repair and re-run on any failure.
  5. If output drifts, do not add a rule. Consult the table below.

When it goes wrong

What you seeCauseFix
Matches every value, still looks genericSignature moves missing, or too manyCut to 3-9, rewrite each as a ratio
Drifts back to the stock AI lookNot enough bansBans should outnumber positive style rules
Piece 1 and piece 8 do not matchNo named layoutsAdd archetypes
The accent reads as a theme, not an accentNo coverage percentagesAdd them
Works on a slide, breaks on a carouselPixel values in the spacingConvert to percentages
Obeys some rules, ignores others, differently each runPayload over the capCut to 2KB
Your best rule keeps getting ignoredIt is buried in the middleMove it to the top or the bottom
Fine, but forgettableNo weird moveFind the one break in the system
Spec feels complete, output is wrongYou skipped Step 5Rebuild the original from the spec. Compare.

Styles captured so far

StyleReads asWeird move
../cold-press/SKILL.mdnewsprint editorial, serif at 8x, one vermilionsection numeral clipped by the right edge
../night-shift/SKILL.mdnear-black instrument panel, one phosphor greenstatus ribbon severed mid-word by the right edge
../soft-optics/SKILL.mdwarm paper, lowercase display at 6x, one olivedisplay line crossing a tinted plate's bottom edge

Each is a finished skill: reference, dna.json, a capped payload, a worked proof, and tests that exit non-zero. Never merge two of them: the average of two good designs is a bad design.

Hand-offs

  • No winner yet, no reference to measure -> ../design-loop/SKILL.md first: it takes a real reference and converges on a piece that beats it. Come back with the winner. Capturing an average of several candidates produces the average, which is the thing you are trying to escape.
  • The words on the page -> ../marketing/SKILL.md. voice in dna.json constrains them; it does not write them.
  • The build -> ../nextjs/SKILL.md (App Router, React 19) or ../react/SKILL.md (Vite SPA).
  • SDD gate. Capturing a style writes a skill, not product code, so it needs no spec. The moment its output becomes a new feature or a non-trivial behaviour change in a real app, ../specify/SKILL.md runs first.

Files

FileWhat it is
PROMPT.mdThe standalone prompt. Paste anywhere, attach the design, done.
design-dna.schema.jsonEvery field of dna.json, explained.
scripts/emit.pyScaffolds and validates an emitted style skill.
templates/SKILL.md, PROMPT.md and check.py skeletons for the emitted skill.
references/method.mdThe full method and the research each decision traces to. Read once, not per run.

Why any of this works is not opinion: lost-in-the-middle recovery, instruction-compliance decay under constraint count, style being formally the correlation between features rather than the features, and decoupled image cross-attention. The citations are in references/method.md.

© ericrisco, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (scripts, references) in skills/design-dna of ericrisco/rsc-harness.

  • SKILL.md
  • PROMPT.md
  • design-dna.schema.json
  • evals/README.md
  • evals/cases.yaml
  • references/method.md
  • scripts/emit.py
  • templates/PROMPT.md.tmpl
  • templates/SKILL.md.tmpl
  • templates/check.py.tmpl

Open the folder on GitHubat commit e3d5b33

Compare with similar skills

Design Dna next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Design Dna compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Design Dna this skillericrisco/rsc-harness174—~3kAutomated safety check: PassMIT
Scikit SurvivalK-Dense-AI/scientific-agent-skills48k1 repos~4.1kAutomated safety check: NotesMIT
scikit-survival Time-to-Event Modelingdavila7/claude-code-templates32k11 repos~3.7kAutomated safety check: PassMIT
Scikit Survivalaipoch/medical-research-skills2k—~1.6kAutomated safety check: PassMIT
Ads DnaAgriciDaniel/claude-ads9.8k—~279Automated safety check: PassMIT
Design Dnazanwei/design-dna1.9k1 repos~2.1kAutomated safety check: PassMIT

Similar skills

  • Scikit Survival

    K-Dense-AI/scientific-agent-skills

    Builds, evaluates, and audits right-censored or competing-risk survival workflows with scikit-survival, including leakage-safe preprocessing, model selection, probability prediction, and…

    48k GitHub starsUsed in 1 repo~4.1k tokens
    Data & AnalyticsAuto-check: notes
  • scikit-survival Time-to-Event Modeling

    davila7/claude-code-templates

    Fits and evaluates survival models with scikit-survival: Cox models, Random Survival Forests, boosting, survival SVMs, concordance index, Brier score and competing risks.

    32k GitHub starsUsed in 11 repos~3.7k tokens
    Data & AnalyticsAuto-check passed
  • Scikit Survival

    aipoch/medical-research-skills

    A comprehensive toolkit for survival analysis and time-to-event modeling in Python using scikit-survival; use it when you need to model censored time-to-event outcomes, fit Cox/RSF/GB models or…

    2k GitHub stars~1.6k tokensUpdated 22 days ago
    Data & AnalyticsAuto-check passed
  • Ads Dna

    AgriciDaniel/claude-ads

    Extract a public-safe brand and offer profile for paid advertising from an authorized website and operator input.

    9.8k GitHub stars~279 tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Design Dna

    zanwei/design-dna

    Extract, define, and apply design DNA across three dimensions: design system (tokens), design style (qualitative feel), and visual effects (Canvas, WebGL, 3D, particles, shaders, scroll effects…

    1.9k GitHub starsUsed in 1 repo~2.1k tokens
    Frontend & DesignAuto-check passed
  • Km Survival Curve

    aipoch/medical-research-skills

    A skill your agent uses when generating Kaplan-Meier survival curves from tabular survival data containing time, event status, and a precomputed risk group.

    2k GitHub stars~2.5k tokensUpdated 22 days ago
    Documents & OfficeAuto-check passed

More from ericrisco/rsc-harness

All 233 skills in this repo
  • Ab Testing

    ericrisco/rsc-harness

    A skill your agent uses when designing or analyzing a controlled experiment — falsifiable hypothesis, sample size from an MDE, reading significance/CI/power, CUPED, or rescuing tests that won't go…

    174 GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Accessibility

    ericrisco/rsc-harness

    A skill your agent uses when making a web UI conform to WCAG 2.2 Level AA — axe-core or Lighthouse a11y violations, keyboard operability, focus management, ARIA roles/names/live regions, contrast…

    174 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Ads

    ericrisco/rsc-harness

    A skill your agent uses when running or fixing paid acquisition on Google or Meta — campaign structure (Performance Max, Demand Gen, Search, Advantage+), platform-fit creative, budget/scaling rules…

    174 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Agent Eval

    ericrisco/rsc-harness

    A skill your agent uses when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual…

    174 GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed
  • AI Media

    ericrisco/rsc-harness

    A skill your agent uses when a creative goal must become a finished media file: pick and order generative-media models per modality — AI voiceover, image-to-video clips, score — then glue them with…

    174 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed
  • Analytics

    ericrisco/rsc-harness

    A skill your agent uses when instrumenting product or web analytics — GA4/PostHog SDK wiring, event taxonomy, funnels, double-counted events, consent gating, PII scrubbing.

    174 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed

Questions about Design Dna

What does Design Dna do?

A skill your agent uses when a design has won and its look must survive: codify it into a permanent style skill with measured ratios, bans and tests that can fail, then build new pieces in that…. Design Dna is an agent skill from ericrisco/rsc-harness. Use when a design has won and its look must survive: codify it into a permanent style skill with measured ratios, bans and tests that can fail, then build new pieces in that exact look.

When should I use Design Dna?

Design Dna fits situations like: A design has won and its look must survive: codify it into a permanent style skill with measured ratios; bans and tests that can fail; then build new pieces in that exact look.

How do I install Design Dna in Claude Code?

Run `npx skills add ericrisco/rsc-harness --skill design-dna -a claude-code`. Or copy the skill folder (skills/design-dna in ericrisco/rsc-harness) into .claude/skills/design-dna in your project. Claude Code loads it when a task matches its description.

How do I install Design Dna in Codex?

Run `npx skills add ericrisco/rsc-harness --skill design-dna -a codex`. Or copy the skill folder (skills/design-dna in ericrisco/rsc-harness) into .agents/skills/design-dna in your project. Codex loads it when a task matches its description.

Can I use Design Dna in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ericrisco/rsc-harness --skill design-dna -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/design-dna, .gemini/skills/design-dna, .github/skills/design-dna and .opencode/skills/design-dna in your project.

What does Design Dna need to run?

Going by SKILL.md and its folder, Design Dna needs Python for the scripts in its folder and the command-line tools its instructions call (npx). Our summary lists: Python 3; Node.js.

Does Design Dna access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Design Dna safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Design Dna use?

Design Dna is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Design Dna use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.1k tokens, read only when the agent opens those files.

What are the alternatives to Design Dna?

Skills that share tags, products or a category with Design Dna: Scikit Survival (K-Dense-AI/scientific-agent-skills, 48k stars), scikit-survival Time-to-Event Modeling (davila7/claude-code-templates, 32k stars), Scikit Survival (aipoch/medical-research-skills, 2k stars) and Ads Dna (AgriciDaniel/claude-ads, 9.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Design Dna?

ericrisco (a GitHub user) maintains it in ericrisco/rsc-harness, which has 174 GitHub stars. The repository holds 233 skills in this directory. The repository was last updated on October 7, 2026.

Source: ericrisco/rsc-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.