lewitt
Agent skill · v1.3 · MIT

Turn a website into a design contract an agent can execute.

Drop a URL in, and lewitt reads the live site in an isolated browser—pulling out measured tokens, the taste trade-offs behind them, a standalone preview, and lint checks your coding agent can't ignore.

URL→evidence→Design DNA→guardrails

Why it exists

Hand an AI raw hex codes and font sizes, and you still get the same generic page back. Good design depends as much on knowing what to leave out as on the tokens themselves.

Named after Sol LeWitt, whose wall drawings were painted by assistants from strict written instructions, lewitt captures why a site feels the way it does, writes down what it refuses to do, and turns those refusals into checks.

“The idea becomes a machine that makes the art.”Sol LeWitt

Three rules

R1Evidence over guesswork

Captures rendered DOM, computed styles, and screenshots in a clean browser profile. Every note is tagged Observed, Inferred, Proposed, or Unknown—if a slot isn't on the site, it stays UNMAPPED instead of being guessed.

R2Anti-slop by script

Empty adjectives like “modern” or “elegant” are banned. Every restraint rule carries a machine-readable guardrail, so a script catches the next generic gradient or shadow instead of hoping the model behaves.

R3Single source of truth

dna.json is the only file written directly. The preview, tokens, shadcn-theme.css, taste notes, and coding rules are all rendered from it—if anyone edits a derived file by hand, the check flags the drift.

verifyHonest fidelity

Comparisons are recorded as unverified, PARTIAL, or PASS with every mismatch listed openly. lewitt never pretends a sample is a 1:1 clone.

Pipeline

  1. 01

    Brief.

    Pick the target URL, mode, and output folder. On an existing run, mark what can change so the rest stays locked.

  2. 02

    Sense.

    Open the live pages in an isolated Playwright/CDP browser to grab the DOM, computed styles, and screenshots—never a logged-in session.

  3. 03

    Infer.

    Work up from Measure → Pattern → Taste. Every principle keeps its evidence, what it chose, what it rejected, and at least one lintable restraint.

  4. 04

    Model.

    Build the three-tier token registry (primitive → semantic → component). Anything missing stays unknown rather than filled with a plausible guess.

  5. 05

    Build.

    Generate every artifact deterministically from dna.json: preview, taste notes, tokens, shadcn theme, agent rules, and verification report.

  6. 06

    Verify.

    Run anti-slop, R3 byte-equality, colour scope, and guardrail checks. Anything unverified or failing stays visible in the report.

Workflow & modes

DNADefault · 1–2 min

Inspects the entry page and up to three subpages to lay down your base: interactive preview, taste notes, tokens, shadcn-theme.css, and coding rules.

--fullSpecimen book

Adds a runnable system/ reference site with Live Preview and Specs & Evidence views, component states, and a Stress ▾ menu for long copy, reduced motion, and 390px screens.

clip.pyClip one brick

Runs standalone without dna.json. Triggers real hover/focus interactions, tests prefers-reduced-motion degradation, and maps the source colours onto your own shadcn variables.

cert.pyCertify a build

Probes your local preview against the extracted DNA and flags drifted colours, type sizes, or broken guardrails—while allowing documented intentional overrides.

Full mode is always explicit. A quick DNA run never silently turns into a full site build.

Outputs

dna.jsonSource of truth

The only file edited or authored directly: meta, evidence, measurements, patterns, taste, and tokens.

preview.htmlPreview

Single standalone file with live swatches, type and motion specimens, taste cards, and source screenshots.

taste.mdAnatomy

Readable design notes, token table, and Taste DNA.

agent-rules.mdInstructions

MUST NOT guardrails pinned at the top, followed by principles, patterns, and tokens.

tokens.cssTokens

Scoped --lw-* custom properties ordered from semantic to primitive.

shadcn-theme.cssTailwind v4 theme

Drop-in @theme inline tokens mapped to shadcn slots so you can paste straight into globals.css.

brick.mdClipped brick

Skin-stripped structure, motion deltas, and reduced-motion check for a single borrowed UI component.

cert.htmlCertificate

Local build audit comparing rendered styles against the DNA contract.

VERIFY.mdGates

Audit ledger showing every check that passed, failed, or couldn't be measured.

system/Full mode only

Runnable reference site with component states, real layouts, stress toggles, and fidelity notes.

Guardrails

Measurements turn into plain rules like “Colour is a once-per-page event” or “Depth is a 1px hairline, not a shadow.” Every restraint ships with a lint check so you don't have to stand behind the agent shouting “too much purple.”

Chose

a single decorative gradient confined to the hero

Over

gradient text, gradient buttons, gradient backgrounds

python3 scripts/lint_output.py \
  --dest runs/stripe.com \
  --check-code ./src

Stripe's restraint rejects bg-gradient-to-* and Tailwind v4's bg-linear-to-*; Linear's rejects shadow-lg and box shadows with offset or blur.

Boundaries

contentNot a scraper

lewitt studies design decisions, not copy. It doesn't summarize articles or lift site content.

screenshotNot a pixel clone

It extracts tokens and structure. Screenshots serve as evidence, not a licence to trace someone else's page pixel by pixel.

evidenceUnknown stays unknown

Missing slots are marked explicitly instead of invented, and inferred values keep their evidence id.

runtimeProvider-neutral

Browser capture uses Playwright/CDP locally. The skill itself bundles no model, API key, or hidden endpoint.

Source

lewitt is MIT-licensed. The repository includes the skill, capture and verification scripts, and four measured runs (steno.ai, stripe.com, binance.com, and linear.app). The standalone SKILL.md describes the workflow. Clone the repository to get the scripts and references it needs.

git clone https://github.com/CClishan/lewitt-skill.git \
  ~/Projects/skills/lewitt
ln -s ~/Projects/skills/lewitt ~/.codex/skills/lewitt
bash scripts/setup.sh

The measure-to-pattern-to-taste chain and banned-word discipline come from taste-skill (MIT, Senlin). The evidence ledger and token layering come from website-design-system (DiqingWWW).