/proof:proof-designfrom proof
Detects a project's design system state (none, unwired, wired) and acts accordingly: extracts tokens from inline styles, wires existing tokens into the harness, or reports drift between tokens and code.
Ships in proof. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Makes a project's design system real: extracted if it does not exist, wired so the harness can see it, and checked against the code that is supposed to use it.
/proof-design # detect the state and act
/proof-design --drift # skip straight to the drift report
Read _partials/config.md and _partials/voice.md first.
Never ask the user which mode applies. Work it out, say which you found and why, then proceed. Getting this wrong in the other direction is expensive: running an extraction on a project that already has tokens writes a second, competing set, and two token files is worse than none.
| State | How to tell | What to do |
|---|---|---|
| None | No token module; style values sit inline across the code | Extract → wire → report coverage |
| Unwired | Tokens exist; design.tokens is null or does not resolve | Wire → report coverage |
| Wired | design.tokens resolves and the app imports it | Report drift |
A project can be partly wired — tokens exist, the config points at them, but half the code still hardcodes values. That is the wired state with poor coverage, not the unwired one. Report the number; do not re-extract.
Sweep the code for every style value actually in use, with counts and locations: colors, font families and weights, font sizes, spacing, radii, and anything else the platform styles with. Count occurrences, not just distinct values — a colour used 40 times and one used once need different treatment, and the counts are what turn this from opinion into arithmetic.
This is the part that earns the skill. Values that differ imperceptibly are almost never deliberate — they accumulate. Group them and propose one survivor per cluster, with the most-used value as the default choice.
Be honest about the distinction between a cluster and a distinction: two greys three points apart are a cluster; a warning amber and a brand gold that look similar may be carrying different meanings. When you cannot tell from the code, say so and ask, rather than collapsing a meaning the user cares about.
--amber-500 tells you nothing about when to use it; warning does. A token named for
its colour has to be renamed the moment the colour changes, which defeats the point.
Where one value serves several roles, that is usually a sign it should be several tokens
sharing a value today.
Show the proposed set: each token, its value, what it replaces, and the occurrence count it covers. Show the clusters and which value won. Show anything you could not classify — the leftovers are informative, and quietly dropping them hides the mess rather than fixing it.
Write nothing until the user approves. Then write the token module in the form the platform actually consumes (see below), and say plainly that no code has been migrated yet — writing the file changes nothing on screen.
A design system the harness cannot find is invisible: mockups stay generic, builds stay unaware, and the design reviewer has nothing to cite. Wiring is what turns a file into a constraint.
Set the design block in .claude/harness.json:
| Key | Meaning |
|---|---|
tokens | Path to the token module the app imports |
reference | URL of the browsable design system, if one exists. A Claude Design System link is the most useful kind: /proof-spec can then design small changes on a Claude Design canvas with the project's real tokens (and components, for web projects). See A Claude Design System for the project below |
platform | What consumes the tokens — decides the file's form and the rules that apply |
rules | House rules in plain prose, one per line — the things that break silently here |
Then verify, do not assume:
reference URL, if set, is reachable.Report each check. A wiring step that reports success without verifying is the failure this section exists to prevent.
If the user designs in Claude Design, or wants /proof-spec to design small changes
itself, offer to build a Claude Design System from the token module and set
reference to it. Designs attached to it use the project's exact values instead of a look
Claude invents. The token module stays the source of truth; the system is a copy, and
goes stale if it is edited on its own.
The route that works everywhere: the Artifact tool's Design System type. No extra
skill is needed. /design-sync exists in some setups, but it is for syncing a component
library into an existing system; don't send the user looking for it.
quickstart (intent other) or list (scope: "types"), create one
system from it with only a title, then read its references (from-code.md,
format.md, cover.md) before writing anything. The type's own instructions govern the
file shapes; follow them.{name, value, usage};
names are unique across families. A hosted font (Google) needs no font files, only
type.families, but say that previews may render slightly differently from the app's
bundled font.design.rules), and a Not synced section saying what was left out.tokens.css only exists once the
page is opened, so it can't be read back to check. Check tokens.json against the
format's rules (name pattern, no duplicates, allowed colour syntax) yourself.The number that matters is not how many tokens exist. It is how much of the code uses them:
Tokens defined: 14
Raw values in code: 34 distinct, 80 occurrences
Covered by a token: 12 occurrences (15%)
Unmigrated: 68 occurrences across 11 files
Adopting a design system is not finished when the file exists — it is finished when the code uses it, and that gap is where most attempts quietly die. Report the real figure even when it is embarrassing, and never describe a freshly written token file as done.
For a wired project, also report drift: values in the code that no token covers. Drift is how a design system becomes a lie — the file says twelve colours, the app ships thirty. Group drift by file so it can be cleared a screen at a time, and list the worst offenders first.
Offer migration as a separate, explicit step the user chooses — never fold it into
this run. Migrating swaps values across many files and belongs in its own reviewable
change, ideally as a regular issue through /proof-spec.
The token file must be in the form the platform consumes, or it is a document rather
than a system. Read design.platform; if it is not set, infer it from the project and
record what you inferred.
:root. Components read var(--token)..css file is a reference
document at best; StyleSheet needs values it can import.If a project has a design reference in one form (a published design system, a CSS file) and ships in another, say so plainly: those values are hand-copied, and hand copies drift. Name which one is authoritative and make the other derive from it.
design.rules holds what breaks silently in this project — the things no general
ruleset knows. Write each as a concrete condition and consequence, not a principle:
<Text> styled with a custom font — the glyph silently
fails to render"These are what the design reviewer cites. A rule too vague to cite is not a rule.
The state you found, what changed, the coverage figure, and the honest next step — which is usually migration, and usually its own issue.
What SKILL.md sets; muted values are Claude Code's defaults
sonnetnpx claudepluginhub jsamitt/proof-claude-plugin --plugin proof11 skills in this plugin
/proof-fixUse when something is broken — finds the root cause before changing anything, confirms it, fixes it with a test that proves it, and opens a PR. The path every bug takes, instead of spec and work. Part of every bug/proof-handoffUse when a design made in a design tool is ready to be built — checks it against the codebase before anything is built (what exists, what is new, what cannot be built as drawn, which states are missing), writes the revisions for the design tool, repeats until it is clean, then records the approved design in the issue and marks it ready. Between spec and work, for designs made elsewhere/proof-initUse once per project — not part of every issue — when setting up the Proof harness for the first time, or when its configuration is out of date — inspects the repo, asks what it cannot infer, and writes .claude/harness.json plus the GitHub board and labelsOther plugins' skills for the same job