Skip to content

Quick Start

This guide walks you through generating SKILL.md files from a Storybook project.

You need to tell the tool how to access your Storybook. Choose one of these options:

Use when your Storybook is deployed and accessible via URL.

Terminal window
--storybook-url https://your-storybook.com

Best for: Quick testing, public Storybooks
Requires: Storybook accessible via HTTP
Speed: Medium (fetches from URL each time)

Use when you have a built Storybook locally.

Terminal window
# Build Storybook first
npm run build-storybook
# Generate from local index.json
--index-file ./storybook-static/index.json

Best for: CI/CD, offline environments, faster runs
Requires: Pre-built Storybook (npm run build-storybook)
Speed: Fast (local file)

Use when you only have component source files (no Storybook needed).

Terminal window
--source-dir ./src/components

Best for: Simple projects, when you don’t use Storybook
Requires: Component source files
Speed: Fastest (no Storybook needed)

Terminal window
storybook-to-skills-md generate \
--storybook-url https://your-storybook.com \
--provider openai \
--model gpt-5.2 \
--api-key $OPENAI_API_KEY
Terminal window
npm run build-storybook
storybook-to-skills-md generate \
--index-file ./storybook-static/index.json \
--source-dir ./src/components \
--provider anthropic \
--model claude-sonnet-4-6 \
--api-key $ANTHROPIC_API_KEY
Terminal window
export OPENAI_API_KEY=sk-...
export SKILLGEN_PROVIDER=openai
export SKILLGEN_MODEL=gpt-5.2
storybook-to-skills-md generate \
--storybook-url https://your-storybook.com

Create .skillgenrc.json for reusable config:

{
"storybookUrl": "https://your-storybook.com",
"sourceDir": "./src/components",
"outputDir": "./skills",
"provider": "openai",
"model": "gpt-5.2"
}

Run with just the API key:

Terminal window
storybook-to-skills-md generate --api-key $OPENAI_API_KEY

The tool creates:

skills/
├── button/
│ ├── SKILL.md
│ └── .skill-meta.json # Cache (see Caching)
├── input/
│ └── SKILL.md
└── ...

Each SKILL.md includes:

  • Component description
  • Props/API documentation
  • Usage examples
  • Storybook links

On subsequent runs, the tool only regenerates components that changed. See Caching for details.

Use --force to ignore cache and regenerate everything.