Storybook patterns for CSF 3, args and fn() spies, play functions, story ids, and the a11y addon. Load before any edit to a *.stories.* file or .storybook/, however small, and for Storybook questions.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Storybook Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-storybook-patterns)
---
name: storybook-patterns
description: Storybook patterns for CSF 3, args and fn() spies, play functions, story ids, and the a11y addon. Load before any edit to a *.stories.* file or .storybook/, however small, and for Storybook questions.
---
# Storybook patterns
Default assumption: Storybook 11.0 with CSF 3 stories, per the Storybook releases on GitHub.
A row applies when the `storybook` version in the project's `package.json` and lockfile is at least its version. 11 is `latest` on npm. The docs show CSF Next (`preview.meta({...})`, `meta.story({...})`) next to CSF 3; match the form the project already uses.
## Reference files
Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.
| Before | Read |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| Writing a story or `.storybook/` config, or raising the Storybook version | [reference/upgrades.md](reference/upgrades.md) |
| Writing, changing, or reviewing a story, a `play` function, a mock, or the a11y setup | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Writing a story, its meta, args, `play`, `beforeEach`, a11y parameters, or a link to a story | [reference/practices.md](reference/practices.md) |
| Configuring or running eslint-plugin-storybook, TypeScript, or the a11y addon | [reference/tooling.md](reference/tooling.md) |