storybook-chromatic-builder

storybook-chromatic-builder is a cursor rule for Cursor from jrpease/throughline. It costs 108 tokens per session (6,918 once invoked), scanned A, original, MIT.

A setup guide for Storybook, a tool that displays interface components in isolation, plus Chromatic, a service that compares screenshots to detect visual changes. It is designed for a monorepo, a repository containing multiple related packages, and can connect Figma designs to code when supported.

In plain words
What is it for?
Use it to create a component library in a UI package, generate stories, configure visual regression checks with Chromatic, and optionally connect Figma components with their code versions.
Why use it?
It helps teams build components against shared design tokens, document each component with stories, and notice accidental visual changes. It also lists the project files and design inputs required before setup.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions subagents.

Good fit Use it to create a component library in a UI package, generate stories, configure visual regression checks with Chromatic, and optionally connect Figma components with their code versions.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/jrpease/throughline/storybook-chromatic-builder
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/jrpease/throughline

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for storybook-chromatic-builder

README.md
[![agentmods](https://agentmods.dev/badge/rules/jrpease/throughline/storybook-chromatic-builder/github.svg)](https://agentmods.dev/rules/jrpease/throughline/storybook-chromatic-builder)
Your own site
<a href="https://agentmods.dev/rules/jrpease/throughline/storybook-chromatic-builder"><img src="https://agentmods.dev/badge/rules/jrpease/throughline/storybook-chromatic-builder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for storybook-chromatic-builder

Your own site · 80×15
<a href="https://agentmods.dev/rules/jrpease/throughline/storybook-chromatic-builder"><img src="https://agentmods.dev/badge/rules/jrpease/throughline/storybook-chromatic-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,918 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.06918
Opus 5.5 $0.00043 $0.02767
Sonnet 5.5 $0.00022 $0.01384
Haiku 4.5 $0.00011 $0.00692

Measured 26d ago against content hash a8e761a2f326, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

storybook-chromatic-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 26d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

adapters/cursor/.cursor/rules/storybook-chromatic-builder.mdc · 473 lines

How it starts

The opening of the file, as written. The whole thing — 473 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Storybook + Chromatic builder

Builds the code half of the component library: real components consuming the synced tokens, stories documenting them, Chromatic for visual regression, and Code Connect tying Figma to code when available.

Calibrate + prerequisites

Read user.codingLevel (.throughline/references/coding-level.md) and scale explanation. This skill needs:

  • A repo with the monorepo scaffold (repository-builder, at least local-git). Offer to run it if missing.
  • Synced tokens in packages/tokens (token-sync-layer) so components consume real token files. Offer to run sync if missing.
  • Figma components (components.built) with their slot contracts, so stories reflect the real component APIs.

The Figma-touching steps (Code Connect in Step 5, the doc-card write-back in Step 6) also need a live Figma connection — do a cheap liveness read before the first Figma call; if it fails, offer figma-environment-setup.

Strongly recommend github stage so Chromatic's CI integration works; it can be set up locally first and wired to CI when the remote exists.

Step 1 — Stand up Storybook

Initialize Storybook in packages/ui (or the components package), configured for the framework the tokens were synced for (e.g. React + Vite for a shadcn/Tailwind system). Wire it to consume packages/tokens output so stories render with the real design tokens (import the generated CSS/theme). Checkpoint: confirm Storybook runs and shows the token-themed canvas.

Install the documentation scripts alongside the token scripts: copy the fifteen files and register the six npm scripts listed under Documentation scripts — install as a set in .throughline/scripts/README.md. adherence:check needs the repo's own values substituted in — the UI package's specifier for --package, and paths for --root/--system that match this repo's layout; registering it with the table's placeholders leaves a script that cannot run. verify:check needs the same treatment for its --root and --tokens, and registering it without --tokens is worse than leaving a placeholder: the script runs, and skips both orphan-token and color-contrast on every run. Pass one --tokens flag per mode file — color-contrast checks each file as its own mode, so a multi-mode system registered with a single --tokens silently checks only one of them. That table is the single source of truth for what a consuming repo gets; do not restate the list here.

Read the full file on GitHub · 473 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 26d ago Changed · +4 lines a8e761a2f326
  2. 1mo ago Changed · -3 lines 1722d535ab53
  3. 1mo ago Changed · +7 lines 8a37a47ba4da
  4. 1mo ago Changed 9556b2f39865
  5. 1mo ago Changed · +4 lines 8cd6d7718d2c
  6. 2mo ago Changed 55168c44780b
  7. 2mo ago Changed · +2 lines bd28fd2a2e8f
  8. 2mo ago Changed · +98 lines 1de7f027d15b
  9. 2mo ago Changed · +4 lines c88f8152314e
  10. 3mo ago First seen · 357 lines · 108 tokens per session scan A 01d07edf85b6

Subscribe to this mod's changes

storybook-chromatic-builder is a cursor rule published in the GitHub repository jrpease/throughline (80 stars, last pushed today), licensed MIT. It adds 108 tokens to every session and 6,918 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

storybook-chromatic-builder compared with cursor rules from other repositories

storybook-chromatic-builder next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
storybook-chromatic-builderjrpease/throughlineCursor rule80todayMITA108Cursor
explorer-interface-briefmohitagw15856/pm-claude-skillsCursor rule1.6kyesterdayMITA91Cursor
prototype-previewerchocpink123/prototype-previewer-skillCursor rule327mo agoMITA14Cursor
figma-performancehoshikitsunoda/figma-plugins-vibe-coding-templateCursor rule2111mo agoMITA0Cursor
ant-designTideTree/awesome-cursor-rules-mdc-zhCursor rule148mo agononeA0Cursor
7-day-nextjs-web-design-cursormattcsnyder/7-day-mobile-and-web-design-skillCursor rule26mo agononeA16Cursor
clone-aiOmerfaruk-aydn/siteclonerCursor rule26mo agononeA374Cursor