Sb Auditのロゴ

Sb Audit

コミュニティ
strongeron
sb-audit

Periodic Storybook audit — naming-drift survey, archived/decision-board review, lifecycle tagging, usage refresh. Use for 'audit my Storybook', 'find drift', 'show pending decisions', or a periodic catalog health check.

概要

公開者strongeron
リポジトリstorybook-workbench
スキル名sb-audit
スター
40
フォーク
0
同梱ファイル
14
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 14個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    strongeronがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Sb Audit」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/strongeron/storybook-workbench/tree/main/skills/sb-audit
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/strongeron/storybook-workbench.git /tmp/storybook-workbench
mkdir -p .claude/skills
cp -r /tmp/storybook-workbench/skills/sb-audit .claude/skills/sb-audit
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSb Auditを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にSb Auditを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Sb Auditは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

sb-audit — drift survey + decision board

The periodic gate. Surveys the catalog, seeds the ledger, names consolidation candidates.

Run it

bash
SKILL=${CLAUDE_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}
CORE=${CLAUDE_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}
"$SKILL/scripts/audit-drift.sh"                 # naming drift across stories
"$SKILL/scripts/audit-archived.sh"              # L1/L2/L3 preservation surveillance (HEAVY warning)
"$CORE/scripts/find-stories-by-tag.sh" decision:pending   # stale decisions needing a nudge
"$CORE/scripts/extract-component-usage.sh"      # REFRESH real prop-usage → component-usage.json (auto, no hand-edits)
"$SKILL/scripts/audit-controls.sh" .            # Controls-panel coverage: component stories missing argTypes + manager showPanel
"$CORE/scripts/refresh-usage.sh" --docs .       # ONE-COMMAND refresh: components + tokens + routes + health JSON + re-stamp per-component usage MDX

# App flow + component lists: re-run the repo-local app-graph extractor if present, then VALIDATE it
[ -f .storybook/scripts/extract-app-graph.mjs ] && node .storybook/scripts/extract-app-graph.mjs   # refresh app-graph.json + component-pages.json
[ -f .storybook/app-graph.json ] && node -e 'const g=require("./.storybook/app-graph.json"); const by={}; for(const e of g.edges) by[e.attribution]=(by[e.attribution]||0)+1; console.log("flow edges by attribution:", by, "| unresolved:", g.unresolvedEdges.length); for (const u of g.unresolvedEdges) console.log("  UNRESOLVED", u.provenance, "→", u.to, "—", u.reason)'

Sequence — don't run all six cold. Start with audit-drift.sh (cheap, names consolidation candidates). The HEAVY audit-archived.sh L1/L2/L3 scan only earns its cost once the catalog is sizable — skip it under ~20 chosen stories (nothing to prune yet). Run audit-controls.sh + extract-component-usage.sh when you're checking coverage; refresh-usage.sh --docs is the all-in-one rendered refresh — run it last, not alongside the individual extractors it supersedes.

One-command usage refresh. refresh-usage.sh runs all four extractors (inventory/token map, component prop-usage, routes, design-system health — every rendered file; see CONTEXT.md §STORAGE MAP) and — with --docs — re-stamps every <Name>.usage.mdx. The autodocs import the JSON, so a Storybook rebuild after this reflects current reality with no hand-editing. Trigger it three ways: per-script (here, or call one extractor directly), every audit (this step), or in CI before storybook build. The usage prop on StateGrid/StateMatrix reads the same JSON to badge each variant cell with its real call-site count (declared-but-unused → struck through).

Auto-refresh usage (no human authoring). Re-running extract-component-usage.sh here keeps component-usage.json current as the app changes; the usage-profile.mdx autodocs read that JSON at build time, so the "real usage in this app" tables update themselves on the next Storybook build. Wire the same one-liner into CI for repos that want it always fresh. If usage shifted (a variant that was declaredButUnused is now shipped, or vice-versa), flag the affected stories' usage:unused tags as a drift finding.

Decide (ask yourself)

  • Drift — 17 names for "empty state" → consolidation candidate; 1 cluster → noise, ignore.
  • Archive — audit-archived.sh flags >20 chosen stories → prune to the durable ledger seeded from templates/design-decisions.md ($SKILL/scripts/prune-to-ledger.sh); otherwise leave it.
  • Pending decisions — stale decision:pending → remind stakeholders.
  • Controls coverage — audit-controls.sh flags component stories that pass args but wire neither argTypes nor a controls-disable (so they expose no usable Controls panel), and warns if .storybook/manager.ts doesn't showPanel. Fix by wiring argTypes (unions → select, flags → boolean, group via table.category, hide non-serializable props) — or disabling controls on render-only stories — per the Controls pattern in sb-stories (its without-mcp reference, §13).
  • Flow / app-graph drift — the validate step above prints edges-by-attribution + every UNRESOLVED. If unresolvedEdges grew, or a new entry's reason is "dynamic dispatch" / a nav idiom the extractor doesn't parse, that's a real edge being dropped — the app added a navigation pattern the script misses. Work the under-extraction loop in sb-flows (flow-capture.md), extend the repo-local extract-app-graph.mjs, re-validate. Never accept a silently shrinking map: an edge with no source is unresolved, not absent. (Same JSON also feeds the component lists — a component that lost all parents/pages is a dead-component or import-trace finding.)

Load references/galleries-and-tags.md when scaffolding a TagGallery, references/lifecycle-tags.md for archive/deprecation, references/propagate-workflow.md when a prune candidate appears, references/anti-patterns.md when reviewing AI-generated stories (the full list — mega-stories, inline mocks, CSF2, pseudo-class misuse) — pick based on what surfaced, don't load all four.

Ledger (durable memory you steer)

Append findings to .storybook/audit/findings.md (timestamped, append-only). Log-only rule: a real prod issue out of scope for the story pass (unassociated <label>, sub-AA contrast, headless crash) gets a LOG-ONLY: marker — record it, keep moving, don't touch app code unless asked. After seeding the ledger, prompt to commit it (git add .storybook/audit/) — an uncommitted ledger is one git clean from gone.

Next

/sb-hub → usually a sb-stories consolidation pass or a sb-ship for a graduated Explore.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Sb Audit」では何ができますか?

Periodic Storybook audit — naming-drift survey, archived/decision-board review, lifecycle tagging, usage refresh. Use for 'audit my Storybook', 'find drift', 'show pending decisions', or a periodic catalog health check.

TypingMindでSb Auditを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Sb Auditはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSb Auditをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/strongeron/storybook-workbench/tree/main/skills/sb-auditを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Sb Auditを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Sb Auditで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSb Auditを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Sb Audit」は無料ですか?

はい。strongeronがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇