O que catalog faz?
The contract lives in the project's design/catalog/README.md (template: ${CLAUDE_PLUGIN_ROOT}/modules/design-system/files/design/catalog/README.md). Read it first; this skill implements it.
0. Seed the registry if it is empty
Most projects already have components and often an in-app developer gallery. Inventory them:
- the design-system folder (
DesignSystem/,components/ui/…): one entry per public component, - the in-app gallery's sections: each becomes stories,
- usage counts (
grep -r) to find what is actually reused.
Write entries to design/components.json with purpose, use_when, not_when, variants, states, tokens used, code path and stories. Mark unclear ones "status": "experimental" and list them for the owner. Show the draft before writing it.
1. Pick the renderer for the stack
| Stack | Renderer | Notes |
|---|---|---|
| Web | A catalog route or static page mounting real components with story props; Playwright for the PNGs. | Reuse the app's build; no second framework unless the project already has one. |
| SwiftUI | A test target that renders each story with ImageRenderer per axis (colour scheme, dynamic type size, width). | Keep views shallow; render one story per test. |
| Skip | iOS as SwiftUI. Android: JVM rendering (Robolectric + Compose) or a headless emulator (-gpu host), one heavy job at a time. | Render one story at a time; deep trees can crash Android where iOS is fine. |
| Compose | Paparazzi or Roborazzi. | |
| Flutter | Golden tests exported to PNG. |
Stories come from components.json, not from code: the renderer reads the registry and fails on a story it cannot render.
2. Build the page
A small script (in the project's main language) reads components.json and the PNGs and writes a static site: an index by category; a page per component with status, purpose, use/not-use, the story × axis grid, tokens, accessibility notes and code paths; a token page (swatches, type scale, spacing). Plus catalog/index.json mapping <component>/<story>/<axes> to image paths.
3. Wire it in
- A make/npm target:
catalogbuilds everything locally. - CI on PRs touching the design system or the registry: build the catalog, run drift checks (every component in code has an entry and vice versa; no raw colours or sizes outside generated tokens), upload the site as an artifact or preview deploy.
- Link the catalog from
design/README.mdandAGENTS.md.
4. Verify
Open several rendered images and describe them. Confirm one story per axis actually differs (dark is dark, the largest text is larger). Report what renders on which platform and what does not yet.