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.
npx agentmods add rules/nedcodes-ok/cursorrules-collection/storybookgit clone --depth 1 https://github.com/nedcodes-ok/cursorrules-collectionWrote 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.
[](https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/storybook)<a href="https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/storybook"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursorrules-collection/storybook.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00466 | $0.00466 |
| Opus 5 | $0.00233 | $0.00233 |
| Sonnet 5 | $0.00093 | $0.00093 |
| Haiku 4.5 | $0.00047 | $0.00047 |
Grade A, and why
storybook 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 yesterday.
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- storybook — 100% identical, 0 lines differ
What it actually says
Storybook Cursor Rules
You are an expert in Storybook component development. Follow these rules:
Story Format (CSF3)
- Use Component Story Format 3 — export default meta object, export named story objects
- Type meta with satisfies Meta for full type safety
- Each story is a plain object: export const Primary: Story = { args: { ... } }
- Never use CSF2 render functions unless args alone can't express the story
Args & Controls
- Define default args in meta.args — override per-story only what changes
- Use argTypes to customize controls: argTypes: { size: { control: "select", options: ["sm", "md", "lg"] } }
- Map enum props to select/radio controls explicitly
- Use args for all dynamic props — never hardcode values inside render functions
Decorators
- Use decorators for wrapping context: themes, providers, layout containers
- Apply global decorators in .storybook/preview.ts, story-specific in meta.decorators
- Keep decorators pure — no side effects, no API calls
- Use the Story function parameter: decorators: [(Story) => ]
Organization
- Co-locate stories with components: Button.tsx + Button.stories.tsx
- Use title hierarchy for grouping: title: "Components/Forms/Button"
- Name stories by variant: Primary, Secondary, Disabled, Loading, WithIcon
- Write one story per meaningful visual state
Documentation
- Add component description in meta.parameters.docs.description.component
- Use JSDoc on component props — Storybook extracts them automatically
- Add story descriptions with parameters.docs.description.story
- Use autodocs tag for automatic documentation pages: tags: ["autodocs"]
Interaction Tests
- Use play functions for interaction testing: play: async ({ canvasElement }) => { ... }
- Import from @storybook/test: expect, within, userEvent, fn
- Use fn() for action args — enables assertion on callback invocations
- Test user flows in play functions: click, type, verify DOM 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.
- yesterday First seen · 46 lines · 466 tokens per session scan A 50c3510d0ea2
storybook is a cursor rule published in the GitHub repository nedcodes-ok/cursorrules-collection (37 stars, last pushed 6mo ago), licensed MIT. It adds 466 tokens to every session, about $0.0023 per session on Opus 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-09-03.
Other cursor rules, from other repositories
10-feature-development
Feature implementation workflow and engineering mindset.
11-template-conventions
Reusable building blocks shipped with this template - use them instead of writing new ones.
03-ui
UI, layout, theming and localization standards.
12-new-project
Workflow for starting a new app from this template - rebranding, identity, cleanup and first feature.
13-updating-project
Workflow for updating an existing project - dependency and SDK upgrades, migrations, refactors, bug fixes.
01-tech-stack
Android tech stack and project standards.