storybook-story

storybook-story is a command for Claude Code from TheBeardedBearSAS/claude-craft. It costs 6 tokens per session (2,945 once invoked), scanned A, original, MIT.

A guide for writing a Storybook story for an existing React component. Storybook is a tool for viewing components separately and documenting their different states and options.

In plain words
What is it for?
Use it to create stories for buttons, forms, layouts, and more complex components, with controls and accessibility-related documentation.
Why use it?
It helps expose the component's props, variants, interactions, dependencies, and documentation in one place. This makes it easier to inspect and test the component in isolation.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { ThemeProvider } from '../src/contexts/ThemeContext';.

Part of the claude-craft plugin — 56 skills, 94 commands, 47 agents, 5 hooks shipped together

Good fit Use it to create stories for buttons, forms, layouts, and more complex components, with controls and accessibility-related documentation.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craft
agentmods
npx agentmods add commands/thebeardedbearsas/claude-craft/storybook-story

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 56 skills, 94 commands, 47 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for storybook-story

README.md
[![agentmods](https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/storybook-story/github.svg)](https://agentmods.dev/commands/thebeardedbearsas/claude-craft/storybook-story)
Your own site
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/storybook-story"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/storybook-story/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for storybook-story

Your own site · 80×15
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/storybook-story"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/storybook-story.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,945 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00006 $0.02945
Opus 5 $0.00003 $0.01473
Sonnet 5 $0.00001 $0.00589
Haiku 4.5 $0.00001 $0.00295

Measured 8d ago against content hash 17d4100189ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

storybook-story scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/react/storybook-story.md · 534 lines

How it starts

The opening of the file, as written. The whole thing — 534 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Génération Story Storybook

Tu es un développeur React senior. Tu dois générer une story Storybook complète pour un composant existant, avec toutes les variantes, contrôles interactifs et documentation.

Arguments

$ARGUMENTS

Arguments :

  • Chemin vers le composant (ex: src/components/Button/Button.tsx)
  • (Optionnel) Template : default, form, layout, complex

Exemple : /react:storybook-story src/components/Button/Button.tsx

MISSION

Étape 1 : Analyser le Composant

Lire le composant pour identifier :

  • Props et leurs types
  • Variantes (variants, sizes, states)
  • Comportements interactifs
  • Dépendances (context, providers)

Étape 2 : Structure de la Story

// src/components/{Component}/{Component}.stories.tsx
import type { Meta, StoryObj } from '@storybook/react';

import { {Component} } from './{Component}';

// Configuration Meta
const meta: Meta<typeof {Component}> = {
  title: 'Components/{Category}/{Component}',
  component: {Component},
  // Autodocs génère la documentation automatiquement
  tags: ['autodocs'],
  // Layout : centered, fullscreen, padded
  parameters: {
    layout: 'centered',
    docs: {
      description: {
        component: `
# {Component}

Description détaillée du composant, son utilisation et ses cas d'usage.

## Usage

\`\`\`tsx
import { {Component} } from '@/components/{Component}';

<{Component} variant="primary">
  Contenu
</{Component}>
\`\`\`
        `,
      },
    },
  },
  // Contrôles ArgTypes
  argTypes: {
    variant: {
      control: 'select',
      options: ['primary', 'secondary', 'outline', 'ghost'],
      description: 'Variante visuelle du composant',
      table: {
        type: { summary: 'string' },
        defaultValue: { summary: 'primary' },
        category: 'Appearance',
      },
    },
    size: {
      control: 'select',
      options: ['sm', 'md', 'lg'],
      description: 'Taille du composant',
      table: {
        type: { summary: 'string' },
        defaultValue: { summary: 'md' },
        category: 'Appearance',
      },
    },
    isDisabled: {
      control: 'boolean',
      description: 'Désactive le composant',
      table: {
        type: { summary: 'boolean' },
        defaultValue: { summary: 'false' },
        category: 'State',
      },
    },
    isLoading: {
      control: 'boolean',
      description: 'Affiche un état de chargement',
      table: {
        category: 'State',
      },
    },
    onClick: {
      action: 'clicked',
      description: 'Callback au clic',
      table: {
        category: 'Events',
      },
    },
    children: {
      control: 'text',
      description: 'Contenu du composant',
      table: {
        category: 'Content',
      },
    },
  },
  // Args par défaut
  args: {
    children: 'Click me',
    variant: 'primary',
    size: 'md',
    isDisabled: false,
    isLoading: false,
  },
};

export default meta;
type Story = StoryObj<typeof {Component}>;

Read the full file on GitHub · 534 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 534 lines · 6 tokens per session scan A 17d4100189ec

Subscribe to this mod's changes

storybook-story is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed yesterday), licensed MIT. It adds 6 tokens to every session and 2,945 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other commands, from other repositories

design-to-code

Mockup-to-component pipeline using Google Stitch, 21st.dev, and Storybook MCP. Accepts a screenshot, a description, or a URL and produces production-ready React components, checking existing Storybook components before generating anything new. Use when implementing UI from a mockup or screenshot. To call the MCP tool…

yonatangross/orchestkit · 86 tokens

design-import

Scaffolds React components from a Claude Design handoff bundle and stops at files on disk: no stories, no tests, no pull request. Use when handed a claude.ai/design URL or a local bundle file; when that same scaffold should carry on through test generation, browser verification and an opened PR, run /ork:design-ship…

yonatangross/orchestkit · 74 tokens

component-search

Search 21st.dev component registry for production-ready React components. Finds components by natural language description, filters by framework and style system, returns ranked results with install instructions. Use when looking for UI components, finding alternatives to existing components, or sourcing design system…

yonatangross/orchestkit · 57 tokens

checklist

Generate a custom checklist for the current feature based on user requirements.

github/spec-kit · 13 tokens

clarify

Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.

github/spec-kit · 27 tokens

specify

Create or update the feature specification from a natural language feature description.

github/spec-kit · 13 tokens