Individual skill
storybook
Not available
Anthropic/claude-code/skills/design-sync/storybook/SKILL.md
Source commit a2d33761e49b98f6ec1b48f12143264eb9b4ff4f
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 10, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
Standard SKILL.md format has not been attested at this commit. No installation command is available; inspect the source.
Repository context
- Repository stars (not skill ratings)
- 71,245
- Repository last updated
- Nov 10, 2026
- License
- CC0-1.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai Repository topic
- anthropic Repository topic
- chatbot Repository topic
- chatgpt Repository topic
- claude Repository topic
- claude-code Repository topic
- codex Repository topic
- gemini Repository topic
- generative-ai Repository topic
- google Repository topic
Declared tags are partial or unavailable.
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytesSKILL.mdcore · 69,676 bytescompare.mjsruns · 46,123 byteshttp-serve.mjsruns · 2,054 bytesprobe.mjsruns · 7,074 bytes
Read excerpt
# Storybook source shape
Storybook is the **fidelity oracle, not the runtime**. The converter bundles the package's compiled `dist/` into `_ds_bundle.js` - the same bundle the claude.ai/design agent builds with - and generates each preview by **compiling the story source module itself** (hooks, fixtures, local helpers - the whole closure comes along), with every component import resolved to that shipped bundle (`lib/story-imports.mjs` redirects package *and* relative component imports to `window.<Global>`). The repo's own storybook render is the ground truth those previews must match: a compare harness screenshots each story in the reference storybook and the matching preview render side by side, and you iterate until they match. Nothing from storybook-static is uploaded, and no story code is ever evaluated at build time - stories run only in the browser, against the real artifact.
Requires React 18+. Playwright + chromium are **required** for this shape (the compare loop is the verification), not optional.
**First sync or re-sync?** A re-sync is marked by a config whose `projectId` and `pkg` were both in place before this run started - most of this document then doesn't apply; go to §7, where one driver run routes the work and untouched components cost nothing. Everything else takes the full flow (§2 build -> §3 self-heal -> §4 match -> conventions header (base SKILL.md, before upload) -> §6 upload), where every component gets verified and graded once - that includes a partial config left by an aborted run, and a pin this run itself just recorded in the base skill's §1. (Only the old `design-sync.config.json` present? Move it first and commit: `mkdir -p .design-sync && mv -n design-sync.config.json .design-sync/config.json`, then apply the same test.)
## 2. Build, then run the converter
1. **Build the DS package *and its workspace dependencies*.** The converter bundles `dist/` into `window.<Global>`. Run `<pm> run build`; in a monorepo use `turbo run build --filter=<pkg>` or `pnpm -F "<pkg>..." build` (the trailing `...` is required - bare `-F <pkg>` skips dependencies and you'll see `Cannot find module '@scope/tokens'`). If `package.json` `module`/`exports['.']` points at TS source, find the actual built entry and pass it via `--entry`. **Do this before step 2** - storybook often imports sibling packages from their built `dist/`.
2. **Build the reference storybook ONCE into `.design-sync/sb-reference/`** - NOT under `ds-bundle/` (the converter wipes `--out` on every rebuild, and storybook builds take minutes; the reference must survive the fix loop):
```bash