Quick Start
This guide walks you through generating SKILL.md files from a Storybook project.
Input Options
Section titled “Input Options”You need to tell the tool how to access your Storybook. Choose one of these options:
Option 1: Storybook URL
Section titled “Option 1: Storybook URL”Use when your Storybook is deployed and accessible via URL.
--storybook-url https://your-storybook.comBest for: Quick testing, public Storybooks
Requires: Storybook accessible via HTTP
Speed: Medium (fetches from URL each time)
Option 2: Index File (Offline)
Section titled “Option 2: Index File (Offline)”Use when you have a built Storybook locally.
# Build Storybook firstnpm run build-storybook
# Generate from local index.json--index-file ./storybook-static/index.jsonBest for: CI/CD, offline environments, faster runs
Requires: Pre-built Storybook (npm run build-storybook)
Speed: Fast (local file)
Option 3: Source Directory Only
Section titled “Option 3: Source Directory Only”Use when you only have component source files (no Storybook needed).
--source-dir ./src/componentsBest for: Simple projects, when you don’t use Storybook
Requires: Component source files
Speed: Fastest (no Storybook needed)
Examples
Section titled “Examples”Minimal Command
Section titled “Minimal Command”storybook-to-skills-md generate \ --storybook-url https://your-storybook.com \ --provider openai \ --model gpt-5.2 \ --api-key $OPENAI_API_KEYOffline (CI/CD)
Section titled “Offline (CI/CD)”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_KEYWith Environment Variables
Section titled “With Environment Variables”export OPENAI_API_KEY=sk-...export SKILLGEN_PROVIDER=openaiexport SKILLGEN_MODEL=gpt-5.2
storybook-to-skills-md generate \ --storybook-url https://your-storybook.comConfiguration File
Section titled “Configuration File”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:
storybook-to-skills-md generate --api-key $OPENAI_API_KEYOutput
Section titled “Output”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
Caching
Section titled “Caching”On subsequent runs, the tool only regenerates components that changed. See Caching for details.
Use --force to ignore cache and regenerate everything.
Next Steps
Section titled “Next Steps”- CLI Commands - All available options
- Configuration - Config files, env vars
- Providers - OpenAI, Anthropic, Google setup
- GitHub Action - CI/CD automation