stories
Prerequisites:
- Storybook must be installed in the project. Invoke the
/storybook-initskill to set up Storybook, but only if the user explicitly invoked this skill and approves a Storybook installation. - Storybook must be at least 10.5 (or
nextwhile 10.5 is not yet released). Invoke the/storybook-upgradeskill to upgrade it, but only if the user explicitly approved a Storybook upgrade. - Ensure
@storybook/addon-mcpis installed. If it is missing, install it withnpx storybook add @storybook/addon-mcp.
Run the Storybook dev server and every storybook ai command from the same working directory: the package where Storybook is installed (in a monorepo often a leaf package such as packages/ui).
Run STORYBOOK_FEATURE_AI_CLI=1 npx storybook ai --help and read the output in its entirety to get the mandatory, ordered workflow for working on UI changes, writing stories, and keeping stories in sync with every frontend component you create, modify, or delete. This workflow explains how to write stories, preview stories, and display a curated Storybook review.
Before invoking any storybook ai command for the first time in a session, run STORYBOOK_FEATURE_AI_CLI=1 npx storybook ai <command> --help and read it fully. The top-level help only lists the commands; each command's payload shape and usage rules (which fields to include when) live in its own help output. Never guess a --json payload from the command name — a validation error only reports missing required fields, not the optional fields the workflow expects you to provide.
Some commands require a running Storybook dev server. When Claude preview tooling is available, start the dev server through that tooling:
- Ensure there is a Storybook launch entry in
.claude/launch.json(thepreview_starttool description documents the file format) withautoPort: trueandport: 6006. Use the project's preferred package manager and existingpackage.jsonStorybook script instead of inventing a new command whenever possible. - Start the Storybook launch entry with the
preview_starttool.