UI DNA

Specifications · rev 0.3.1

Spec 01

Getting started

Getting started

Install the CLI, register it with your coding agent and run a first reconstruction.

Node 20.19+Chromium via PlaywrightMCP + CLINo API keys

01.1Install

UI DNA is one npm package with two commands, uidna and uidna-mcp. It drives a local Chromium that Playwright installs.

bash

$ npm install -g uidna-mcp
$ npx playwright install chromium
1

No global install

Every command also runs through npx, for example npx uidna-mcp doctor.

01.2Register with your agents

uidna setup adds the MCP server to Claude Code, Codex and Cursor. It prints the planned changes, asks before writing and backs up every file it touches.

bash

$ uidna setup
OptionEffect
--targets <list>comma-separated: claude-code,codex,cursor (default all)
--scope <scope>user (default) or project
--localregister this checkout (node dist/cli.js serve) instead of npx -y uidna-mcp@latest serve
--yesapply without asking
--no-backupdo not back up existing config files

Manual configuration

json · mcp config

{
  "mcpServers": {
    "uidna": { "type": "stdio", "command": "npx", "args": ["-y", "uidna-mcp@latest", "serve"] }
  }
}
2

Windows

The registered command is wrapped in cmd /c.

01.3Check the setup

Browser availability, Chrome DevTools reachability and where the server is registered.

bash

$ uidna doctor

01.4First run

Without an agent, uidna reconstruct runs the whole loop on one page: scan, explore, tokens, generate, verify and report.

bash

$ uidna reconstruct https://example.com ./example-clone --viewports 1280,768,390

A small site you own

Up to five same-origin pages, JSON responses captured as data, forms exercised with synthetic values.

bash

$ uidna reconstruct http://localhost:3000 ./my-site \
    --crawl '{"maxPages":5}' --capture-bodies json --policy forms
!

Authorized use

Scan interfaces you own or are allowed to analyze. Every non-GET request is blocked while exploring. More

What you get

  1. 1
    ./.uidna/<scan-id>/Captures, screenshots and the UI DNA document.
  2. 2
    ./example-clone/A React, TypeScript, Tailwind and Vite project, installed and built.
  3. 3
    The DiffReportOne finding per difference, with regressions and resolved findings per attempt.
  4. 4
    report.htmlA static report of the evidence, next to the scan.

01.5Teach your agent

The shipped skill teaches the agent the loop. Copy skills/uidna/SKILL.md into your agent’s skills directory; for Claude Code that is ~/.claude/skills/uidna/. Then ask:

prompt · Claude Code, Codex or Cursor

Reconstruct http://localhost:3000 at 1280, 768 and 390 px with UI DNA.
Repair until no regressions remain.