Skip to main content
EQ
Foundry
Back to Browse

eq-storybook-test

Beta

Decide whether a component needs a Storybook story and what belongs in play() vs .test.tsx: prevents over-duplication and under-testing

Installation

npx skills add mclaude95/eq-foundry -s eq-storybook-test

Recommended. Works with Claude Code, Cursor, and 40+ agents.

Performance

Optimized for speed with minimal overhead. Runs efficiently in CI and local environments.

Security

Sandboxed execution with scoped permissions. No external data leaves your environment.

Overview

eq-storybook-test works alongside /eq-execute after TDD to decide whether a component needs a Storybook story, and if so, what belongs in play() vs .test.tsx. Prevents over-duplication (same interaction tested in both places) and under-testing (story exists but has no assertions).

When to Use

Use alongside /eq-execute when implementing any component that has:

  • User interactions (forms, accordions, modals, carousels, tabs)
  • Multiple visual states needing a11y coverage
  • Conditional rendering logic
  • Lives in packages/ui/src/ (design system components always get stories)

Decision Rules

SignalStory required?
Component is in packages/ui/src/ (design system)Always: document all variants
Component has interactions worth showing as living docsYes: play() documents intent, .test.tsx covers edge cases
Component has multiple visual states (loading, error, empty, success)Yes: each state = one story export
.test.tsx covers interactions with no visual/doc valueSkip story: tests sufficient
Simple stateless layout wrapperSkip story: no a11y value, no doc value

Testing Boundary

Concern.test.tsxplay() in story
Component logic, edge cases, error branchesHereNot here
Interaction documentation (living spec)NoHere
A11y gate on every story stateNoFree via addon-a11y
Form submission, toggle, accordion flowsEitherPrefer here: doubles as docs

Usage Examples

/eq-storybook-test src/components/ToolBrowser.tsx

Checks the existing .test.tsx, applies decision rules, and generates stories only where they add value: with play() functions for interaction documentation and free a11y coverage.

Configuration

Requires Storybook 10+ with storybook/test imports (not @storybook/test).

Installation

npx skills add mclaude95/eq-foundry -s eq-storybook-test