design-system
Use to establish the project's design canon — docs/design-system.md: the design-tool choice (Figma MCP / Pencil MCP / code-only markdown), the platform posture (mobile-first / desktop-first / responsive), the token source, and the reusable component inventory. Once per repo, like survey. Triggers on "set up the design system", "design canon", "which design tool", "establish the UI foundation", "/sdd:design-system", "налаштуй дизайн-систему", "дизайн-канон проєкту", "яким інструментом малюємо". Read by ux-flows (posture) and screens (tool + inventory); implement registers NEW components back into it. On tool: pencil it also bootstraps the .pen library itself — creates the file, walks the user through opening it, and seeds tokens + a foundations frame via the pen-keeper agent. Utility — not a backbone stage; run it before the first UI feature (ux-flows recommends it when absent).
genkovich · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add genkovich/sdd --skill design-system技能说明
name: design-system model: inherit effort: medium agents: [explorer, pen-keeper] description: > Use to establish the project's design canon — docs/design-system.md: the design-tool choice (Figma MCP / Pencil MCP / code-only markdown), the platform posture (mobile-first / desktop-first / responsive), the token source, and the reusable component inventory. Once per repo, like survey. Triggers on "set up the design system", "design canon", "which design tool", "establish the UI foundation", "/sdd:design-system", "налаштуй дизайн-систему", "дизайн-канон проєкту", "яким інструментом малюємо". Read by ux-flows (posture) and screens (tool + inventory); implement registers NEW components back into it. On tool: pencil it also bootstraps the .pen library itself — creates the file, walks the user through opening it, and seeds tokens + a foundations frame via the pen-keeper agent. Utility — not a backbone stage; run it before the first UI feature (ux-flows recommends it when absent).
Skill: design-system
The design-side twin of survey: once per repo it fixes the design canon in
docs/design-system.md — which tool screens are drawn with (figma / pencil / code), the
platform posture, where tokens come from, and the component inventory new screens must compose.
architecture-map.md §Frontend stays the inventory of the code; this file is the design
canon the design pipeline (ux-flows → screens) and implement/review read. The tool choice
is committed here — never in .claude/sdd.local.md (that file is per-developer and gitignored;
the canon is team-wide).
Question phrasing → ../_shared/ask-style.md. Canon prose follows
artifact_language — frontmatter keys/values (tool:, figma_file:, …), component names and
file anchors stay English → ../_shared/artifact-language.md.
Owner
Whoever owns the product's look (designer / frontend lead / the solo maintainer).
Inputs
- (Optional)
docs/architecture-map.md§Frontend / UI foundation + thefrontend:machine key — the code-side inventory this canon cites. - (Optional) an existing
docs/design-system.md— updated, never silently overwritten. - The design-tool MCPs available in this session (Figma / Pencil), if any → detected in step 3.
Protocol
- Check existing. If
docs/design-system.mdexists, show itstool+ posture + inventory summary and ask: reuse as-is (STOP — nothing to do) / update (continue, edits land in place) / rebuild. Never overwrite silently. - Scan the code side. Read
architecture-map.md§Frontend / UI foundation + thefrontend:key. Map absent, stale, orfrontend: ""on a repo that visibly has UI code → dispatch theexploreragent —subagent_type: "sdd:explorer"(fallbacksubagent_type: "Explore", per../_shared/agent-roster.md) — for the component library / tokens / styling approach / shared primitives, each with afile:line. A repo with no UI code at all is fine — the canon can start tool-side or empty (greenfield: the inventory grows asimplementregisters components). - Detect tools + ask ONE question set. Detect which design-tool MCPs the session actually has
(Figma / Pencil — probe the available tools, don't assume). Then one
AskUserQuestioncall (up to 3 questions in it, phrased per../_shared/ask-style.md): (a) tool — options from what's detected, the detected one first as «(Recommended)»;code(markdown wireframes inscreens.md) is always offered — it needs no MCP and never blocks; (b) platform posture — mobile-first / desktop-first / responsive-both; (c) token source — the code file(s) found in step 2 / the tool's variables / «none yet». - Write the canon. Fill
./templates/design-system.md→docs/design-system.md: frontmattertool+figma_file/pen_file(the one matching the tool; the other stays""), posture, token source, the component inventory — each row citingfile:line(code) or the node/URL (tool-side) — and the cross-screen conventions. - Bootstrap the tool library (
tool: pencilonly — figma links an existing file,codeneeds nothing). The canon naming apen_filethat doesn't exist or is an empty stub is the #1 way this skill «did nothing» — so materialize it: a. File. Absent → write the minimal stub topen_file({"version": "2.17", "children": []}). b. Open + verify. The Pencil MCP ignoresfilePath— it writes into whatever document is active in the app. Ask the user to open the file (macOS:open -a Pen <pen_file>), then verify viaget_app_statethat the active canvas ISpen_file. Mismatch → stop and repeat the ask; never write into a foreign document. c. Seed. Dispatch thepen-keeperagent —subagent_type: "sdd:pen-keeper"(no fallback: without the Pencil MCP this step degrades tocodemode per../_shared/tool-adapters.md) — with the canon path,pen_file, and the token source files. It re-checks the active document, seeds the variables (light + dark), ensures the foundations frame, and returns a reconcile report. d. Persist. Relay the report's user actions — always «Cmd+S in Pencil»: the app holds changes in memory and the MCP cannot save; confirm the file on disk actually changed (size/mtime) before calling the canon done. - Structural self-check — per
../_shared/self-check.md: re-read the file from disk and verify 5 items: (1)tool∈ {figma, pencil, code}; (2) the tool ↔ file fields agree —figma⇒figma_filenon-empty,pencil⇒pen_filenon-empty,code⇒ both""; (3) e