storybook-scaffolder

Scaffolds a new, M3-token-aware Storybook file (*.stories.tsx).

⭐1stars🔀0forks📁View on GitHub🕐Updated Nov 25, 2025

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.
namestorybook-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."
version2.0.0

Storybook Scaffolder Workflow (v2)

  1. Get component path.
  2. Generate .stories.tsx file from template.
  3. Prepend this line to the top of the generated file: import 'src/styles/design-tokens.css';
  4. Report success.