Marketplace

integrating-storybook

Storybook integration with spec.md. Auto-generates Stories from Component API. Triggers: storybook, stories, component api, props, argTypes, variants, csf, csf3, autodocs, frontend component

allowed_tools: Read, Write, Glob, Grep

$ 安裝

git clone https://github.com/thkt/claude-config /tmp/claude-config && cp -r /tmp/claude-config/skills/integrating-storybook ~/.claude/skills/claude-config

// tip: Run this command in your terminal to install the skill


name: integrating-storybook description: > Storybook integration with spec.md. Auto-generates Stories from Component API. Triggers: storybook, stories, component api, props, argTypes, variants, csf, csf3, autodocs, frontend component allowed-tools: Read, Write, Glob, Grep

Storybook Integration

Purpose

Auto-generate Stories skeletons from Component API specifications in spec.md.

Core Concepts

ConceptDescription
Component APIProps, Variants, States defined in spec.md
CSF3Component Story Format 3 + autodocs
Auto-generation/code generates Stories from spec.md

Component API Section (in spec.md)

Added automatically when /think detects frontend feature.

Location: ### 4.x Component API: [ComponentName] in ## 4. UI Specification

Contents:

  • Props Interface (TypeScript)
  • Variants (size, color, state)
  • States (default, hover, disabled, loading)
  • Usage Examples

Workflow

CommandAction
/think "Add Button"Adds Component API section to spec.md
/codeGenerates Button.stories.tsx from spec

Existing Stories Integration

When Stories file exists:

OptionAction
[O] OverwriteReplace existing file
[S] SkipKeep existing file
[M] MergeShow diff, manual integration
[D] Diff onlyAppend new Stories only

Frontend Detection Keywords

Triggers Component API generation:

  • component, ui, button, form, modal, dialog, card, list, table

References