Marketplace

integrating-storybook

spec.mdとのStorybook統合。Component APIからStoriesを自動生成。 トリガー: 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/.ja/skills/integrating-storybook ~/.claude/skills/claude-config

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


name: integrating-storybook description: > spec.mdとのStorybook統合。Component APIからStoriesを自動生成。 トリガー: storybook, stories, component api, props, argTypes, variants, csf, csf3, autodocs, frontend component allowed-tools: Read, Write, Glob, Grep

Storybook統合

目的

spec.mdのComponent API仕様からStoriesスケルトンを自動生成。

コアコンセプト

コンセプト説明
Component APIspec.mdで定義されたProps、Variants、States
CSF3Component Story Format 3 + autodocs
自動生成/codeがspec.mdからStoriesを生成

Component APIセクション(spec.md内)

/thinkがフロントエンド機能を検出すると自動追加。

場所: ## 4. UI仕様内の### 4.x Component API: [ComponentName]

内容:

  • Propsインターフェース(TypeScript)
  • Variants(size、color、state)
  • States(default、hover、disabled、loading)
  • 使用例

ワークフロー

コマンドアクション
/think "Add Button"spec.mdにComponent APIセクションを追加
/codespecからButton.stories.tsxを生成

既存Storiesとの統合

Storiesファイルが存在する場合:

オプションアクション
[O] 上書き既存ファイルを置き換え
[S] スキップ既存ファイルを維持
[M] マージdiffを表示、手動統合
[D] diffのみ新しいStoriesのみ追加

フロントエンド検出キーワード

Component API生成をトリガー:

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

参照