add-story

Generates TypeScript test files with visual states and interaction tests for Storybook components.

1|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/hypeJunction/ai-assistant-starter --skill add-story
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-story
Source: https://github.com/hypeJunction/ai-assistant-starter/tree/main/skills/add-story
Command: npx skills add https://github.com/hypeJunction/ai-assistant-starter --skill add-story

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of comprehensive Storybook stories, ensuring components have adequate visual and interactive test coverage without manual effort.

Core Features & Use Cases

  • Automated Story Creation: Generates .stories.tsx files with meta configurations, visual states, and play functions.
  • Test Plan Generation: Includes a Given/When/Then test plan at the top of each story file.
  • Use Case: When developing a new Button component, use this Skill to quickly generate its Storybook stories, covering default, disabled, and loading states, along with interaction tests for click events.

Quick Start

Use the add-story skill to create Storybook stories for the Button component.

Frequently Asked Questions about add-story

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

FAQPage Schema
How do I generate Storybook stories for React components automatically?

To generate Storybook stories for React components automatically, use this Skill to produce .stories.tsx files complete with meta configurations, visual states, and play functions for interactive testing.

What is included when automating Storybook story creation?

Automating Storybook story creation includes generating .stories.tsx files with meta configurations, comprehensive visual states, play functions for interaction tests, and a Given/When/Then test plan at the top of each file.

What dependencies do I need to create interactive Storybook play functions?

You need Storybook and @storybook/test installed to create interactive play functions, and you can optionally use MSW for API mocking to simulate network requests within your stories.

Does this Storybook story generator work with API mocking?

Yes, this Storybook story generator works with API mocking by optionally integrating MSW, allowing you to mock network requests and generate stories that cover component loading and error states.

Can I generate visual test coverage for multiple UI component states?

Yes, you can generate visual test coverage for multiple UI component states such as default, disabled, and loading, by configuring the automated story files to cover various interactive scenarios.

What is the best way to add interaction tests to Storybook stories?

The best way to add interaction tests to Storybook stories is by automating the generation of play functions within your .stories.tsx files, which directly test component click events and user interactions.