storybook-update-component

Update Vue Storybook stories to reflect component prop, slot, and event changes.

22|23|Updated Aug 10, 2023
One-click install
npx skills add https://github.com/aziontech/azion-console-kit --skill storybook-update-component
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: storybook-update-component
Source: https://github.com/aziontech/azion-console-kit/tree/main/.claude/skills/storybook-update-component
Command: npx skills add https://github.com/aziontech/azion-console-kit --skill storybook-update-component

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a structured workflow to keep Storybook component stories aligned with Vue component changes, preventing drift between code and documentation.

Core Features & Use Cases

  • Detect and reflect changes in props, slots, and events across existing stories.
  • Align argTypes, story args, and variant stories to current component behavior.
  • Provide guidance for injection-dependent components with wrapper components when necessary.
  • Validate Storybook builds after updates and offer troubleshooting tips.

Quick Start

Provide the component file or an existing story path and follow the guided steps to synchronize Storybook stories with the updated component.

Frequently Asked Questions about storybook-update-component

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

FAQPage Schema
How do I keep Storybook stories in sync with Vue component changes?

To keep Storybook stories in sync with Vue component changes, update argTypes, slots, events, and story variants to match the modified component definitions. A guided workflow parses the updated component file, locates existing stories, and applies the necessary changes to prevent documentation drift.

What is the best way to update Storybook argTypes when props change?

The best way to update Storybook argTypes when props change is to parse the Vue component definition, extract current prop definitions, and align the argTypes and story args in existing story files to reflect the updated behavior.

How do I handle Storybook stories for Vue components with injections?

Handle Storybook stories for Vue components with injections by generating wrapper components. This approach provides the necessary injection dependencies for the component, ensuring the story renders correctly and remains functional.

Why does my Storybook build fail after updating component stories?

Your Storybook build may fail after updating component stories due to misaligned argTypes, missing slots, or unresolved events. Validate the build using the `yarn storybook:build` command and apply troubleshooting tips to resolve any drift between the stories and component definitions.

Do I need to provide an existing story file to update component documentation?

You do not need to provide an existing story file initially; providing the component file path is sufficient. The workflow locates existing stories based on the component definition and synchronizes the documentation accordingly.