Install
openclaw skills install @yofine/design-hubCreate and operate a local Design System Hub that stores multiple design systems, generates complete entries from screenshots, URLs, or written style descriptions, and exposes browsable documentation, live mocks, copied tokens, DESIGN.md, standalone HTML, and JSON APIs. Use when the user asks to ini
openclaw skills install @yofine/design-hubBuild or extend a local React/Vite service for collecting design systems. Use the bundled template for initialization and preserve its data contract when adding entries.
~/design-hub.package.json whose name is design-hub.node --version.<skill-dir>/assets/template/ into the empty target directory.npm install in the target.npm run build and fix any failure before continuing.npm run dev -- --host 0.0.0.0 --port 4321 in a persistent session.http://127.0.0.1:4321/api/design-systems for up to 10 seconds. Require HTTP 200 and valid JSON containing all four built-in entries: mulerun, raft, qoderwork, and superset.DESIGN.md, and standalone HTML endpoints.If port 4321 is occupied, identify the owning process and prefer another port unless the user explicitly authorizes stopping it. Report the actual port used.
Create a single coherent entry covering, in this order:
Use OKLCH as the canonical color value and include a hex fallback for broad compatibility. Derive a genuine scale; do not relabel arbitrary sampled colors as tokens.
Use primaryColor as the system's single identity surface and onPrimaryColor as its contrast-safe foreground. Do not store or generate decorative cover gradients.
Render each module with the view that best communicates its specification: color tokens as full swatch cards, typography as real scale specimens, iconography as a labeled SVG specimen grid, foundations and interactions as comparison tables, and guidelines as aligned Do/Don't pairs. Color cards show only the swatch, token name, and hex fallback; do not show per-color usage prose. Do not flatten these modules into one generic card pattern.
When the user works in Chinese, write every user-facing explanatory field in Chinese, including card tagline and description, DNA belief and implication, token-section descriptions, typography and foundation usage, component summaries, layout purpose and responsive rules, interaction guidance, and Do/Don't copy. Keep product names, token identifiers, code values, and necessary technical labels unchanged.
src/mocks/<slug>.tsx for the dedicated renderer and src/mocks/<slug>.css for fully slug-scoped styles. The Hub auto-discovers the renderer by filename.system-specific, describe the composition, and place renderer-only values under mock.data.src/data/<slug>.ts, src/mocks/<slug>.tsx, and src/mocks/<slug>.css.primaryColor, onPrimaryColor, all required fields, and all 12 modules, including an input-specific iconography specification. Keep tokenExport as valid, pretty-printed JSON for the Copy Tokens action.src/data/registry.ts. Do not reorder, rewrite, or restyle existing entries.DetailPage.tsx without editing that file.Use the four current built-ins—MuleRun, Raft, QoderWork, and Superset—as schema and implementation references, never as visual templates for a new system.
src/data/registry.ts.system-specific mock contract and auto-discovered renderer exist to avoid that coupling.Run npm run build, start or reuse the development server, then require HTTP 200 from:
/api/design-systems/<slug>/api/design-systems/<slug>/API.md/api/design-systems/<slug>/DESIGN.md/api/design-systems/<slug>/design-system.htmlParse tokenExport from the design-system API as JSON. Confirm that the Markdown and HTML exports name the new system and contain all 12 modules. Open the detail page, check the header export controls, Live Mock, narrow viewport, and console errors before reporting completion.
Do not regress, reopen, compare, or rewrite existing systems during an Add workflow unless the user explicitly asks for regression testing. Build once, validate only the new slug and its four export endpoints, and keep the existing collection untouched.
0.0.0.0 only when LAN access is intended./api/design-systems and one detail endpoint per slug.DESIGN.md.primaryColor as the only large identity background on homepage cards, detail headers, and standalone HTML. Use onPrimaryColor for foreground contrast; never use decorative gradients in those surfaces.src/mocks/<slug>.*.| Purpose | Path |
|---|---|
| Data schema | src/data/types.ts |
| Built-in systems | src/data/mulerun.ts, src/data/raft.ts, src/data/qoderwork.ts, src/data/superset.ts |
| Registry | src/data/registry.ts |
| Detail renderer | src/pages/DetailPage.tsx |
| Live Mock renderer | src/components/MockPreview.tsx |
| Dedicated Live Mocks | src/mocks/<slug>.tsx and src/mocks/<slug>.css |
| Export serializers | src/lib/serialize.ts |
| Local API middleware | vite.config.ts |