new-story

Generate Storybook stories with real rendering, CSS classes, and mocked data.

411|21|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/luxury-yacht/app --skill new-story
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-story
Source: https://github.com/luxury-yacht/app/tree/main/.agents/skills/new-story
Command: npx skills add https://github.com/luxury-yacht/app --skill new-story

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate accurate Storybook stories for UI components without relying on approximations, so developers can preview states confidently and catch integration issues early.

Core Features & Use Cases

  • Real component rendering: Imports and renders the actual component to match production behavior.
  • Real CSS integration: Uses the project’s existing CSS classes instead of inline-style mimics.
  • Realistic props and mocked data: Mocks data sources (e.g., Go backend calls) while preserving real rendering.
  • Hook and provider correctness: Traces all hook dependencies to select the correct Storybook decorators/providers.
  • Comprehensive state coverage: Creates stories for default, loading, error, empty, and other meaningful prop variations.
  • Placement and verification discipline: Places stories next to the component and validates compilation with TypeScript checks.

Quick Start

Use /new-story frontend/src/ui/modals/MyModal.tsx to generate a .stories.tsx file that renders MyModal using the project’s real decorators, mocks, and CSS classes.

Frequently Asked Questions about new-story

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Storybook stories for a React component with real data?

To generate Storybook stories, you import the actual React component and render it using real CSS classes and realistic mocked data while matching hook and provider dependencies for accurate previews.

How do I mock backend data in Storybook stories for UI components?

You mock backend data in Storybook stories by using existing frontend mocks for backend calls while preserving real component rendering, ensuring deterministic previews for various prop and state variations.

What is the best way to cover loading and error states in Storybook?

The best way to cover loading and error states in Storybook is to generate comprehensive stories for default, loading, error, empty, and variant states using realistic mocked data and correct decorators.

Does generating Storybook stories require TypeScript compilation checks?

Yes, generating Storybook stories requires verifying the result by running TypeScript compilation with noEmit to ensure the .stories.tsx file integrates correctly without type errors.

Can I use existing decorators when creating Storybook stories for React components?

Yes, you can use existing decorators when creating Storybook stories, as the process traces all hook dependencies to select the correct Storybook decorators and providers for the React component.

Where should I place the .stories.tsx file for a React component?

You should place the .stories.tsx file beside the actual component file to maintain placement discipline and ensure the Storybook stories correctly import and render the real component.