storybook-scaffolder
Scaffolds a new, M3-token-aware Storybook file (*.stories.tsx).
When & Why to Use This Skill
The Storybook Scaffolder is a specialized developer productivity tool that automates the creation of Storybook story files (*.stories.tsx) for React components. It streamlines UI development by automatically integrating Material 3 (M3) design tokens and setting up interactive variant stories, ensuring that component documentation is consistent, design-system compliant, and ready for immediate testing.
Use Cases
- Rapidly generating standardized Storybook documentation for new React UI components to maintain a consistent living style guide.
- Ensuring design system compliance by automatically injecting Material 3 (M3) design token imports into component story files.
- Creating isolated, interactive environments for QA teams to verify component behavior and visual variants without running the full application.
- Reducing boilerplate code and manual setup time for frontend developers when transitioning from component creation to documentation.
| name | storybook-scaffolder |
|---|---|
| description | "Generates a Storybook story file (*.stories.tsx) with M3 design token imports and interactive variant stories. Use when documenting React components for development and QA testing." |
| version | 2.0.0 |
Storybook Scaffolder Workflow (v2)
- Get component path.
- Generate
.stories.tsxfile from template. - Prepend this line to the top of the generated file:
import 'src/styles/design-tokens.css'; - Report success.