К основному содержанию
команда CX Codex

ux-design — команда для Claude Code: что делает и как установить

Команда ux-design генерирует интерфейсы страниц, дашбордов и компонентов по брифу или скриншоту без шаблонного визуального мусора. Сохраняет артефакты в .ux/ и проверяет мобильную адаптивность.

MIT ★ 110 обновлён 2026-11-02

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add Laith0003/ux-skill
/plugin install ux@ux-skill
Открыть на GitHub

Что делает ux-design

Команда запускает генерацию интерфейсов в четырёх режимах: страница по умолчанию, отдельный элемент через флаг --component, интерфейс аналитики через --dashboard или перенос макета по скриншоту через --from-image. Флаги комбинируются: например, связка --from-image ref.png --dashboard сначала считывает изображение, а затем строит панель управления. Все результаты и параметры фиксируются в JSON-файлах каталога .ux/.

В пайплайн заложены сбор требований, калибровка параметров визуальной плотности и вариативности, вёрстка с защитой от шаблонного дизайна и проверка мобильной сетки без горизонтальной прокрутки. К генерации подключаются субагенты frontend-engineer, motion-engineer и copy-writer. На этапе опроса генератор отклонит бриф без выразительного акцента, если запуск выполнен без флага --skip-discovery.

Какие задачи решает

  • сверстать посадочную страницу без клише стандартного ИИ-дизайна
  • собрать изолированный компонент со всеми состояниями взаимодействия
  • сгенерировать панель аналитики или консоль оператора по флагу --dashboard
  • разобрать референсный скриншот в кодовую структуру через --from-image
  • проверить вёрстку на отсутствие горизонтального скролла на экранах смартфонов

Примеры запросов агенту

  • /ux-design --component navbar сделай адаптивное верхнее меню на Svelte
  • /ux-design --dashboard создай экран аналитики заказов
  • /ux-design --from-image screens/ref.png собери первый экран лендинга

Как установить ux-design

1Через маркетплейс плагинов

/plugin marketplace add Laith0003/ux-skill
/plugin install ux@ux-skill

2Вручную: положить файлы

.claude/commands/ux-design.md

Вызов — /ux-design. Для всех проектов — ~/.claude/commands/

Вопросы об ux-design

Как установить ux-design в Claude Code?

Установка выполняется через каталог плагинов Claude Code: сначала выполните команду /plugin marketplace add Laith0003/ux-skill, затем запустите /plugin install ux@ux-skill.

Что делает команда ux-design?

Она генерирует код веб-страниц, аналитических панелей или отдельных элементов интерфейса по брифу и референсам, отсекая шаблонную стилистику ИИ и проверяя мобильную адаптивность.

Как разобрать дизайн со скриншота без сборки кода?

Запустите команду с флагами --from-image <path> и --extract-only. В этом режиме генератор прочитает графику и выведет извлечённую структуру макета в JSON без вёрстки итогового интерфейса.

Исходный текст

ux-design.md · MIT
---
description: Build a page, a component (--component), a dashboard (--dashboard), or a design from a reference image (--from-image) from a brief, with anti-AI-slop discipline. The brief picks the mode when no flag is given.
allowed-tools: Read, Write, Edit, Bash(ls:*), Bash(cat:*), Bash(find:*), Bash(mkdir:*), Bash(python3:*), Glob, Grep, Task
disable-model-invocation: false
---

# /ux-design

You are running the `/ux-design` command from the `ux` plugin. The job is to generate a beautiful, high-end design or component from a brief — and explicitly NOT produce AI-slop output.

## When to use

Triggers: "design a", "build me a", "generate a landing page", "create a dashboard", "make a component", "I need a hero section", "design a modal", "build a button", "design the admin panel", "build it like this screenshot", any free-form request for a visual/UI deliverable.

## Modes

`/ux-design` builds four kinds of output. It absorbs what used to be `/ux-component`, `/ux-dashboard` and `/ux-image-to-code`; those names still work as aliases until 4.1.

| Mode | Flag | Picked from the brief when | State file |
|---|---|---|---|
| page (default) | none | A page, a landing, a multi-section surface, a marketing page with stats | `.ux/last-design.json` |
| component | `--component [name]` | The brief names ONE element: button, modal, navbar, sidebar, card, table, form, chart. Not a full page | `.ux/last-component.json` |
| dashboard | `--dashboard` | Dashboard, admin panel, metrics page, operator console, analytics view, KPI board, monitoring screen | `.ux/last-dashboard.json` |
| image | `--from-image <path>` | The brief attaches a design image (PNG, JPG, WebP) or names one | `.ux/last-image-extract.json`, then the state file of the build mode |

A flag always wins over the words. Image mode stacks with the others: `--from-image ref.png --dashboard` reads the image, then builds a dashboard. Say which mode you picked in the first line of the output so the user can stop you.

Every mode runs the same Process below (discovery, references, dials, build, output, state) and the engine steps (brief, brand, suggestions, section sequence, tokens, generation, lint, responsive gate, brand floor). Some shared steps are page steps only. This table says which apply per mode; the mode sections list only what else changes.

| Shared step | page | component | dashboard |
|---|---|---|---|
| engine step 2.5 page-level section sequence, and the section sequence in step 4 | yes | no | no |
| WOW layer, hero moment (step 2) | yes | no | no |
| WOW layer, motion signature and section moment (step 2) | yes | yes | yes |
| SEO section | yes | no | no |
| Responsive gate (a) no horizontal scroll and (e) sticky chrome height | yes | yes | yes |
| Responsive gate (b) nav one row, (c) wordmark and CTA labels one line, (d) nav children do not collide, (f) the primary action on the first phone screen | yes | no | no |
| Lint and brand-fidelity floor | yes | yes | yes |

Image mode follows the column of the build mode it stacks with. A component or dashboard run that skips gate checks (b) to (d) and (f) is not DEGRADED for their absence; the gate is (a) and (e) for those modes.

| Flag | Meaning |
|---|---|
| `--component [name]` | Component mode |
| `--dashboard` | Dashboard mode |
| `--from-image <path>` | Image mode: read the image first. The path is the first argument that is not a flag, wherever it sits, so `--from-image --no-recommendation ref.png` reads `ref.png` |
| `--extract-only` | Image mode: stop after the extraction and print its JSON. No build |
| `--no-recommendation` | Image mode: hints only, no recommender run. Implies `--extract-only` |
| `--save <path>` | Image mode: where to write the extraction (default `.ux/last-image-extract.json`; empty string skips the write) |
| `--skip-discovery` | Skip the discovery intake (see step 1) |

### Component mode (`--component`)

The job is a single, production-grade component that avoids generic AI aesthetics. One component, fully realized: all four interaction states, accessible, on-brand. If the brief asks for a full page or multi-section surface, switch to page mode.

Triggers: "build a button", "create a pricing card", "make a modal", "add a navbar", "design a sidebar", "I need a data table", "build a form", "make a chart component", or any single-element request.

**Discovery (step 1).** Focus on: brand identity, 2-3 references for the component type, audience, style direction, voice, stack, imagery (if applicable), must-have patterns, avoid list, and the wow moment for THIS component specifically. Group into one or two messages. Skip only on `--skip-discovery` or if the spec already covers every field. Without the wow moment, push back.

**Capture the spec.** Required:
- **Component type**: button / modal / navbar / sidebar / card / table / form / chart / other
- **Stack**: React + Tailwind / Vue / Svelte / Blade + Alpine / vanilla HTML / etc.
- **Brand voice**: pull from `.ux/last-frame.json` if it exists, otherwise ask one line: *"What's the voice: minimal / brutalist / editorial / playful / dark? Or 'your call'?"*

Optional but useful: specific behavior (auto-sort, multi-step, infinite scroll, drag-reorder), data shape, density target. Do not ask three questions. One question that surfaces everything missing.

**Arsenal picks (step 2).** Pick 1-2 patterns that fit. For a button: live status with overshoot, optimistic update. For a modal: contextual focus mode. For a navbar: command input, intelligent list. For a card: hairline-separated metric blocks. For a table: intelligent list, monospace tabular. For a form: inline validation with field-level @error, multi-step wizard. For a chart: monochrome + semantic state colors only.

**Dials (step 3).** DESIGN_VARIANCE 5 (4 for system components, 6 for marketing components). MOTION_INTENSITY 4 (3 for utility components, 5 for marketing components). VISUAL_DENSITY 5 (7 for tables/charts, 4 for buttons/modals).

**Build (step 4).** The build (or the optional `frontend-engineer` subagent) gets the spec verbatim, the dials, the 1-2 patterns, the full `references/styles/anti-slop.md`, the full `references/surfaces/component.md` (the playbook step 1c picks for this mode), the target stack, and an instruction to return code + self-review on bans avoided + patterns used. A `motion-engineer` subagent may run in parallel if the spec involves motion (loading states, optimistic UI, micro-interactions, transitions). A `copy-writer` subagent may run in parallel if the component has non-trivial copy (form labels, empty states, error messages, CTAs).

**Generation (engine step 4).** Look up the requested component name in `.ux/last-recommendation.json`'s `components` list. If present, generate using its `anatomy`, `states`, `tokens_used`, and `motion` fields as the spec. If not present, search `data/components.json` directly via `cat data/components.json | jq '.entries[] | select(.name | test("<name>"; "i"))'`. The page-sequence step (engine step 2.5) does not apply. The brand anchor applies as in page mode: the component must use the brand primary color, the logo where one belongs, and logo-style type, and ship real imagery when it carries visuals, or it fails the brand-fidelity floor. A house-style component for a client brand is wrong no matter how clean.

**Output (step 5).**

```
─── component spec ───
Type:       <component type>
Stack:      <stack>
Voice:      <brand voice>
Dials:      DESIGN_VARIANCE=<n>, MOTION_INTENSITY=<n>, VISUAL_DENSITY=<n>
Patterns:   <1-2 arsenal patterns>

─── generated ───
<code, verbatim>

─── interaction states ───
Default:    <description>
Hover:      <description>
Active:     <description>
Disabled:   <description>
Loading:    <description>  (if applicable)
Error:      <description>  (if applicable)
Empty:      <description>  (if applicable)

─── self-review ───
Bans avoided:    <list>
Patterns used:   <list>

─── next ───
Recommended: /ux-design --component   (build the next one)
Other moves: /ux-polish      (cosmetic pass)
             /ux-a11y        (WCAG check)
             /ux-design      (assemble into a fuller surface)
             /ux-next        (let me decide)
```

**State (step 6).** Write `.ux/last-component.json`:

```json
{
  "command": "ux-component",
  "timestamp": "<ISO8601>",
  "type": "<component type>",
  "stack": "<stack>",
  "surface": "component",
  "voice": "<voice>",
  "dials": { "variance": <n>, "motion": <n>, "density": <n> },
  "patterns": ["<arsenal patterns>"],
  "output_file": "<path if saved>"
}
```

The `command` value stays `ux-component` so `/ux-next` keeps reading it.

**Component hard rules** live in `references/surfaces/component.md` (Component build rules). They apply in addition to the shared hard rules.

**Component failure modes and errors:**

| Failure or error | Recovery |
|---|---|
| Stack unclear | Ask one combined question covering stack + voice + behavior |
| Component type ambiguous ("thing to filter stuff") | List the candidate types (table with command input / sidebar with filter chips / autocomplete combobox) and ask which one |
| Sub-agent returns the default state only | Reject and redo; all four interaction states are non-negotiable |
| Sub-agent returns the wrong stack | Catch in review, redo |
| Sub-agent says "I avoided X" but the code uses X | Grep the output. Reject and redo |
| Over-scope: a full page for a single button, or a spec that implies a full page | Trim to the requested component; offer page mode as the follow-up |
| No motion when motion was specified | Redo the build with an explicit motion brief |
| `.ux/last-frame.json` absent and voice not provided | Ask the one-line voice question above |

### Dashboard mode (`--dashboard`)

The job is a dashboard that respects data density and operator attention, not a marketing site with charts pasted on. Anti-card-overuse, monospace tabular numbers, semantic state colors, sparing motion. A marketing landing page with stats stays in page mode.

Triggers: "build a dashboard", "design the admin panel", "make a metrics page", "operator console", "analytics view", "KPI board", "monitoring screen".

**Discovery (step 1).** Highest-leverage fields: brand identity, references (admired dashboards), audience (operator / analyst / exec: different density needs), key metrics + data shape, style direction, voice for state messages, stack, must-have widgets (intelligent-list / command-input / live-status / wide-stream / contextual-focus), avoid list, and the wow moment. Group into 2-3 messages. Push back on "anything's fine".

**Capture the brief.** Required:
- **Data shape**: what entities, what metrics, what relationships. Time-series? Categorical? Hierarchical?
- **Key metrics**: the 3-7 numbers that dominate the page
- **Audience**: operator (always-on, scan-and-act) / analyst (deep dive, filter and segment) / exec (status at a glance)
- **Stack**: React + Tailwind / Next.js / Vue / Blade + Alpine / etc.

If anything's missing, ask once: *"One line: data shape, key metrics, audience (operator/analyst/exec), stack?"*

**Arsenal picks (step 2).** Pick 3-5 dashboard patterns. The five live-product archetypes (intelligent list, command input, live status, wide data stream, contextual focus) live in `references/styles/arsenal.md` (Live-product archetypes). The dashboard patterns (the archetype bento, replace cards with hairlines, compact stat tile, cockpit density) live in `references/surfaces/dashboard.md`.

**Dials (step 3).** DESIGN_VARIANCE 4 (dashboards are calmer than landings). MOTION_INTENSITY 3 (data should feel still until it changes). VISUAL_DENSITY 8 (dashboards are cockpits, not galleries).

**Build (step 4).** The build (or the optional `frontend-engineer` subagent) gets the brief verbatim, data shape + key metrics + audience, stack, dials, the 3-5 patterns, the full `references/styles/anti-slop.md`, the full `references/surfaces/dashboard.md` (the playbook step 1c picks for this mode), and an explicit instruction to follow the playbook's rules on tabular numbers, live indicators and semantic state colors. A `motion-engineer` subagent may run in parallel for live indicators and state transitions. A `copy-writer` subagent may run in parallel for empty states, error messages, and metric labels.

**Generation (engine step 4).** The page-sequence step (engine step 2.5) does not apply: no section sequence, no conversion mechanisms, no hero. Filter `components` from the recommendation for dashboard patterns (`category: Data Display`, `Charts & Viz`). Build a dashboard grid on the system's tokens in dark mode. The build gets the `chart-types.json` picks scoped to the data the user described. With a client brand, dark mode still holds, but the brand primary (not the house pick) is the accent on every state color, the logo sits in the chrome, and type matches the logo style; the dashboard must clear the brand-fidelity floor.

**Output (step 5).**

```
─── dashboard brief ───
Data shape:  <summary>
Metrics:     <3-7 key metrics>
Audience:    <operator | analyst | exec>
Stack:       <stack>
Dials:       DESIGN_VARIANCE=<n>, MOTION_INTENSITY=<n>, VISUAL_DENSITY=<n>
Patterns:    <3-5 arsenal patterns>

─── generated ───
<code, verbatim>

─── layout logic ───
Grouping:    <how widgets are grouped: border-t / divide-y / negative space>
KPI row:     <pattern used: hairline-separated / asymmetric bento / focus widget>
Live count:  <number of breathing/live indicators in initial viewport, must be ≤2>

─── self-review ───
Bans avoided:    <list>
Patterns used:   <list>
Accessibility:   <color-not-only confirmed for all chart series>

─── next ───
Recommended: /ux-design --component   (build a missing widget)
Other moves: /ux-polish      (cosmetic pass)
             /ux-a11y        (color-not-only audit for charts, contrast for tabular data)
             /ux-motion      (verify live indicators don't fight attention)
             /ux-next        (let me decide)
```

**State (step 6).** Write `.ux/last-dashboard.json`:

```json
{
  "command": "ux-dashboard",
  "timestamp": "<ISO8601>",
  "data_shape": "<summary>",
  "metrics": ["<key metrics>"],
  "audience": "<operator|analyst|exec>",
  "stack": "<stack>",
  "surface": "dashboard",
  "dials": { "variance": <n>, "motion": <n>, "density": <n> },
  "patterns": ["<arsenal patterns>"],
  "live_indicator_count": <n>,
  "output_file": "<path if saved>"
}
```

**Dashboard hard rules** live in `references/surfaces/dashboard.md` (Principles, Banned dashboard patterns and the Checklist). They apply in addition to the shared hard rules.

**Dashboard failure modes and errors:**

| Failure or error | Recovery |
|---|---|
| Card overuse: every widget in `rounded-lg shadow border` | Reject. Use hairlines and grouping |
| 3-equal-card KPI row | Reject, replace with asymmetric bento or hairline-separated blocks |
| 3 or more live indicators in the initial viewport | Reject, reduce to 2 or fewer |
| Proportional digits in metrics (numbers jitter on update) | Reject, force `tabular-nums` |
| Color-only chart series | Reject, add patterns/shapes/labels |
| Marketing gradient on the analytics page | Reject, swap to neutral + semantic accent |
| No empty/loading/error states | Reject and redo |
| Data shape missing | Ask for entities + relationships + metrics in one combined question |
| Audience unclear, or "all of them" | Ask once; density and motion defaults depend on a single primary audience, so push back until one is picked |
| More than 7 key metrics | Force a triage to the 3-7 that dominate; surface the rest as secondary |

### Image mode (`--from-image <path>`)

**Pure CV. No multimodal LLM.** Hand the engine a screenshot or a design reference; it returns a Brief, a closest-match palette, a closest-match style, and a full Recommendation. No vision model is called. Every signal is computed deterministically from pixels via Pillow.

Use it when you have a reference design (a competitor screenshot, a gallery shot, a Figma export) and want the build to go in that direction, when you want the recommendation anchored on a real image instead of a typed brief, or when you want to check the engine's read on a design before generating code. Skip it when the reference is text (a written brief, a PRD: use `/ux-discover`), or when you want pixel-perfect cloning: this is a HINT generator, not a copy-paste tool.

**1. Extract.**

```bash
python3 -m engine.cli.main image-extract path/to/reference.png [--no-recommendation] [--save .ux/last-image-extract.json]
```

What happens, step by step:

1. **Decode + downsample**: Pillow opens the image and resizes the long edge to 512px to keep quantization fast.
2. **Quantize to 5 colors**: `Image.quantize(colors=5, method=MAXCOVERAGE)` finds the dominant tones (a deterministic palette reduction, equivalent in shape to a small k-means but without sklearn).
3. **Canvas polarity**: average luminance under the sRGB curve. Above 0.5 is light; below is dark.
4. **Type polarity**: ratio of `EDGE_ENHANCE_MORE` variance to `EMBOSS` variance. High ratio leans serif, low leans sans, between is `unknown`.
5. **Aspect + density**: `FIND_EDGES` followed by binarization gives a coarse "edge fraction." Lots of edges means a dense layout (dashboard, dense editorial); few edges means an airy hero.
6. **Match against manifests**: for each palette in `data/palettes.json`, sum the nearest-neighbour distances between the extracted 5 colors and the palette's canvas/surface/ink/primary anchors. Lowest sum wins.
7. **Style fit**: bias styles whose id/category contains "dark"/"cinema"/"luxe" for dark canvas, "swiss"/"editorial"/"minimal" for light canvas. Boost styles that appear in the matched palette's `compatible_styles`.
8. **Synthetic Brief, then recommend**: pack the hints into a `Brief` and run the recommender to produce a complete system.

The result is JSON with `image`, `brief`, `hints` (`dominant_colors`, `canvas_polarity`, `type_polarity`, `aspect`, `matched_palette_id`, `matched_palette_name`, `matched_style_id`, `matched_style_name`), `recommendation`, and `saved_to`. The same pipeline is the MCP tool `ux_image_extract` (`{"path": "/abs/path/to/reference.png", "with_recommendation": true}`), and in Python:

```python
from engine.image_extract import image_to_brief
from engine.recommender import Brief, recommend

result = image_to_brief("reference.png")
rec = recommend(Brief(**result["brief"]))
```

**2. Report the read.** Tell the user in one short block what the engine sees: canvas polarity, type polarity, dominant colors, matched palette and matched style. With `--extract-only` or `--no-recommendation`, print the JSON and stop.

**3. Build.** Otherwise continue into the build mode (page by default, or `--component` / `--dashboard`). Use the extraction's `recommendation` in place of the engine step 2 `recommend` call, and its `brief` to fill discovery fields the user has not answered. For more control, edit the saved file and rerun the recommender on it: `python3 -m engine.cli.main recommend --brief-file .ux/last-image-extract.json`.

**Brand anchor.** The uploaded image IS the brand source. When the build should match the source's identity rather than the house style, extract the brand from it first (engine step 1.5: capture the logo color/type from the image into `.ux/brand-signals.json`, then `uxskill brand --signals-file .ux/brand-signals.json --out .ux`) so the build inherits the source's primary color, logo, and logo-style type. The CV `hints` are color and polarity only; the travelling brand carries the logo and type intent the recommender enforces.

**Default forbidden list.** The synthetic brief auto-populates `forbidden` with the project-wide taste guardrails: `yellow`, `amber`, `gold`, `cream`, `coral`, `cormorant`. The extraction is for COLOR and POLARITY hints; the forbidden vocabulary is a separate policy decision the engine respects regardless of what the image suggests. To override it, edit `.ux/last-image-extract.json`, remove items from `brief.forbidden`, and rerun the recommender on that file.

**Limitations (say these when they matter):**
- **Type polarity is a guess.** It samples edge-filter variance ratios; that correlates with serif vs sans-serif but is not OCR.
- **The matched palette is the closest in our manifest, not the closest globally.** If the reference uses colors no palette covers, the match picks the least-bad neighbour.
- **No layout reconstruction.** The engine reads color, light and edge density. It does NOT read grid structure, component boundaries, or copy. Layout comes from the brief and the page sequence, not the image.
- **No multimodal LLM is consulted.** That is the point: it stays cheap, deterministic, and offline.

## Process

### 1. Run the discovery protocol (MANDATORY)

**Never improvise.** Before doing anything else, read `references/process/discovery-protocol.md` and run its 10-field intake on the user. The output of every generation command is downstream of the inputs — improvisation is the single biggest source of mediocre, generic results.

The 10 required fields are:
1. **Brand identity** — pasted brand brief, design tokens, logo files, or "no brand"
2. **Reference inspirations** — 3–5 URLs/screenshots of designs the user LIKES (for aesthetic, not features)
3. **Product type & audience** — one sentence
4. **Style direction** — minimalist / industrial / high-end-visual / editorial / dev-tool-dark / playful / your-call
5. **Voice** — direct, warm, brief / technical / friendly / editorial / playful / from brand
6. **Stack** — React+Tailwind / Next.js / Vue / Blade+Alpine / vanilla / Astro / "what we have"
7. **Imagery sources** — real screenshots / brand photos / placeholders / described generations
8. **Must-have patterns** — terminal mock / bento / interactive demo / specific arsenal pattern / freely pick
9. **Avoid list** — user's personal taste hard-rules beyond standard anti-slop
10. **The wow moment** — the ONE thing this design must do that lifts it above generic

**Delivery rules**:
- Group into 2–3 messages of 3–4 questions each. NEVER all 10 at once.
- First message: brand + references + audience (highest-leverage).
- Second message: style + voice + stack.
- Third message: imagery + must-haves + avoid + wow.
- Wait for each batch's answer before sending the next.

**Skip conditions** (the only ones):
- User passes `--skip-discovery` flag.
- User's first message already covers ALL 10 fields. Verify it does; if anything's missing, ask only for the missing fields.
- User is iterating on a prior design (read `.ux/last-discovery.json`; ask only what's changed).
- The project answers a field already. A brand book, a voice or facts sheet, the brand's own pages and templates, or an existing design system: each field they answer is taken from them and not asked. Ask only what they leave open. The wow moment counts too: a signature move the brand's pages already make is the answer.

**After collecting answers**: write `.ux/last-discovery.json` with the full discovery payload (the file /ux-discover writes), with a `sources` map naming, per field, the file its answer came from (or `user`). Echo a 2-sentence summary back to the user before generating, so they can stop you if their intent did not land, and say there where each answer came from.

A page is not built without a wow moment: the user's, the one the brand's pages already make, or one derived per `references/foundations/wow.md`. When the user says "anything's fine", derive it and say which you chose.

### Page mode, in order

Page mode runs these steps in this order; the sections below give the detail of each.

1. **Discovery** (Process step 1) writes `.ux/last-discovery.json`.
2. **The system brief.** Write `.ux/system-brief.json`: the discovery answers plus the structured fields /ux-system reads (`industry`, `brand_role`, `product_type` and the others it lists, filled from what the user said) and the page fields engine step 2.5 reads (`proof`, `contact`, `stage`, `page`, `platforms`, `sign_in`, `primary_side`, `primary_action`, `commitment`, `arrival`, `objections`). Every later step reads this file.
3. **Brand** (engine step 1.5): extract it from the client's material, or, with no brand material, ask for one hex, as /ux-system create mode does.
4. **System**: `system detect` (step 1a); when it finds none, `system build` from that hex and that brief (step 1b).
4a. **Page style** (step 1a.1): the brand's own pages and content register, read before any look is chosen.
5. **Suggestions** (engine step 2), only when no system existed before step 4.
6. **Sequence**: `select_for_brief` (engine step 2.5).
7. **Build** (Process steps 2 to 4, engine steps 3 and 4), then the gates (engine step 5), the output and the state (Process steps 5 and 6).

### 1a. An existing design system is fixed input

Before any engine pick, run `python3 -m engine.cli.main --no-pretty system detect --root .`. It looks for a DTCG or `tokens.json` file, a token build script, CSS custom-property foundation files, a hand-written `MASTER.md` or `DESIGN.md`, a `design-system/` folder or a `packages/tokens` folder. When `found` is true:

1. The page's tokens come from that system. Link its built CSS; if the build output is missing, run its build script. Use its custom properties by their own names.
2. Skip the engine's palette, type pair and every `recommend` pick for color and type (Step 3 reads them as suggestions only). Skip `ux design-md`; with `--from-system` it only mirrors the system.
3. Never edit, overwrite or re-derive the system's files. `ux persist save` writes beside a hand-written MASTER.md.
5. Pass `detect`'s `declared` block into the brand step: the declared primary beats logo pixels.

### 1a.1. The brand's own pages set the page style

Page mode, right after step 1a and before any composition, dial or sequence alternative is chosen. A system holds the tokens; the brand's pages show how it builds a page with them.

1. **Find the pages.** Look in the project for a marketing site or app views: a site app, templates (Blade, Twig, Jinja, Liquid, JSX, Vue, Astro), built HTML, screenshots kept in the repo. Open the live site when the brief names one.
2. **Record the page style as facts** in `.ux/page-style.json`, each fact with the file it came from. A fact no file shows is left out, never guessed; with no brand pages the file says so and records no facts:

| Fact | What it records |
|---|---|
| `scheme` | The scheme the pages open in. A dark default counts: the new page opens dark too |
| `rhythm` | The gap between sections as the pages set it, and how sections meet: overlapping, a radius at the join, full-bleed bands |
| `panels` | The colors of panels and bands, by the system's own variable names |
| `headlines` | The headline sizes the pages really use, which can run above the token scale |
| `density` | How much one screen holds, such as one idea per screen |
| `imagery` | Photographs, the product's own screens, or none |
| `color_use` | Reserved (the brand color on a few actions) or flooded (bands filled with it) |

3. **The page follows these facts.** The engine's defaults (composition, landing gap, display size, dials) apply only where the brand has no page to read; name each default used and why.
4. **Find the content register.** Look for a voice sheet, a facts file, a list of banned words, a register or dialect rule, currency rules: in the brand book, a content or copy folder, the translation files. When one exists, every public string follows it (headlines, buttons, errors, alt text, meta tags), `.ux/page-style.json` names it as `register`, and the self-review says which file the copy followed. A string it does not cover is written in its manner and listed for the owner.
5. **Read the dials from the brand.** With an existing system, DESIGN_VARIANCE, MOTION_INTENSITY and VISUAL_DENSITY come from these facts and the brand book, never from the defaults in step 3: a quiet brand gets quiet dials. Record each dial with the fact that set it.

### 1b. The design system is the contract

When step 1a found a system (a hand-written `DESIGN.md` counts), that system is the contract. When it found none, build one before any page code, the /ux-system way: `uxskill --no-pretty system build --brand '<hex>' --brief .ux/system-brief.json --out design-system --rule-pack`. Take the hex from the client's own material (engine step 1.5), or the one hex the user gave when there is no brand material; fill the brief's structured fields as /ux-system describes, including `brand_role` from how the client's own material uses the brand. Link `design-system/tokens.css` and `fonts.css`, and load the rule-pack files `design-system/rule-pack/README.md` names for a landing page. The built tokens are the only tokens (engine step 3).

### 1c. Pick exactly one surface playbook

Surface-specific rules live in playbooks under `references/surfaces/`. The mode (see Modes) decides the playbook, so pick exactly one:

| Mode | Playbook |
|---|---|
| page, when the page explains, sells or converts: landing page, homepage, launch, waitlist, pricing, service or lead-gen page | `references/surfaces/landing.md` |
| page, any other page: signed-in app screen, docs, portfolio, email | none |
| component | `references/surfaces/component.md` |
| dashboard | `references/surfaces/dashboard.md` |
| image | the playbook of the build mode it stacks with; none with `--extract-only` |

Load only the playbook you picked. Never load two surface playbooks. The one-playbook rule applies to surface playbooks only: component contracts (`references/foundations/component-behaviors.md`, `references/components/library.md`, `references/foundations/components.md`) and the shared foundations still load when a build needs them, so a landing page with a quote form or a comparison table reads the form and data table contracts. A brief that straddles two surfaces gets its...

© Laith Aljunaidy · MIT · Laith0003/ux-skill

Похожие слэш-команды

Все слэш-команды по теме «Фронтенд и UI» →
octopus-ui-ux-design nyldn Скилл octopus-ui-ux-design проектирует UI/UX-системы с гайдами, палитрами, типографикой и спецификациями компонентов. Использует встроенный BM25-поиск по базе дизайн-паттернов. CX Codex +1 ★ 1 596звёзд репо frontend-design-pro BuildWithClaude Community Плагин frontend-design-pro ведёт от исследования визуального направления до генерации и проверки HTML. Подходит для лендингов и других frontend-задач. ★ 3 785звёзд репо anti-slop-design wwewtech Скилл anti-slop-design для Claude Code помогает переделать шаблонный интерфейс и проверить его визуальную иерархию. Запускается при работе с веб-интерфейсом, CSS и Tailwind или по просьбе исправить дизайн. CX Codex +1 ★ 85звёзд репо antigravity-design-expert sickn33 Скилл antigravity-design-expert для Claude Code, создающий интерактивные веб-интерфейсы с эффектами глубины, стеклом и плавной анимацией. Включается при разработке компонентов с 3D-трансформациями и glassmorphism. CX Codex +1 936установок webui-design notivn Скилл webui-design для Claude Code задаёт правила оформления дашборда AI Edit Video: три размера текста, токены цветов и общие примитивы. Агент читает его перед любой правкой интерфейса в apps/web. CX Codex +1 ★ 147звёзд репо dashboard-design Otabek Abdiraimov Скилл dashboard-design для Claude Code задаёт правила проектирования дашбордов для веба и SwiftUI. Включается при создании, редизайне или аудите экранов аналитики, выручки и метрик. CX Codex +1 ★ 1 073звёзд репо

Из того же набора31

Весь набор →
ux-a11y Команда ux-a11y проверяет страницу или компонент на соответствие WCAG 2.1 AA и находит проблемы, которые не ловят автоматические сканеры. Запускается перед релизом или после редизайна, чтобы отловить регрессии доступности. CX Codex +1 ★ 110звёзд репо ux-fix Команда ux-fix запускает цикл исправлений по свежему UX-отчёту, распределяет задачи по субагентам и оформляет атомарные коммиты в Git. CX Codex +1 ★ 110звёзд репо ux-motion Команда ux-motion проверяет анимации интерфейса: время, кривые ускорения, смысл, поддержку reduced motion и производительность. Запускайте, когда переходы кажутся неуместными или требуют проверки. CX Codex +1 ★ 110звёзд репо design-system-architect Субагент design-system-architect собирает дизайн-систему целиком: токены, базовые документы и контракты компонентов. Подключается командами /ux-system и /ux-design --component, если системы в проекте ещё нет. CX Codex ★ 110звёзд репо ux-polish Команда ux-polish для Claude Code доводит готовую вёрстку перед релизом: проверяет токены и отступы, удаляет шаблонные артефакты нейросетей. CX Codex +1 ★ 110звёзд репо ux-lint Команда ux-lint для Claude Code ищет в файлах проекта шаблонные AI-формулировки по регулярным выражениям. Её запускают перед коммитом или в CI для проверки UI-текстов. CX Codex +1 ★ 110звёзд репо frontend-engineer Субагент frontend-engineer для Claude Code, который пишет фронтенд-код по брифу и креативному направлению от вызывающей команды. Годится, когда нужен код, отличимый от типовой генерации. CX Codex ★ 110звёзд репо ux Плагин задаёт правила для UX и UI-кодинга: синтезирует дизайн-язык, проверяет интерфейс линтером и запускает команды для аудита, доступности и компонентов. ★ 110звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой