npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

storybook-to-skill-md

v1.4.0

Published

CLI tool that reads Storybook projects and generates SKILL.md files for AI agents using LLMs

Downloads

836

Readme

storybook-to-skill-md

CLI tool that reads Storybook projects and generates SKILL.md files for AI agents using LLMs.

Installation

npm install -g storybook-to-skill-md

Or use it directly with npx:

npx storybook-to-skill-md generate --storybook-url https://your-storybook.example.com

Usage

storybook-to-skill-md generate [options]

Options

| Option | Description | | ----------------------------------- | ------------------------------------------------------------------- | | -u, --storybook-url <url> | Storybook URL (e.g. https://ds.example.com) | | --index-file <path> | Path to local index.json file (alternative to --storybook-url) | | -s, --source-dir <dir> | Source directory containing components (default: ./src) | | -o, --output-dir <dir> | Output directory for SKILL.md files (default: ./skills) | | -p, --provider <provider> | LLM provider (openai, anthropic, google) | | -m, --model <model> | LLM model name | | -k, --api-key <key> | API key for the LLM provider | | -i, --include <patterns...> | Glob patterns to include (matched against title) | | -e, --exclude <patterns...> | Glob patterns to exclude (matched against title) | | -c, --concurrency <number> | Number of concurrent LLM requests (default: 3) | | --server-only | Extract metadata from Storybook server only (no local source files) | | --config <path> | Path to config file | | -v, --verbose | Enable verbose logging | | --dry-run | Show what would be generated without making changes | | --force | Regenerate all files even if unchanged | | --prompt-file <path> | Path to custom system prompt file | | --log-prompts <path> | Save prompts and extracted data to directory for debugging | | --timeout <ms> | Timeout for LLM calls in milliseconds (default: 60000) | | --retries <number> | Number of retries for failed LLM calls (default: 2) | | --fetch-retries <number> | Number of retries for fetching Storybook index (default: 3) | | --extraction-concurrency <number> | Number of concurrent extractions in server-only mode (default: 3) | | --no-index-skill | Skip generating the index SKILL.md | | --index-skill-template <path> | Custom template file for the index SKILL.md (list is appended) |

Extraction modes

Local Files (default) — Reads component source code, stories, and MDX documentation directly from your filesystem. Requires --source-dir pointing to your components.

Server-Only (--server-only) — Extracts metadata from a running Storybook instance using a headless browser. Useful when source files are not available locally.

Configuration

You can use a configuration file instead of CLI arguments. The following file names are supported:

  • skillgen.config.ts
  • skillgen.config.js
  • skillgen.config.json
  • .skillgenrc.json
  • .skillgenrc.yaml / .skillgenrc.yml
  • .skillgenrc

Example skillgen.config.json:

{
  "storybookUrl": "https://your-storybook.example.com",
  "sourceDir": "./src",
  "outputDir": "./skills",
  "provider": "openai",
  "model": "gpt-4o",
  "concurrency": 3
}

Programmatic API

import { generate, generateServerOnly, loadConfig } from 'storybook-to-skill-md';

const { config } = await loadConfig({
  storybookUrl: 'https://your-storybook.example.com',
  sourceDir: './src',
  outputDir: './skills',
  provider: 'openai',
  model: 'gpt-4o',
  apiKey: process.env.OPENAI_API_KEY,
});

const results = await generate(config);

License

GPLv3