/luismc-docs:design-system-setupfrom luismc-docs
Set up and version a project's design system in docs/design-system (DOCSPEC section 15): UX rules, tokens, components, the review gallery and guard tests. Use to start, version, approve or promote a design system, add UX rules or tokens, or build the review gallery.
Ships in luismc-docs. 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.
Runs scripts/design_system.py from the luismc-docs plugin (DOCSPEC section 15). Every command is a dry run until --apply.
This setup follows section 13 of docs/guides/shared-self-hosted-runners.md.
status and styles, then show one plan: the folders and files init will create under docs/design-system/ and scripts/design/ (with paths), the starter tokens it may replace with the project's own values, the test runner file it will edit to include the guard tests, that nothing is written outside the repository, for a project with a numbered version (v1 or later) the enforcement kit (below), included by default, with the owner's choice to decline it; the app and shared UI folders you will write to .delivery/config.json (design_system.app_paths, design_system.shared_paths), asked in the same plan; the marked checklist block brief will write into AGENTS.md and .github/pull_request_template.md; for a React and TypeScript project whose screens enter dates, times or numbers, the optional shared component templates (below) as one line with the choice of components and folder; what needs the owner (a yes, the choice to use the found style values, the approval of a version) and about how long it takes (a few minutes). Ask for one yes.init --apply, guards --apply, the CONFIG edit at the top of design-system-follow.test.ts (source roots, extensions, token files, taken from the styles output), the edit that makes the test runner include scripts/design/*.test.ts, visuals, check, brief --apply (idempotent: it writes the checklist as a marked block and refreshes it on a rerun) and, when the kit is in the plan, the kit steps below. Leave to the owner only what you cannot do: approving a version (promote, approve-implementation), which needs their date and evidence, and the commit and push. Give each an exact step and check it afterwards.next-version/review-visuals/index.html, what to look at, the promote command with the approval words). What you can do now: design_system.py status (see versions and approvals), design_system.py visuals (rebuild the gallery after a token change), design_system.py check (run the DS1-DS5 findings), the guard tests (run them with the project's test runner), and promote once the owner approves. Give each one line with an example.init never overwrites) and changes only what is missing.S="${CLAUDE_PLUGIN_ROOT}/scripts/design_system.py"
python3 "$S" init --apply # docs/design-system/: README, approvals.json, next-version/ (never overwrites)
python3 "$S" styles # read-only: style files and CSS custom properties the project already has
python3 "$S" guards --apply # guard tests into scripts/design/ (--stack typescript-vitest, --dest DIR)
python3 "$S" visuals # rebuild next-version/review-visuals/index.html: offline gallery with drawn swatches, contrast and every component (the session-start and stop hooks now do this when it is stale; running it by hand still works)
python3 "$S" check # DS1-DS6 findings (DS4 also flags a gallery from an older script); docs_check.py runs the same
python3 "$S" components --apply # opt-in: DatePicker, TimePicker, NumberKeypad (React + TypeScript) into src/ui/pickers, with their components.md sections and content.md words (--only, --dest)
python3 "$S" brief --apply # UI brief checklist as a marked block in AGENTS.md and .github/pull_request_template.md; rerun refreshes it
python3 "$S" status # versions, the enforced one, approvals
python3 "$S" promote --approved-by owner --approved-on 2026-11-02 --evidence "chat, 2026-11-02" # dry run; add --apply
python3 "$S" approve-implementation v1 --approved-on 2026-11-20 --evidence "chat" --apply
init writes a project-neutral starter (every item is a starter item to keep, change or delete before v1 is approved). Then read the project's own styles:
design_system.py styles. It lists design-token files, theme and Tailwind configuration, and CSS custom properties. It changes nothing.next-version/tokens.md (colours, fonts, spacing, radius). Keep the token names. Check WCAG 2.2 AA contrast of the new pairs. Add a CHANGES.md entry and rebuild the gallery.next-version/; write a CHANGES.md entry (- C<n>: ...) and rebuild the gallery.v1, v2 ...): it is read-only after approval and its digest is in approvals.json.promote or approve-implementation on your own judgment: you need the owner's approval date and where it was given (the chat, a comment) and you pass them as --approved-on and --evidence. Show the gallery to the owner first. It draws colour swatches with WCAG contrast, type, spacing and radius samples, and every component, light and dark side by side. Read its "Token gaps", "Contrast failures" and "Not drawn" lists before you show it. Rebuild next-version only; a numbered version is never rebuilt.CORE-1 to CORE-7, binding, at the top of ux-rules.md; never deleted, never counted as starter items). docs_check warns (DS6) when next-version/ux-rules.md lacks them. A UI brief and a PR body cite the CORE IDs they checked.UX-<n>); feature specs and code cite the ID and never copy the rule. Words users see live in content.md (DOCSPEC R11.3).templates/design-system/components/windows-installer/): stock WixUI dialogs with banner and side bitmaps drawn from the tokens, one native update window with a -LayoutCheck, a web update window on macOS and Linux, and one toast for an automatic update. Offer it when the project ships a desktop installer or updater; otherwise delete the rules and components.guards copies design-system.ts (finds the enforced version, computes the digest) and three tests: layout, freeze (digest and branch diff against DESIGN_BASE, default origin/main) and follow (retired words, rule table and citations, raw colours). Edit CONFIG at the top of design-system-follow.test.ts yourself (source roots, extensions, token files), and make the test runner include scripts/design/*.test.ts, after the owner's yes to the plan. Other stacks: port the same three checks; the digest algorithm is in R15.5.
Stack: TypeScript and Vitest only for now. There are no templates for other stacks. For a project on another stack, say so in the plan and leave the kit out.
For a project whose apps must follow the design system, not only cite it. guards --stack typescript-vitest-kit --apply copies three guards into scripts/design/. Each has a self-test and a ratchet list: a new breach fails, and a listed breach that is gone but still listed fails, so the list only shrinks. No screenshot comparison anywhere.
no-app-css-scan.ts, no-app-css.test.ts, no-app-css.known.json): app folders carry no stylesheet, no CSS-in-JS, no style= with layout or colour, no class the shared UI package does not define. Edit CONFIG (app folders, the shared UI folder) and TASK_ID. First run: put today's breaches in the known list, each with the task that removes it.dom-layout.ts, dom-layout-judge.test.ts, dom-layout-example.spec.ts): at 360, 393 and 1300 px, no sideways overflow, gaps on the spacing scale, aligned left edges, stacked buttons of one width, the primary action in view. Copy the example spec per app and list its screens; known breaches go in layout.known.json.wizard-behaviour.ts, wizard-behaviour.test.ts): one driver per wizard renders it in each state and reads a snapshot from the DOM. The rules: later steps not pressable, exactly one primary, a disabled primary shows its reason, Stop when the job can stop, Done never empty, a button with an open request is disabled, a step bar that collapses steps never says "+ 1 more" for one hidden step (show the step; DS244). The ten states are required: loading (the data of the step is still being read: primary and step actions locked, one wait line, Back free, no Done text; D244), first run, planning, ready to review, running, paused, stopped, failed, done, done after reload. A driver may add states and never drops one; the harness fails a driver that lists fewer. Breaches go in wizard-behaviour.known.json, which only shrinks.Then:
.delivery/config.json as design_system.app_paths and design_system.shared_paths (typed in the delivery plugin's config-schema.json; the edit-time hook hook_design_edit.py and the no-app-CSS CONFIG use the same values).references/design-gate.md, DELIVERYSPEC DL-92).brief --apply: the UI brief and pull request checklist (templates/ui-brief-checklist.md) is written into AGENTS.md and the PR template, and refreshed when it changes.change_notes.py check.Never import another project's known lists.
Stack: React and TypeScript, web only. For another stack, say there are no templates and leave them out.
Three shared components a project can take instead of building its own (DOCSPEC R15.10): DatePicker (a month grid with month and year selects and a typed entry; no keypad for dates), TimePicker (units h, hm or hms; 24-hour by default, 12-hour by locale) and NumberKeypad (counts, measures and codes only). Each is built from the --ds-* tokens only, is keyboard and screen-reader ready, keeps touch targets at 44 px or more, and ships with unit tests for keyboard, value and limits.
src/ui/pickers). The owner may decline; then nothing is copied.components --only <names> --dest <folder> --apply. It never overwrites a file. It adds one numbered section per component to next-version/components.md (before "How to add a component") with one CHANGES.md entry, and rebuilds the gallery. A rerun adds nothing.picker-base.css and each component's CSS to the shared UI stylesheet; export the components; add vitest, jsdom, react and react-dom to the shared UI package's dev dependencies when missing; run the copied tests. If the project's token names differ from --ds-*, rename the var(--ds-...) uses in the copied CSS once.content.md, skipping words that are already in a table there. Change them there; the components take them through their labels prop.scripts/design/raw-inputs.test.ts fails on a native type="date", "time", "datetime-local" or "number" input; set CONFIG in raw-inputs-scan.ts to the app and shared UI folders. Today's breaches go in raw-inputs.known.json once, at install; the list only shrinks.maxHours (no duration of 24 hours or more), and the keypad has no minus sign (allowNegative). The date picker header shows the locale's long date by default; pass formatValue for the project's own format.README.md (templates/design-system/components/react-typescript/) has the file list and the props.Ask once: "Does this project have a local app (one you install on a computer)?" On no, write nothing. On yes, add one line to the plan and run python3 "${CLAUDE_PLUGIN_ROOT}/scripts/lifecycle_check.py" setup --local-app yes --apply. It copies the starter lifecycle.json and words.json into next-version/ and never overwrites. Then edit the product name, targets and paths, run lifecycle_check.py validate docs/design-system/next-version/lifecycle.json (LC-1), and add the words-lint guard for the stack from templates/design-system/guards/words-lint-* (TypeScript and Vitest, Rust, Go, or the Python scanner for .wxl and plain string files). Set its CONFIG to the folders that hold lifecycle strings. promote copies lifecycle.json with the other version files. DOCSPEC R15.13 to R15.15.
Move it to docs/design-system/ with git mv, rewrite links and guard paths in one task (R15.8), add the earlier approvals to approvals.json by hand, then run check.
What SKILL.md sets; muted values are Claude Code's defaults
sonnetmediumnpx claudepluginhub luis-mc/dev-standards --plugin luismc-docs13 skills in this plugin
/docs-checkCheck a project's docs against DOCSPEC and the code: layout, front matter, links, Source lines, the code-to-doc map, generated files, docs/work, the design system and freshness. Use before finishing a task that changed behaviour, before a pull request, or when asked whether the docs are true./docs-indexBuild the browsable docs: docs/index.html with search, the site in docs/_site, features/index.md, decisions.md, docs-map.json and llms.txt. Use when docs changed, when a docs check says a generated file is stale, or to vendor Mermaid for offline diagrams./docs-noteRecord a change to a feature spec or an architecture spec as a one-line change note, and fold notes at release. Use when a task changes behaviour a spec describes, when the Stop hook says code changed without docs, or after a release merges on the default branch.Other plugins' skills for the same job