What problem does it solve?
This skill solves the problem of inconsistent, manual, or broken Storybook story creation by providing a standardized, agent-driven workflow that ensures stories are conformant, maintainable, and properly wired to the project's design system.
Core Features & Use Cases
- CSF3 Story Authoring: Automatically generates conformant CSF3 stories for React components, covering only materially-different states to avoid Cartesian explosion.
- Factory-Based Mocking: Scaffolds factories for components when three or more stories share a data shape, ensuring consistent and reusable mock data.
- Automated Validation: Integrates a strict gate that validates stories against 13 deterministic checks, including proper imports, layout, and interaction testing.
- Use Case: When you need to document a new UI component, use this skill to generate a story that includes a functional Controls panel, proper state coverage, and a CSS-check proof to ensure the component renders correctly within the Storybook preview.
Quick Start
Use the sb-stories skill to write a story for the Button component by following the guided prompts for state coverage and factory generation.