Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
oakoss avatar

Storybook Stories

  • 81 installs
  • 14 repo stars
  • Updated March 2, 2026
  • oakoss/agent-skills

Helps with ai & agent building tasks during AI-assisted development.

About

storybook-stories is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • storybook-stories
  • AI & Agent Building
  • AI-coding skill

Storybook Stories by the numbers

  • 81 all-time installs (skills.sh)
  • +2 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #5,216 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oakoss/agent-skills --skill storybook-stories

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs81
repo stars14
Last updatedMarch 2, 2026
Repositoryoakoss/agent-skills

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

Storybook Stories

Overview

Storybook is a frontend workshop for building UI components in isolation. Stories are written in Component Story Format 3 (CSF3), which uses object syntax with args for type-safe component documentation and testing.

When to use: Component documentation with live examples, interaction testing with play functions, visual regression testing, accessibility validation, design system maintenance, isolated component development.

When NOT to use: End-to-end testing (use Playwright/Cypress), API integration testing (use Vitest/Jest), full application testing (use browser automation), performance testing (use Lighthouse/WebPageTest).

Quick Reference

PatternAPIKey Points
Basic storyexport const Default: Story = { args }Use args for simple single components
Complex storyexport const Example: Story = { render }Use render for multi-component layouts
Meta configurationconst meta = { component, args } satisfies MetaDefine defaults and argTypes
Interaction testplay: async ({ canvas, userEvent, args })canvas and userEvent provided directly
User interactionawait userEvent.click(element)Always await userEvent methods
Query elementscanvas.getByRole('button')Prefer getByRole over other queries
Assertionsawait expect(args.onPress).toHaveBeenCalled()Use storybook/test assertions
beforeEach hookbeforeEach: async ({ args }) => {}Setup mocks before story renders
Play compositionawait OtherStory.play?.(context)Reuse setup across stories
Autodocstags: ['autodocs']Enable automatic documentation
Controls customizationargTypes: { variant: { control: 'select' } }Configure control panel
Decoratorsdecorators: [withTheme]Add wrappers or context providers
Parametersparameters: { layout: 'centered' }Configure addon behavior per story
Chromatic snapshotparameters: { chromatic: { delay: 300 } }Control visual regression captures
Disable snapshotparameters: { chromatic: { disableSnapshot: true } }Skip story in visual tests
A11y testingawait expect(button).toHaveAccessibleName()Validate accessible labels

Common Mistakes

MistakeCorrect Pattern
Using args with multi-component layoutsUse render for complex compositions
Not awaiting userEvent methodsAlways await: await userEvent.click(button)
Using within(canvasElement) manuallyDestructure canvas from play context directly
Using getByTestId firstPrefer getByRole, getByLabelText, getByText
Missing default args at meta levelAdd args to meta to prevent placeholder controls
Exposing non-serializable propsDisable className, ref, style in argTypes
Not composing play functionsReuse setup with await BaseStory.play?.(context)
Forgetting to mock callbacksUse fn() for event handlers: args: { onPress: fn() }
Missing accessible names for icon buttonsAdd aria-label or use aria-labelledby
Not scoping queries for portal contentUse within(canvasElement.ownerDocument.body)
Using boolean && for conditional renderingUse ternary in stories for consistent snapshots
Not waiting for animationsWrap assertions in waitFor for async state

Common Fixes

ProblemSolution
Controls show placeholdersAdd args at meta level with default values
Serialization errorDisable className, ref, style in argTypes
Portal element not foundSearch body instead of canvas
Animation timing issuesWrap assertions in waitFor
Multiple buttons foundAdd { name: '...' } to getByRole
A11y test failingAdd label prop or aria-label

Delegation

  • Story structure review: Use code-reviewer skill for CSF3 pattern validation
  • Accessibility audit: Use Explore agent to discover ARIA patterns across stories
  • Visual regression analysis: Use Task agent to investigate Chromatic failures

References

  • Story writing patterns and CSF3 syntax
  • Interaction tests with play functions
  • Component documentation and controls
  • Visual testing with Chromatic

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.