Use when creating or improving component documentation in Storybook. Helps generate comprehensive docs using MDX, autodocs, and JSDoc comments.
View on GitHubTheBushidoCollective/han
jutsu-storybook
jutsu/jutsu-storybook/skills/storybook-component-documentation/SKILL.md
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-storybook/skills/storybook-component-documentation/SKILL.md -a claude-code --skill storybook-component-documentationInstallation paths:
.claude/skills/storybook-component-documentation/# Storybook - Component Documentation
Create comprehensive, auto-generated component documentation using Storybook's autodocs feature, MDX pages, and JSDoc comments.
## Key Concepts
### Autodocs
Automatically generate documentation pages from stories:
```typescript
const meta = {
title: 'Components/Button',
component: Button,
tags: ['autodocs'], // Enable auto-documentation
parameters: {
docs: {
description: {
component: 'A versatile button component with multiple variants and sizes.',
},
},
},
} satisfies Meta<typeof Button>;
```
### MDX Documentation
Create custom documentation pages with full control:
```mdx
import { Meta, Canvas, Story, Controls } from '@storybook/blocks';
import * as ButtonStories from './Button.stories';
<Meta of={ButtonStories} />
# Button Component
A versatile button component for user interactions.
## Usage
<Canvas of={ButtonStories.Primary} />
## Props
<Controls of={ButtonStories.Primary} />
```
### JSDoc Comments
Document component props for auto-extraction:
```typescript
interface ButtonProps {
/**
* The button label text
*/
label: string;
/**
* Is this the principal call to action?
* @default false
*/
primary?: boolean;
/**
* Button size variant
* @default 'medium'
*/
size?: 'small' | 'medium' | 'large';
}
```
## Best Practices
### 1. Enable Autodocs
Add the `autodocs` tag to generate documentation automatically:
```typescript
const meta = {
component: Button,
tags: ['autodocs'],
parameters: {
docs: {
description: {
component: 'Button component with primary and secondary variants.',
},
},
},
} satisfies Meta<typeof Button>;
```
### 2. Document Component Descriptions
Provide clear, concise component descriptions:
```typescript
const meta = {
component: Tooltip,
tags: ['autodocs'],
parameters: {
docs: {
description: {
component: `
Tooltip displays helpful information when users h