| name | storybook-scaffolder |
| description | Scaffolds a new Storybook file (*.stories.tsx) for an existing component. Use when asked to 'create a story' or 'add to storybook'. |
Storybook Scaffolder Workflow
- Ask for the full path to the component to create a story for (e.g.,
src/components/Common/MyButton/MyButton.tsx). - From the path, determine:
{{COMPONENT_NAME}}(e.g.,MyButton){{COMPONENT_PATH}}(e.g.,./MyButton){{STORY_TITLE}}(e.g.,Common/MyButton)
- Read the template:
cat .claude/skills/storybook-scaffolder/templates/story.tsx.tpl - Replace the placeholders.
- Determine the new file path (e.g.,
src/components/Common/MyButton/MyButton.stories.tsx). - Write the new
.stories.tsxfile. - Report success and advise the user to fill in the
argsfor the story.