From ux
Proposes a complete starter design system — tokens, foundations, component contracts, dark mode pairings, and theme switcher — from a brand brief, existing site, or explicit request.
How this command is triggered — by the user, by Claude, or both
Slash command
/ux:ux-systemThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# /ux-system 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. ## When to use 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 run this. Recommend `/ux-component` against the existing system instead....
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 run this. Recommend /ux-component against the existing system instead.
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.md[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.| Error condition | Recovery |
|---|---|
| Existing partial system detected | Ask whether to extend or replace; never silently overwrite |
| 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')
"
The engine's picks are not suggestions — they're 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.
npx claudepluginhub laith0003/ux-skill --plugin ux/design-system-setupInitializes design system with tokens, patterns, and docs via interactive prompts for colors, modes, fonts, spacing. Supports --preset minimal|standard|comprehensive; detects/integrates existing setups.
/ux-briefGenerates junior-dev-ready design system documents for a component, page, or feature through guided discovery questions and context analysis.
/design-systemGenerates design tokens and theme configuration from a brand color, Figma URL, or by extracting an existing project's design system. Also supports extracting from code or Figma files.
/ux-designCreates a complete design system with foundations, brand identity, and UX patterns through guided collaboration.
/design-htmlCreates or edits an HTML design system via guided wizard, defining visual tokens and component catalog from brand philosophy.
/design-componentGenerate a single component. Skips browsing. Uses existing design-system.md tokens + Gemini snippet_frontend. Fast path for isolated UI elements.