/ux:ux-systemfrom ux
Builds a WCAG-gated design system with tokens, foundations, and component contracts. Supports create, enhance, and extend modes for new or existing systems.
Ships in ux. Installing the plugin adds it to Claude Code.
You are running the /ux-system command from the ux plugin. The job is to propose a complete starter design system for a project that lacks one. Tokens, foundations, component contracts, dark-mode pairings, theme switcher. Not a sketch — a usable starter.
Triggers: "we don't have a design system", "build us a system", "propose tokens", "what should our theme be", "set up our DS", "we need a token JSON", "design our brand foundations".
If the project already has a design system, do not build a new one: measure it with enhance or add to it with extend (see "enhance mode" and "extend mode" below), and build components against it with /ux-component.
| Mode | What it does | Status |
|---|---|---|
/ux-system create | Builds a WCAG-gated token system with the 4.0 foundations engine. See "create mode" below. | 4.0 |
/ux-system (no mode) | The 3.x starter flow: discovery, recommendation, then the design-system-architect agent writes tokens, foundation docs and component contracts. See "3.x starter flow" below. | 3.x, kept until 4.0 final |
/ux-system enhance --from <src> | Read an existing system in its own names, check it, and measure the code that uses it. A report; nothing is rewritten. See "enhance mode" below. | Works now |
/ux-system extend --from <src> --add <...> | Add foundations, roles or contracts to an existing system without changing a token it has. See "extend mode" below. | Works now |
Never rewrite a system ux-skill did not write: extend puts what it adds in an extension file beside it.
A system the project already has is fixed input: the engine reads it in its own names and never rewrites it. These parts work now:
uxskill --no-pretty system detect --root . lists the system's files by kind (token source, token files, built output, foundation CSS, MASTER.md, DESIGN.md, a system folder) and what they declare: the primary and its token, the text color, the faces, every named color and the languages of the project's HTML. The primary is the value of the file it was read from, the token file first; when the rendered page shows another value for that token, primary_reports names both values, their files and lines, and the fix.dtcg (DTCG JSON tokens), css (CSS custom properties), tailwind (a Tailwind 4 @theme stylesheet) or tailwind-json (a resolved Tailwind config export), markdown (markdown rule files) and figma (a Figma variables export). engine.io.read_any(path, fmt) returns the tokens in the system's own names and an import report: what it read, and every entry it did not read with how to write it so it is read. It never guesses a value.engine.io.propose(tokens) proposes which of the system's names fills each of the engine's roles, by name only. engine.io.merge(proposed, existing) keeps every entry the owner wrote in the mapping file and fills only the roles still open; engine.io.dump_mapping(mapping) writes the file for the owner to confirm.engine.io.scan([code folders], tokens) reads what the product's code actually uses. engine.io.enhance(imported, mapping, scanned) is the enhance report: tokens the code never reads, raw values a token already holds, values written several ways, names every use contradicts, references to tokens the system lacks, how many roles the mapping covers, what the owner should confirm, and every decision made without them. It measures and proposes; it never changes a value or writes a file. .markdown() gives the report as text, .to_dict() as JSON.python3 -c "
from engine.io import read_any, propose, scan, enhance
imported = read_any('design-system/tokens.json', 'dtcg')
report = enhance(imported, propose(imported.tokens), scan(['src'], imported.tokens))
print(report.markdown())
"
The commands in "enhance mode" and "extend mode" below run these steps for you, check and back up every source before any write, and write whatever they add to a system ux-skill did not write as a separate extension file in the source's own format. Use the Python calls only when the commands cannot run.
create builds the system with the engine, not by hand. The engine generates nine foundations (color, type, space, layout, radius, border, elevation, motion, imagery), checks every color pairing in light, dark and high contrast, and refuses to emit a system that fails. You run it, read its result, and explain it.
Run uxskill --version first. The build needs uxskill 4.0.0 or later, which prints, for example, uxskill, version 4.0.0. If uxskill is not on PATH, run python3 -m engine.cli.main --version instead.
If the version is older than 4.0.0, or neither command exists, stop here and give the user the install line; do not go on, and do not change any flag:
pip install --upgrade uxskill
With pipx: pipx upgrade uxskill (or pipx install uxskill when it is not installed). For the MCP server: pip install --upgrade 'uxskill[mcp]'. Run the version check again after the install.
.ux/last-discovery.json when it exists. Without a brief, the user may give the seven axes by hand, or accept the neutral default.industry, ask one question: which industry is closest, from the list below. The user may skip it. If they pick one, write .ux/system-brief.json with the discovery answers (if any) plus "industry": "<id>", and pass that file as --brief; leave .ux/last-discovery.json as it is. Over MCP, add industry to the brief object. If they skip, build without it.
Industries: ai-ml, automotive, b2b-marketplace, construction, consumer-lifestyle, crypto, developer-tools, ecommerce, editorial-media, education, fintech-banking, fintech-payments, fintech-trading, gaming, healthcare, hospitality-travel, luxury, pharmacy, productivity, saas, security.
Each is an axis seed, never a look. building-materials, wholesale, cybersecurity and medical-supply read as construction, b2b-marketplace, security and pharmacy.design-system/ in the project root unless the user names another.--latin-only only when the user says the product never shows Arabic.The engine reads five brief fields for the look: industry, tone, audience, must_have and forbidden, then the character nudges below. Tone words carry weights on the seven axes by what they say, common ones included: fast, clear, practical, solid, modern, reliable, simple, bold, calm, warm, sharp, soft and more; pass the user's own words, never a nearby word with another meaning. It does not read project_type, region or any other discovery field; the report gives each one a line, says to pass region as languages and project_type as product_type. Some words discovery suggests move nothing: confident, dark-mode, RTL, AA accessibility, mobile-first, print-fidelity; every system already has dark mode, the contrast gate and, unless it is Latin only, right to left. Never tell the user those words shaped the look. The report names every word it did not read.
It also reads seven structured fields about who the product is for and what it is. The engine never parses plain text for them, so you fill them from what the user said, in the brief file (.ux/system-brief.json) or the MCP brief object, and leave out any the user did not say:
| Field | Values | Fill it when the user says, for example |
|---|---|---|
age | children, teens, adults, all-ages, older-adults | "many patients are over 60" gives older-adults; "families" gives all-ages |
languages | language tags (two or three letters, then optional subtags), first the main one; never a name such as "Arabic", which is refused with its tag. An Arabic variety (arz, apc, ary) or any tag with the Arab script subtag (pa-Arab) ships Arabic; ar-Latn does not | "Arabic-speaking shop owners in Jordan and Egypt" gives ["ar-JO", "ar-EG"]; add "en" when the product also ships English |
primary_script | latin, arabic | read from the first language when left out; set it when the main language is not first. arabic alone ships Arabic, like an Arabic language does |
default_scheme | light, dark, system | "dark by default" gives dark; leave it out to follow the operating system |
reading_context | glance, task, long-read, on-the-go | "people read long articles" gives long-read; "booked from a phone on the way" gives on-the-go; "a status screen people check in passing" gives glance, which raises the bento composition's score |
product_type | app, software, marketing-site, editorial, commerce, marketplace, local-service; also read: saas and web-app as software, mobile-app as app, shop and store as commerce, b2b-marketplace and b2c-marketplace as marketplace, service as local-service | the product the page sells, never the page: a landing page for a pharmacy ordering app is app, a landing page for a B2B ordering platform is marketplace, an online shop is commerce, a clinic or a salon is local-service, a magazine or a journal is editorial, and marketing-site is only for a company with no product of its own. The page kind goes in project_type. A product people use leans the faces to sans and an interface Arabic face; an editorial product may take a serif, the more so the more humanist and formal the brief. The page-sequence picker reads the same field and the same values |
brand_role | fill, accent, edge | from the client's own materials, not only when the user names it: their app, site or identity filling its buttons with the brand gives fill; ink buttons with brand links give accent; brand rules and edges around ink buttons give edge. Leave it out when there are no such materials; the brand color then leads (a saturated mid tone fills the action) and the axes decide only for a very light, very dark or grey brand |
Older and mixed-age readers get larger body text and targets, a wider focus ring and no compact density; languages or an Arabic primary script decide whether Arabic ships (either with --latin-only is refused); dark opens the page dark while data-theme="light" still switches it. The report's "Who it is for" section says what each field changed and why, and "What the engine did not read" names every word that changed nothing and how to say it. Never tell the user that unread words shaped the system.
When the page's headline is known, pass it as headline: the headline as the user wrote it, or a list of the page's headlines. The landing display is sized so the longest word fits its column; without it the display fits a 13-letter word (10 letters in Arabic). A value that is not text, has no word, or holds a word of more than 40 letters is refused with the field and the fix.
When a word the user said is unread and it matters, pass what it means as a character object: any of the seven axes (warmth, contrast, density, geometry, formality, motion, type_personality), each a nudge from -0.3 to 0.3, applied after the words and before forbidden. For example "sturdy" might be "character": {"contrast": 0.1, "geometry": -0.1}. Keep each nudge small and say it to the user; the report's "Character nudges" section states each nudge, the value the words gave, the value the build used and the foundations the axis moves. A value outside the range, or a key that is not an axis, is refused with the field and the fix.
Run python3 -m engine.cli.main --no-pretty system detect --root . first. When found is true the project already has a design system, and it is fixed input: do not build a new one over it. Tell the user what was found (the sources and the declared primary) and build only into a new folder, as a reference for gaps, never into the system's own folder. system build --force refuses to replace files ux-skill did not build; --replace-client-files exists only for a user who asks for exactly that.
List the output folder first (ls design-system/). If tokens.json, tokens.css, fonts.css, fonts-self-host.css, system-report.md or a rule-pack/ folder is already there, tell the user and run without --force: the engine then writes nothing if any file differs, and leaves identical files alone. When a rule-pack/ folder is there, pass --rule-pack again whenever you change the system: a build without it leaves the pack as it was, and if the new tokens.json no longer matches the digest in rule-pack/built-from.json, the result and system-report.md name the pack as stale, with the fix (build again with --rule-pack, or remove the folder). The engine never deletes it.
uxskill --no-pretty system build --brand '#3366FF' --brief .ux/last-discovery.json --out design-system
Quote the brand color: an unquoted # starts a shell comment. Without a brief, pass --axes 0.5,0.5,0.5,0.5,0.5,0.5,0.5 (warmth, contrast, density, geometry, formality, motion, type_personality) or leave both out for the neutral default. Do not pass both --brief and --axes. If uxskill is not on PATH, run the same arguments through python3 -m engine.cli.main.
Add --rule-pack when the user wants the system's rules written for AI agents and people too, for example to keep an agent on the system while it builds screens, or to hand the system to another team. It is off by default. It writes design-system/rule-pack/ beside the system files: per foundation an architecture, reference, audit and handoff file, the content and right-to-left rules, the twenty component contracts (button, card, dialog, status banner, selectable row, text field, select, checkbox, radio, textarea, date, input with a prefix, chip, badge, link, navigation, progress, table, FAQ accordion and site footer) and the decision records. The guidance and the contracts are checked against the tokens just built, and nothing is written if they do not fit. Only the command writes it; over MCP, build the tokens, then run the command with a shell when the user wants the rule pack.
With a shell, use the command above: it writes the files itself. Without a shell, call ux_system_build over MCP with brand, and brief (an object) or axes (seven numbers), latin_only (true or false), and out, the absolute path of the output folder. It then writes the system files as the command does and returns the same status, written, unchanged, conflicts and message; force (true or false) does what --force does, and the same look-before-writing rule applies. Without out it writes nothing and returns status built (or failed), the report and each file's size. include_files (true or false) adds the css and dtcg text, but tokens.json is over 100 KB: do not copy it into files by hand, pass out. A bad input comes back as status invalid, passed: false and an error that names the field and the fix.
The command prints JSON. status says what happened:
| status | exit code | meaning | what you do |
|---|---|---|---|
written | 0 | New or changed files written. written lists them. | Report back (step 6). |
unchanged | 0 | The folder already holds this exact system. | Say nothing changed. |
refused | 1 | A file in the folder differs; nothing was written. message names each file. | Show the user which files differ. Rerun with --force only after the user says to replace them, or pick another --out. |
failed | 1 | The WCAG gate or validation failed; nothing was written. findings lists each one, and stderr explains the failure in plain words. | Explain it (step 8). |
error | 1 | The folder could not be written (for example it cannot be made, is read only or full, or a folder, link or unreadable file sits where a system file goes); nothing in it changed. message names the path and the fix. | Show the message. Pick another --out, or free space, and run again. |
Exit code 2 means a bad input; the message on stderr names the flag and the fix. Correct it and run again. The one exception is No such command 'system': the uxskill on PATH is older than 4.0, so give the user the install line from step 1 and stop.
Read design-system/system-report.md and explain it. Do not paste it.
data-theme="dark", data-contrast="high", data-density="compact", dir="rtl", data-motion="reduced" on the html element. Without an attribute, dark, high contrast and reduced motion follow the operating system. dir="rtl" or lang="ar" (or any ar- tag) also works on any element inside the page, such as an Arabic block in an English page, and gives it the Arabic type; a block tagged with another Arabic-script language, such as lang="arz", also needs dir="rtl".type.text.display, its proof numbers type.text.figure and the gap between its sections var(--layout-landing-gap), which tokens.css switches per viewport.--rule-pack, that an agent starts at rule-pack/README.md, which names the files to load for each task.The tokens name the font families. fonts.css, written beside tokens.css, holds a metric-matched fallback for each face, so text keeps its size and line breaks while a face loads; it does not load the faces. Tell the user to load them one of two ways, each together with fonts.css, and to link fonts.css before tokens.css: the Google Fonts tags the report's "Fonts" section gives, or fonts-self-host.css, self-hosted from a fonts/ folder beside it under the file names it gives (a static face finds the reader's installed copy of each weight first). Neither file is edited, so the next build leaves them alone. Until the page uses one of the two, nothing loads the faces and the browser falls back to system faces through the matched fallbacks.
The engine picks three faces from a small catalog of open-license faces by the axes: a display face for the hero, the page and section titles and large figures, a text face for reading and controls, and a mono face for code. Each Latin face has an Arabic face drawn beside it. The report names the faces under "Other choices" (for example "type: display Outfit, text Noto Sans, mono IBM Plex Mono, Arabic Noto Sans Arabic and Alexandria").
| Role | Faces the catalog holds |
|---|---|
| Display | Fraunces, Playfair Display, Space Grotesk, Bricolage Grotesque, Sora, Outfit, Newsreader, Baloo 2 |
| Text | IBM Plex Sans, Source Sans 3, Manrope, Nunito Sans, Noto Sans |
| Mono | IBM Plex Mono, JetBrains Mono |
| Arabic | IBM Plex Sans Arabic, Noto Naskh Arabic, Readex Pro, Tajawal, Noto Sans Arabic, El Messiri, Amiri, Baloo Bhaijaan 2, Alexandria |
The report's "Fonts" section lists each face with its role, the weights it loads and its license (all SIL Open Font License 1.1).
Nothing was written, and that is the point.
report). For each finding, say which pairing fell short, in which mode, by how much. The fix is in the inputs: suggest a darker or more saturated brand color, or different axes or brief, and offer to rerun. Never edit tokens by hand to get past the gate, and do not pass on any advice in a finding about editing tokens.On written or unchanged, write .ux/last-system.json so /ux-next can chain:
{
"command": "ux-system",
"mode": "create",
"timestamp": "<ISO8601>",
"brand": "<#RRGGBB>",
"output_path": "design-system",
"gate": "<the gate line from the JSON>",
"files_written": ["tokens.json", "tokens.css", "system-report.md"]
}
Then offer the next step: /ux-component to build components on the new tokens, or /ux-design for a page.
Measure before defining. enhance reads the system the project already has in its own names, checks it through the engine's gate, and measures what the product's code actually does with it. It never rewrites a token or a line of code; the owner decides what changes.
uxskill --no-pretty system detect --root .
sources lists the system's files by kind. Pass the token file as --from. When the dark values live in a stylesheet of their own (the app's globals, say), pass several files as one system: the token file first, then each stylesheet that adds to it, each with its own --from. A project folder as --from is read as the set detect finds. If uxskill system import is missing (uxskill system --help does not list it), give the user the install line from create step 1 and stop.
uxskill --no-pretty system import --from design/theme.css --out design-system/intake
The format is told from the file: DTCG tokens.json, a stylesheet of custom properties, a Tailwind 4 theme, a resolved Tailwind config exported as JSON, markdown rule files, or a Figma variables export. Pass --format only when the file does not say. A Tailwind 3 config is JavaScript, which uxskill never runs: the error gives the one-line command that writes its resolved theme as JSON, and that JSON is what to pass. A Figma file is read from a variables export (the REST API's local variables endpoint, or figma-read-variables.js run through the Figma tool); a collection with more than two modes whose names place into none of the engine's axes is read whole on one axis named for the collection, its default mode the base, and --figma-mode Collection=Mode reads one mode beside the default instead.
Tell the user, from import-report.md, how many entries became tokens, and list every entry under "Not read" with its fix. Nothing there was guessed; a long list is folded by file and message, with a count on each line.
mapping.json says which of the system's tokens plays each of the engine's roles and which of its modes is each axis. The import proposes it from names alone and marks each such line "by": "name"; names are read with or without a prefix most of the system's color names share, and the entry remembers that prefix. A size whose name says type, font or text and a text role (type.size-body, font-size-display) is proposed as that role's fontSize field alone; the report says which fields the user still maps. A bare size name such as size-display is not proposed; the enhance report names it and how to map it. Read the token names and how the code uses them, propose lines to the user, and write a line only when the user confirms it, as "by": "owner".
{"token": null, "by": "owner"} (an axis: {"from": null, "by": "owner"}). It is never filled again."fields" holds fontFamily, fontSize, fontWeight, lineHeight and letterSpacing, each with its own token and by. A field left out is not checked, and the report names it.uxskill --no-pretty system enhance --from design/theme.css --mapping design-system/intake/mapping.json --scan src --out design-system/intake
Repeat --scan for every folder of product code (CSS, HTML, Blade, JSX and Tailwind classes are read). Classes are read through the project's own Tailwind theme: a Tailwind 3 config and its presets, read as text and never run, and any Tailwind 4 @theme block, so a name the theme maps to var(--x) reaches that token (a duration there is in no Tailwind namespace, so it is listed as not measured, with the class to write instead); what the config computes is listed as not measured. A step of Tailwind's own spacing scale (px-6, inset-0) is a raw value, never a missing token, while a theme read in full extends the spacing scale rather than replacing it; each step is that many of the spacing base an @theme block sets (4px when it sets none). When a preset from a package or a spread could replace the scale, the class stays one that names no token, beside the part not read. A prefix (md:, hover:) is context, never another spelling; the sign (-z-10) and the opacity (bg-white/80) are part of the value; a class the project's CSS defines is its own. A stylesheet passed as --from is scanned too, for what its rules use. When the scanned pages set dir="rtl" on <html>, the values a stylesheet sets on its root are read as the rtl ones and a [dir="ltr"] rule as the ltr mode, as for a project folder read whole, and one note says so. Several --from files are read as the browser reads them: a later file, or a more specific selector such as html:root, wins a value, and the report names the winner and the loser with both lines. The gate counts as measured only when it measured a contrast pair. Without --mapping, the mapping.json in the out folder is read, or the one beside the source when there is no out folder. The command prints JSON and, with --out, writes enhance-report.md and enhance.json.
Every system command prints JSON whose status says what happened:
| status | exit code | meaning |
|---|---|---|
read | 0 | The system was read; nothing was written (import without --out). |
reported | 0 | The report was made; nothing was written (enhance without --out). |
built | 0 | The files were made; nothing was written (export without --out). |
passed | 0 | Every contract checked clean. |
written | 0 | Files were written, after every source was backed up. |
unchanged | 0 | The folder already held these files. |
blocked | 1 | The extension did not pass; only extend-report.md was written. |
failed | 1 | A contract has a problem; problems names each one. |
refused | 1 | A file in the way differs; nothing was written. message names each file. |
error | 1 | A source changed after it was read, or a folder could not be written; nothing changed. |
Exit code 2 is a bad input; the message names the flag and the fix. Over MCP the same bad input comes back as status invalid with an error naming the field.
Lead with what the code does: tokens it never reads, raw values a token already holds, values written several ways (for example a card corner written as 6px, 0.375rem and a token in three components), names every use contradicts, and references to tokens the system lacks. Then the gate, each finding with the system's own name beside the role. Then "For the owner to confirm" and "Decisions made without you", word for word, so the owner can reverse any of them. Do not edit tokens or code in this mode.
Over MCP, call ux_system_import and ux_system_enhance with absolute paths: source (one path, or a list for several files), out, mapping and scan (a list). format, figma_modes and force do what their flags do. Results stay small: counts, statuses and the report text.
extend adds foundations, roles or contracts to a system the project already has and changes nothing it has: every token comes back with its name, value and modes.
Import and confirm the mapping first (enhance steps 1 to 3), and list the folders. Who owns the source decides where the additions go, and it is read from the ownership record, never from token names:
ux-skill never rewrites a system it did not write: the additions go in an extension file beside it, in the system's own naming, holding only what was added. The result's load line says how to load it. The file depends on what the system was read from (<name> is the source's file name without its extension, so theme.css gets theme-ext.css):
| source format | written beside the source |
|---|---|
css | <name>-ext.css, loaded after the source |
tailwind | <name>-ext.css, with an @theme block of its own |
dtcg | <name>-ext.json, a tokens file read after the source |
tailwind-json | tokens-ext.json, each token holding its own value |
markdown | tokens-ext.json, each token holding its own value |
figma | <name>-ext.json and <name>-ext.js, the script that adds the variables in the Figma file |
A system ux-skill wrote (its folder's .uxskill/files.json record lists the file at its digest, or the file carries the engine's digest stamp) is rewritten in place after a backup, and tokens.css, the font files, system-report.md and art/ beside it are rebuilt when they are the engine's and unchanged. The report keeps what the system was built from and its notes, says the opening (now naming the in-place extend), scripts, gate, brand color and fonts again from the extended tokens, and gains an "Extended in place" section listing what was added; the art is drawn from the brand color and axes the report records. A report the user edited is theirs: it and art/ stay as they are, and the extend report says to build into a new folder for fresh ones.
Before any write the command checks that every source is still the file that was imported, copies each one into .uxskill/backup/ in the folder it writes, backs up every file it replaces by its content, and records what it wrote in .uxskill/files.json. It refuses to replace a file that differs. Do not pass --force until the user says to replace the named files; --force replaces only files ux-skill wrote, and --replace-client-files exists only for a user who asks to replace one of their own, and only on the command line; MCP does not take it.
A folder built before the record existed gains .uxskill/files.json on the first build that changes a file in it; until then only the files that carry the digest stamp count as ux-skill's. .uxskill must be a folder: a file or a link by that name makes build stop and name it, with nothing written.
uxskill --no-pretty system extend --from design/theme.css --mapping design-system/intake/mapping.json --add motion --out design-system/intake
--add adds a foundation (color, type, space, layout, radius, border, elevation, motion or imagery), generated from --axes or --brief (every axis at 0.5 without them). Added color and imagery (its wash and duotone) take --brand, or without it the system's own primary: the fill the mapping names, else the color whose name says primary or brand; the engine's default only when there is none, and the report says which. Added tints and surfaces are derived from the system's own page colors so they pass against what renders. A mode axis the system does not have (a high-contrast mode, reduced motion, density) is never added unless asked: the additions hold that axis's base values and the report says so. --add-mode contrast asks for one; the system's own colors are then measured in it under "Already in the system", and those findings never block the extension.create: fill its structured fields (age, languages, primary_script, default_scheme, reading_context, brand_role, product_type) from the user's words, since the engine reads no free text for them. The report says what each field changed and lists every word it did not read. --latin-only with a brief whose primary script is Arabic is refused.fonts.css and fonts-self-host.css beside the system; link them as in create step 7, or the faces never load. Adding imagery adds its tokens only: no art is written.--add-role color.focus.ring=brand-700 points one of the engine's roles at one of the system's own tokens.--contract chip.yaml checks a contract through the mapping and copies it into contracts/ in the out folder.The source itself stays as it is. The extension file, and the backups of every source under .uxskill/, sit beside the source by design, since an extension loads next to the file it extends; --out holds the report and the mapping, with its own .uxskill/ folder (the record of what ux-skill wrote there and a backup of the sources read), and the result's where says which file went where and why. The load line names exactly the files the extension's tokens point at. The extension file holds only what was added, and the owner merges the two by hand when they want one file. A later extend reads the extension file first and keeps what it added; while the extension is still as ux-skill wrote it, it is written again with the new additions after a backup, without --force, so a second extend can report into another --out folder, each folder with its own intake record. An extension the owner edited is theirs and is never written over without --force. A system read from markdown or a resolved Tailwind config gets a tokens file beside it, since neither format holds generated tokens, and the report says so under "Decisions made without you".
written: tell the user what was added, the file to load (the load line) and that everything else is unchanged. blocked (exit 1): only extend-report.md was written; read its "What blocks it" lines to the user, each with its fix. Findings that were already in the system are listed apart; the extension did not cause them. Always end with the report's "Decisions made without you".
uxskill --no-pretty system export --from design-system/tokens.json --to tailwind --out design-system/export
uxskill --no-pretty contracts check design-system/contracts --tokens design-system/tokens.json --mapping design-system/intake/mapping.json
--to takes css, tailwind, figma or dtcg. An export writes into its out folder only, never over the source. tailwind is a Tailwind 4 theme whose breakpoints come from the tokens, with a phone style such as text-hero-phone beside each text style that steps down on a phone, used as text-hero-phone tablet:text-hero. A system ux-skill did not write keeps its names, and each token outside Tailwind 4's theme namespaces gets a variable in the one its name and type say (a shadow named for text as a text-shadow variable); what fits none, such as a duration, which no Tailwind theme variable sets, is listed at the top of the file and in outside_namespaces. tokens.json does not record which scheme opens first, so for a system that opens dark pass --scheme dark (or light); a stylesheet keeps the scheme it opens. For Figma, run figma-variables.js through the Figma tool in the file that owns the system: one collection per foundation with its modes, primitives hidden, roles aliasing them, matched by name so a second run updates in place. Without --out the export writes nothing and reports each file and its size.
A field a tool does not take is reported with the nearest one it does, never ignored.
contracts check reads the system in any format the import reads, through --mapping or the mapping.json beside the system, and checks each contract's schema, every role it binds and every pairing it declares, in every mode.
Over MCP, call ux_system_extend, ux_system_export and ux_contracts_check with absolute paths. Extend takes source, out (required), mapping, add, add_role, add_modes, contracts, brand, axes or brief (an object), latin_only and force; export takes to, scheme and include_files, which returns the texts, but prefer out; the check takes folder, tokens and mapping.
Everything from here to the end of this file is the 3.x flow, unchanged. It runs when /ux-system is called with no mode, and its rules hold for this flow only. /ux-design page mode never runs it: page mode builds its tokens with system build (create mode above).
Before anything else, read references/process/discovery-protocol.md and run its intake. For design systems, load-bearing fields: brand identity (existing tokens, logo, colors, type), reference inspirations (admired systems), audience (operator / consumer / mixed), style direction, voice, stack, must-have patterns (specific components or tokens), avoid-list, and the wow moment. Group into 2 messages. Skip only on --skip-discovery or full-spec input. Without the wow moment, push back.
Required:
design-system/ in the target project root; configurableIf anything's missing, ask once: "Source material (brief / site / 'your call'), target stack, and output path? Or say 'defaults' and I'll pick."
Read before dispatching:
references/styles/anti-slop.md — bans the architect must respectreferences/styles/arsenal.md — patterns the components should supportreferences/system/foundations.md if present — house style for foundationsdesign-system/ files in the target — do not overwrite, propose alongsideSystem-level dials drive the architect:
Call design-system-architect via Task. Pass:
references/styles/anti-slop.mdcommands/ux-design.md), imagery rules, data viz palette[data-theme], no JS for the toggle beyond setting the attribute─── system brief ───
Source: <brand brief or derived-from source>
Stack: <stack>
Output: <path>
Dials: DESIGN_VARIANCE=<n>, MOTION_INTENSITY=<n>, VISUAL_DENSITY=<n>
─── token highlights ───
Brand accent: <hex + name>
Neutral scale: <range>
Type scale: <smallest>–<largest>, <n> steps
Spacing scale: <unit>, <n> steps
Radius: <values>
Motion: <durations>, <easings>
─── files written ───
<tree of files with one-line purpose each>
─── self-review ───
Bans avoided: <list>
Decisions made: <2-3 key taste calls the architect made>
─── next ───
Recommended: /ux-component (build components against the new system)
Other moves: /ux-design (build a page against the system)
/ux-a11y (audit the token contrast)
/ux-next (let me decide)
Write to .ux/last-system.json:
{
"command": "ux-system",
"timestamp": "<ISO8601>",
"source": "<source>",
"stack": "<stack>",
"output_path": "<path>",
"dials": { "variance": <n>, "motion": <n>, "density": <n> },
"tokens": {
"brand_accent": "<hex>",
"neutral_scale_steps": <n>,
"type_scale_steps": <n>,
"spacing_scale_unit": "<unit>"
},
"files_written": ["<paths>"]
}
#000) anywhere in the neutral scale. Start at Zinc-950 or darker-but-not-black.commands/ux-design.md (Hard rules, Icons): the client's own set, else inline SVG line icons stroked and sized by the type.icon roles.| Error condition | Recovery |
|---|---|
| Existing partial system detected | It is fixed input: extend it in a separate extension file in its own naming (see commands/ux-design.md step 1a); never overwrite or replace it |
| Brand brief missing | Reuse brand library from references/brands/ if a brand was named; otherwise ask the user to paste a brief or pick "your call" |
| Source material is a screenshot only | Extract tokens visually with stated uncertainty; flag derived tokens for user confirmation |
| Target stack unclear | Ask for the stack before dispatching the architect — token output format is stack-dependent |
| Output path collides with existing files | Stop and ask the user; never silently overwrite |
| Architect returns a single CSS file instead of a structured system | Reject and redo with the structured-output instruction restated |
For path issues: see references/process/discovery-protocol.md for state file location (.ux/ in project root). Report bugs at https://github.com/Laith0003/ux-skill/issues.
After /ux-system:
/ux-component — build components against the new system/ux-design — build a page against the new system/ux-a11y — audit token contrast pairs/ux-next — let the conductor pickBefore generating any output, the LLM running this command MUST shell to the v2 Python engine to ground the work in structured data. This is not optional — running without the preamble means generating from training-data defaults (the slop signal).
test -f .ux/last-discovery.json && cat .ux/last-discovery.json
If the file doesn't exist, run /ux-discover first. Do NOT proceed without a complete 10-field brief.
python3 -m engine.cli.main --no-pretty recommend \
--brief-file=.ux/last-discovery.json > .ux/last-recommendation.json 2>/dev/null \
|| echo "engine not installed — falling back to v1 prose-only mode"
Inspect the recommendation:
cat .ux/last-recommendation.json | python3 -c "
import json, sys
r = json.load(sys.stdin)
print('STYLE: ', (r.get('style') or {}).get('name'))
print('PALETTE: ', (r.get('palette') or {}).get('name'))
print('TYPE: ', (r.get('type_pair') or {}).get('name'))
print('MOTION: ', [m['id'] for m in r.get('motion', [])[:5]])
print('COMPS: ', [c['id'] for c in r.get('components', [])[:6]])
print('BRANDS: ', [b['id'] for b in r.get('brand_exemplars', [])[:5]])
print('GUARDRAILS:', len(r.get('guardrails', [])), 'anti-pattern rules active')
"
When system detect found an existing design system, its tokens win and the recommendation's palette and type_pair are marked "status": "suggestion"; use them only for gaps. Otherwise the engine's picks are constraints:
style.tokens are the design vocabulary you generate frompalette.colors are the only color tokens usedtype_pair is the only typography (display + body + mono)guardrails are checked-against during generation — do NOT emit code that matches any anti-pattern regexbrand_exemplars are the visual reference for tasteUse the picked style and palette as the system foundation. Generate tokens.css via python3 -m engine.cli.main generate --brief-file=.ux/last-discovery.json --out-dir=./generated-system which produces tokens.css + manifest.json. Then dispatch design-system-architect to expand into component contracts + foundation docs that consume those tokens.
python3 -m engine.cli.main --no-pretty lint <output-paths> --threshold high
Exit code non-zero means a high+ finding landed in your output. Fix before declaring done.
If python3 -m engine.cli.main is not on PATH (user hasn't installed v2 yet), fall back to v1 prose-only behavior using references/foundations/*.md as the source of taste. The output quality will be lower but the command still works.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub laith0003/ux-skill --plugin ux25 commands in this plugin
/ux-a11y/ux-a11yWCAG 2.1 AA accessibility audit plus common-courtesy checks beyond the spec. Produces findings grouped by WCAG criterion with severity, evidence, and fix. Triggers on "accessibility check", "WCAG audit", "is this accessible", or "a11y review". Use when WCAG 2.1 AA audit, checking accessibility on a page or component, verifying contrast / keyboard / screen reader / focus / ARIA / motion preferences / form-error patterns, pre-ship accessibility gate. Skip when the surface is not user-facing, backend or infrastructure work, work-in-progress sketches that aren't ready for an a11y audit (use ux-critique for an early taste call)./ux-audit/ux-auditFull 6-lens UX review of a surface. Outputs a structured Polaris-style report with findings, severity, evidence, and fixes. Triggers on "audit", "review the ux", "is this any good", or "what's broken". Use when auditing UX on a page or surface, running a structured UX review, the user asks "is this any good", checking against Norman / Krug / Laws of UX, producing a Polaris-style severity-tagged report. Skip when the surface doesn't exist yet (use ux-design for new builds), the user wants only one lens (use the targeted command — ux-a11y / ux-copy / ux-motion / ux-polish), backend-only work, infrastructure./ux-case-study/ux-case-studyGenerate a project case study in pure-monochrome editorial format. Triggers on "write a case study", "case study this project", "do the wrap-up doc". Use when writing a project case study, shipping a publishable monochrome editorial document, ending a project with a case-study artifact, producing the (A)–(G) section format in pure monochrome. Skip when the project lacks the data to populate (A)–(G) sections, the user wants a marketing landing not a case study (use ux-design)./ux-component/ux-component (alias)Moved to /ux-design --component. Alias kept until 4.1./ux-copy/ux-copyMicrocopy review and rewrite against the voice rubric. Produces a before/after table with severity per string and a clean rewrite block. Triggers on "review the copy", "fix the microcopy", "the error messages are bad", or "rewrite this". Use when reviewing or rewriting microcopy, fixing error messages that sound like AI, tightening empty/loading/success state copy, checking CTAs against the voice rubric, auditing forms for label / helper / error patterns. Skip when the surface has no user-facing strings (use ux-audit for the whole surface), the copy is auto-generated from data with no editorial layer, backend or infrastructure./ux-critique/ux-critiqueOpen-ended taste call on a specific surface. Not a structured audit — a designer's opinion. Returns 3 wins, 3 misses, and 1 strategic move. Triggers on "what do you think", "is this good", "critique this", or "honest take". Use when open-ended taste call, the user asks "what do you think", design review without a structured checklist, producing the 3-wins + 3-misses + 1-strategic-move format. Skip when the user explicitly wants a structured audit (use ux-audit instead), the surface is missing context for taste judgment, backend or infrastructure work.Other plugins' commands for the same job