storybook-guidelines

Define Storybook story creation guidelines for conditional rendering states.

Updated Dec 29, 2025
One-click install
npx skills add https://github.com/asakuno/template-repository --skill storybook-guidelines-asakuno
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: storybook-guidelines
Source: https://github.com/asakuno/template-repository/tree/main/.claude/skills/storybook-guidelines
Command: npx skills add https://github.com/asakuno/template-repository --skill storybook-guidelines-asakuno

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill defines standard practices for authoring Storybook stories to ensure visual testing focuses on meaningful UI variations and avoids duplicates from simple prop differences.

Core Features & Use Cases

  • Establishes clear rules for when to create stories that exercise conditional rendering (e.g., error, loading, authentication states) and when to omit unnecessary variants.
  • Provides Minimal Meta guidance, naming conventions in Japanese, anti-patterns to avoid, and a reference structure with story-patterns.md.
  • Enables teams to document and maintain consistent Storybook patterns across projects.

Quick Start

Start by auditing components for conditional UI branches and craft a Default story plus explicit branches (e.g., ErrorState, Loading, NotLoggedIn) to showcase visual differences.

Frequently Asked Questions about storybook-guidelines

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

FAQPage Schema
How do I write Storybook stories for components with conditional rendering states?

Storybook stories for conditional rendering should explicitly branch into Default, ErrorState, Loading, and NotLoggedIn variants to showcase meaningful visual differences rather than simple prop changes. This approach ensures visual testing focuses on impactful UI variations and avoids duplicate stories.

What are common Storybook anti-patterns to avoid when creating component stories?

Common Storybook anti-patterns include creating unnecessary story variants from simple prop differences instead of focusing on conditional UI branches. The guidelines provide reference patterns with a story-patterns.md document to help teams avoid these duplicates and maintain meaningful visual testing coverage.

How do I configure minimal Meta in Storybook for consistent visual regression testing?

Minimal Meta configuration in Storybook requires defining only essential metadata fields to standardize story creation. This establishes clear rules for exercising conditional rendering states like error, loading, and authentication, ensuring visual regression testing captures meaningful UI variations across components.

When should I create separate Storybook stories versus omitting unnecessary variants?

You should create separate Storybook stories when components have conditional rendering branches for error, loading, or authentication states that produce visually distinct UI. Omit variants that only differ by simple prop values, as these create duplicates that dilute visual testing focus without adding meaningful coverage.

Can I use Japanese naming conventions for Storybook stories and still maintain consistent patterns?

Yes, Japanese naming conventions are supported within the Storybook story creation guidelines. The skill defines standard practices that accommodate Japanese naming while enforcing consistent visual testing patterns, minimal Meta configuration, and documented anti-patterns across project teams.

What's the best way to document Storybook story patterns across multiple projects?

Documenting Storybook story patterns across projects requires a reference structure with a story-patterns.md file that captures naming conventions, minimal Meta guidance, and anti-patterns. This enables teams to audit components for conditional UI branches and maintain consistent visual testing standards throughout development.