react-sot-storybook-parity

react-sot-storybook-parity is a cursor rule for coding agents from dmenchaca/webflow-to-react. It costs 0 tokens per session (1,562 once invoked), scanned A, original, MIT.

Rules for giving reusable React components one clear owner for their styling so Storybook and live pages look alike. Storybook is a development tool for viewing UI components in isolation.

In plain words
What is it for?
Maintaining shared buttons, headings, chips, page sections, component CSS, stories, and design tokens during React migrations.
Why use it?
It prevents route-specific or Storybook-only CSS fixes from creating different versions of the same component.

Cursor rule

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.

agentmods
npx agentmods add rules/dmenchaca/webflow-to-react/react-sot-storybook-parity
Clone the repo
git clone --depth 1 https://github.com/dmenchaca/webflow-to-react

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 react-sot-storybook-parity

README.md
[![agentmods](https://agentmods.dev/badge/rules/dmenchaca/webflow-to-react/react-sot-storybook-parity.svg)](https://agentmods.dev/rules/dmenchaca/webflow-to-react/react-sot-storybook-parity)
Your own site
<a href="https://agentmods.dev/rules/dmenchaca/webflow-to-react/react-sot-storybook-parity"><img src="https://agentmods.dev/badge/rules/dmenchaca/webflow-to-react/react-sot-storybook-parity.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,562 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01562
Opus 5 $0.00000 $0.00781
Sonnet 5 $0.00000 $0.00312
Haiku 4.5 $0.00000 $0.00156

Measured 5d ago against content hash 0aab3e80dabb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

react-sot-storybook-parity 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 5d 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.

rules/react-sot-storybook-parity.mdc · 93 lines

How it starts

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

SOT components — Storybook must match production

When a migration introduces reusable section components or UI primitives (buttons, headings, chips) with co-located CSS and Storybook stories, the story is the contract. A route that mounts the same component with the same props must look the same — without extra route CSS or Storybook-only compensations on that component.

Two tiers: UI primitives (10g, Components/UI/*) and page sections (11a, Components/Page sections/*). See rules/react-sot-ui-primitives.mdc.

The failure mode (avoid this)

  1. Component ships a default look via co-located CSS + CSS custom properties.
  2. Storybook adds preview-only overrides (shorter canvas, decorator wrapper) that inflate tokens so the story “looks right.”
  3. Migration copies export HTML + per-route hooks instead of the SOT component.
  4. Someone hand-appends token overrides to a PurgeCSS extract or global embed file so the live page “matches” export.
  5. Result: Storybook, live route A, and live route B each show a different variant of the “same” component.

Ownership model (one visual concern → one owner)

Concern Owner Route / page CSS
Component chrome (padding, borders, masks, video reveal, chip colors) Variant class on the SOT root (e.g. --has-media, --theme-dark) + co-located or global-tier stylesheet Forbidden — no token overrides on SOT BEM roots
Page layout (grid, sidebar width, max-width on a child slot) Route *-page.css or parent wrapper Allowed — layout only, not internal SOT classes
Webflow export residue PurgeCSS / compiled bundle — read-only build output Never hand-edit for React SOT fixes
Storybook frame compensation Decorator scoped to .storybook-* (or your preview root) Only when the live surface is a different component or a different frame height — never inflate the SOT default the routes rely on

Read the full file on GitHub · 93 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. 5d ago First seen · 93 lines · 0 tokens per session scan A 0aab3e80dabb

Subscribe to this mod's changes

react-sot-storybook-parity is a cursor rule published in the GitHub repository dmenchaca/webflow-to-react (27 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,562 tokens. 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.