/storybook-assistant:natural-language-generationfrom storybook-assistant
Generates typed React components, Storybook stories, and tests from plain-English descriptions, including props, variants, and accessibility.
Ships in storybook-assistant. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate complete, production-ready components from natural language descriptions. Simply describe what you want in plain English, and get fully-typed TypeScript components with props, variants, stories, and tests.
Example:
"Create a user profile card with an avatar on the left, name and title stacked vertically in the middle, and a follow button on the right. Include an online status indicator and verified badge."
→ Generates complete UserProfileCard component with all requested features, TypeScript interfaces, 8+ story variants, and accessibility baked in.
AI extracts structured requirements:
Creates complete implementation:
Comprehensive Storybook coverage:
User Input:
"I need a notification card with an icon, title, message, timestamp, and dismiss button. Support success, warning, error types with different colors. Auto-dismiss after 5 seconds but allow pinning."
AI Analysis:
{
"name": "NotificationCard",
"elements": ["Icon", "Title", "Message", "Timestamp", "DismissButton"],
"variants": ["Success", "Warning", "Error"],
"props": {
"type": "success | warning | error",
"title": "string",
"message": "string",
"timestamp": "Date",
"onDismiss": "() => void",
"pinned": "boolean",
"autoDismiss": "boolean"
},
"behavior": {
"autoDismiss": { "delay": 5000, "conditional": "!pinned" }
},
"accessibility": {
"role": "alert",
"ariaLive": "polite"
}
}
Generated Output:
// NotificationCard.tsx
import { useEffect, useState } from 'react';
import { X, CheckCircle, AlertTriangle, XCircle } from 'lucide-react';
interface NotificationCardProps {
type: 'success' | 'warning' | 'error';
title: string;
message: string;
timestamp: Date;
onDismiss: () => void;
pinned?: boolean;
autoDismiss?: boolean;
}
const icons = {
success: CheckCircle,
warning: AlertTriangle,
error: XCircle,
};
const colors = {
success: 'bg-green-50 border-green-200 text-green-900',
warning: 'bg-yellow-50 border-yellow-200 text-yellow-900',
error: 'bg-red-50 border-red-200 text-red-900',
};
export function NotificationCard({
type,
title,
message,
timestamp,
onDismiss,
pinned = false,
autoDismiss = true,
}: NotificationCardProps) {
const [isVisible, setIsVisible] = useState(true);
const Icon = icons[type];
useEffect(() => {
if (autoDismiss && !pinned) {
const timer = setTimeout(() => {
setIsVisible(false);
onDismiss();
}, 5000);
return () => clearTimeout(timer);
}
}, [autoDismiss, pinned, onDismiss]);
if (!isVisible) return null;
return (
<div
className={`flex items-start gap-3 p-4 border rounded-lg ${colors[type]}`}
role="alert"
aria-live="polite"
>
<Icon className="w-5 h-5 mt-0.5" aria-hidden="true" />
<div className="flex-1">
<h3 className="font-semibold">{title}</h3>
<p className="text-sm mt-1">{message}</p>
<time className="text-xs opacity-75 mt-2 block">
{timestamp.toLocaleTimeString()}
</time>
</div>
<button
onClick={onDismiss}
className="p-1 hover:bg-black/5 rounded"
aria-label="Dismiss notification"
>
<X className="w-4 h-4" />
</button>
</div>
);
}
// NotificationCard.stories.tsx
import type { Meta, StoryObj } from '@storybook/react';
import { fn } from 'storybook/test';
import { NotificationCard } from './NotificationCard';
const meta = {
title: 'Components/NotificationCard',
component: NotificationCard,
args: {
onDismiss: fn(),
timestamp: new Date(),
},
} satisfies Meta<typeof NotificationCard>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Success: Story = {
args: {
type: 'success',
title: 'Payment successful',
message: 'Your payment of $99.00 has been processed.',
},
};
export const Warning: Story = {
args: {
type: 'warning',
title: 'Storage almost full',
message: 'You are using 90% of your storage quota.',
},
};
export const Error: Story = {
args: {
type: 'error',
title: 'Connection failed',
message: 'Unable to connect to server. Please try again.',
},
};
export const Pinned: Story = {
args: {
...Success.args,
pinned: true,
},
};
export const NoAutoDismiss: Story = {
args: {
...Success.args,
autoDismiss: false,
},
};
User Input:
"Create a data table component with sortable columns, row selection, pagination, and a search bar. Include actions menu for each row."
Generated: Complete DataTable component with:
AI infers standard patterns:
Every generated component includes:
The component-generator-agent handles complex generation:
See: agents/component-generator.md
❌ "Create a card component"
✅ "Create a product card with image, title, price, rating stars, and add to cart button"
❌ "Create a user card with avatar and name"
✅ "Create a user card with avatar on the left, name and bio stacked on the right"
❌ "Create a button"
✅ "Create a button with loading state, disabled state, and success state after click"
❌ "Create a modal"
✅ "Create a modal that opens on button click, has a close X button, closes on ESC key, and closes on backdrop click"
Pre-built patterns for common requests:
See: skills/natural-language-generation/examples/common-patterns.md
What Works:
What Needs Manual Work:
For complex requirements, NL generation provides 80% scaffold + manual refinement.
Natural language → Production code in seconds:
Result: 10x faster prototyping, accessible to non-developers.
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (flight505/storybook-assistant) — no native marketplace selected
npx claudepluginhub p/flight505-storybook-assistant18 skills in this plugin
/accessibility-remediationUse this skill when the user writes/edits components, asks to "fix accessibility issues", "add ARIA labels", "improve accessibility", "check WCAG compliance", "remediate a11y violations", mentions "screen reader support", "keyboard navigation", or wants AI-powered accessibility fixes with one-click application. Automatically analyzes components for a11y issues and suggests context-aware fixes. Trigger on PostToolUse hook or explicit request./ci-cd-generatorUse this skill when the user asks to "setup CI/CD", "configure GitHub Actions", "deploy Storybook", "setup Chromatic", "add visual regression to CI", "create deployment pipeline", or wants to generate complete CI/CD workflows for Storybook deployment and testing./component-scaffoldScaffold new components with stories, tests, and documentation following SOTA patterns and best practices/Component-Usage-AnalyticsComponent Usage AnalyticsUse this skill when users mention "component usage", "where is this component used", "deprecate component", "migration impact", "component analytics", or want to track and analyze component usage across the codebase with deprecation planning and migration impact analysis./dark-mode-generationUse this skill when the user asks to "generate dark mode", "create dark theme", "add dark mode support", "convert to dark mode colors", "generate dark color palette", or wants to automatically generate dark mode variants for their components with intelligent color inversion and accessibility preservation./design-to-codeUse this skill when the user uploads a design screenshot, shares a Figma export, provides a mockup image, or asks to "convert design to code", "build from mockup", "generate component from screenshot", "extract design to React", or wants to transform visual designs into production-ready components using Claude's vision capabilities.Other plugins' skills for the same job