storybook-story-authoring

Writes and validates Storybook stories for React components across three repository shapes.

1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/VilnaCRM-Org/claude-plugins --skill storybook-story-authoring-vilnacrm-org
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: storybook-story-authoring
Source: https://github.com/VilnaCRM-Org/claude-plugins/tree/main/plugins/react-frontend-sdlc/skills/storybook-story-authoring
Command: npx skills add https://github.com/VilnaCRM-Org/claude-plugins --skill storybook-story-authoring-vilnacrm-org

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React components need interactive documentation and testable stories, but stories frequently break builds due to wrong @storybook/* type imports, inconsistent sidebar title placement, duplicated argTypes controls, or missing accessible names. This Skill enforces the conventions that keep *.stories.tsx files buildable and consistent. ## Core Features & Use Cases - Shape-aware story authoring: Adapts type imports and conventions for React SPA (@storybook/react-webpack5), Next.js (@storybook/nextjs), and component-library (@storybook/react) repository shapes. - Convention enforcement: Colocates kebab-case story files with components, namespaces sidebar title prefixes, names story exports after states, and centralizes shared argTypes builders under .storybook/. - Profile-driven verification: Resolves build, lint, duplication, and format checks through the profile's make target map, recording skips when keys map to null. - Use Case: When adding a new shared UI primitive with disabled, loading, and error states, use this Skill to author the colocated story file with correct framework imports, controls, and accessible-name args, then verify it with the storybook build target. ## Quick Start Ask the agent to create a Storybook story for a React component, documenting its variants and states with proper argTypes controls and verifying it with the storybook build target.

Frequently Asked Questions about storybook-story-authoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a Storybook story for a React component?▼

Create a kebab-case `*.stories.tsx` file colocated with the component, import `Meta` and `StoryObj` from the framework package the repository installs, define a namespaced `title`, and export PascalCase stories named after states like Default, Disabled, or Loading.

Which package should I import Meta and StoryObj from in Storybook?▼

Import from the framework package named in `.storybook/main.ts`: `@storybook/react-webpack5` for React SPA shapes, `@storybook/nextjs` for Next.js apps, and `@storybook/react` for component libraries. A wrong import fails the storybook build.

Why does my Storybook build fail after adding a story?▼

Builds commonly fail from importing types from a package the repository does not install, or from adding an addon whose peer range exceeds the pinned Storybook major. Check the framework package in `.storybook/main.ts` and verify addon compatibility first.

Can Storybook stories replace visual regression testing?▼

No. Stories are interactive documentation and a test bed for browser suites, but pixel-diff coverage belongs to the Playwright visual suite driven by the visual test target. Add a spec to the visual suite instead of treating stories as regression coverage.

How do I avoid duplicated argTypes controls across stories?▼

Keep repeated `argTypes` builders in one shared module under `.storybook/` and import them into each story. Re-declaring the same control block per story is duplicated code that the copy/paste duplication gate can flag.