storybook-story-generation

Generate CSF3 Storybook stories and MDX autodocs from React component source.

7|1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/PMDevSolutions/Aurelius --skill storybook-story-generation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: storybook-story-generation
Source: https://github.com/PMDevSolutions/Aurelius/tree/main/.claude/skills/storybook-story-generation
Command: npx skills add https://github.com/PMDevSolutions/Aurelius --skill storybook-story-generation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ts-morph, and includes scripts (resource) components.

What problem does it solve?

Manually writing Storybook stories and component documentation for React components is time-consuming and error-prone, especially after building multiple components from design pipelines or when backfilling coverage for existing component libraries.

Core Features & Use Cases

  • AST-Powered Prop Extraction: Uses ts-morph to parse TypeScript component source code and reliably extract prop types, default values, JSDoc comments, and callback props without fragile regex matching.
  • Automated CSF3 Story Generation: Creates .stories.tsx files with autodocs tags, prop-aware argTypes and controls, default stories, variant stories for string-literal unions and booleans, and action args for event callbacks.
  • Automated MDX Documentation: Generates autodocs .mdx pages with Meta, Canvas, Controls, and ArgTypes blocks, plus JSDoc descriptions and variant canvases.
  • Use Case: After running a Figma-to-React build pipeline that generates dozens of UI components, use this skill to automatically create full Storybook coverage with zero manual story authoring.

Quick Start

Use the storybook-story-generation skill to auto-generate Storybook stories and MDX documentation for all built React components in your project.

Frequently Asked Questions about storybook-story-generation

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

FAQPage Schema
How do I automatically generate Storybook stories for React components?

You can automatically generate Storybook stories by using ts-morph AST parsing to extract prop types, default values, and JSDoc comments from React components to create CSF3 .stories.tsx files without manual authoring.

What is the best way to backfill Storybook documentation for an existing React component library?

The best way to backfill Storybook documentation is using AST-powered prop extraction to parse TypeScript source code and generate standardized CSF3 stories and MDX autodocs pages across your entire library.

Does automated story generation work with TypeScript prop types and JSDoc comments?

Yes, automated story generation works with TypeScript by using ts-morph to parse source code, extracting prop types, default values, and JSDoc comments to build prop-aware argTypes, controls, and MDX descriptions.

How do I generate MDX autodocs pages for React components?

To generate MDX autodocs pages for React components, parse the component source to extract metadata and automatically create .mdx files with Meta, Canvas, Controls, and ArgTypes blocks alongside variant canvases.

Can I auto-generate variant stories for string-literal unions and boolean props?

Yes, you can auto-generate variant stories for string-literal unions and booleans by analyzing extracted prop types to create distinct story entries and action args for event callbacks automatically.

Why use AST parsing instead of regex for Storybook story generation?

AST parsing is used for Storybook story generation because it reliably extracts component prop types, default values, and JSDoc comments from TypeScript source code without the fragility of regex matching.