Skip to content

GitHub Action

Use the official GitHub Action to integrate storybook-to-skills-md into your CI/CD pipeline.

View on GitHub →

name: Generate SKILL.md Files
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Generate SKILL.md files
uses: sergiocarracedo/storybook-to-skill-md-action@v1
with:
storybook-url: 'https://your-storybook.com'
source-dir: './src/components'
output-dir: './skills'
provider: 'openai'
model: 'gpt-4o'
env:
API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Commit and push if changed
run: |
git config --global user.name 'GitHub Action'
git config --global user.email 'action@github.com'
git add skills/
git diff --quiet && git diff --staged --quiet || \
(git commit -m "chore: update SKILL.md files [skip ci]" && git push)
InputRequiredDescriptionDefault
storybook-urlNo*Storybook URL-
index-fileNo*Path to local index.json-
source-dirNoSource directory./src
output-dirNoOutput directory./skills
providerYesLLM provider: openai, anthropic, google-
modelYesModel name-
api-keyNoAPI key (use api-key input or API_KEY env var)-
concurrencyNoConcurrent requests3
includeNoInclude patterns (comma-separated)-
excludeNoExclude patterns (comma-separated)-
verboseNoEnable verbose loggingfalse

*Either storybook-url or index-file is required.

OutputDescription
changedWhether files were changed (true/false)
countNumber of files generated
- name: Generate SKILL.md
uses: sergiocarracedo/storybook-to-skill-md-action@v1
with:
storybook-url: 'https://your-storybook.com'
provider: 'openai'
model: 'gpt-4o'
env:
API_KEY: ${{ secrets.OPENAI_API_KEY }}
  1. Go to your repository Settings → Secrets and variables → Actions
  2. Click New repository secret
  3. Add your API key:
    • Name: OPENAI_API_KEY (or ANTHROPIC_API_KEY, GOOGLE_API_KEY)
    • Secret: Your actual API key
  1. Use [skip ci] in commit messages — Prevent infinite loops
  2. Cache dependencies — Speed up workflow with actions/cache
  3. Use force: true on releases — Ensure all files are regenerated
  4. Monitor costs — Set concurrency to control API usage
  5. Test in PRs — Generate in PRs but only commit on main branch

Make sure the workflow has write permissions:

permissions:
contents: write

Increase timeout or reduce scope:

jobs:
generate:
timeout-minutes: 30 # Default is 360 (6 hours)