What is the storybook-stories skill?
The storybook-stories skill is a short SKILL.md from pedronauck/skills. It makes an AI coding agent create, update, refactor or troubleshoot Storybook stories by following project conventions: typed CSF metadata, shared decorators, the owning Storybook instance, and a check of the changed behavior before it stops.
Storybook-stories is one skill folder in the pedronauck/skills collection, listed in the repo's skills/mine bucket. Its frontmatter describes it as a way to create, update, refactor or troubleshoot Storybook stories using project conventions.
The body is only a handful of rules, plus a references/patterns.md file the agent reads when it needs a composition pattern. It is a convention follower, not a story generator with a fixed template.
What changes in your agent's output
- New stories land next to the nearest existing story, in the Storybook instance that owns that layer, instead of in a fresh file with new conventions.
- Providers such as QueryClient, router and MSW come from global decorators, so stories stop wrapping themselves in duplicate setup.
- Each story shows the smallest set of supported states that explains behavior, with no forced prop matrix or story count.
- Metadata is typed with
StoryObj<typeof meta>, and examples use the component's real API, not variants copied from a template. - The agent runs the owning Storybook build or visual check for the changed behavior before it reports done.
Who the storybook-stories skill is for
Best for
- Teams with an existing Storybook and house rules that agents keep breaking.
- Monorepos where primitives and app or domain stories live in different Storybook configurations.
- Reviewers tired of stories that list every prop combination but explain nothing.
- Pairing with a Figma-to-Storybook flow such as sb-figma once the stories need upkeep.
Not for
- Writing the component itself. The description excludes component implementation.
- Changing design tokens, writing end-to-end browser tests or authoring other documentation. All three are excluded.
- Projects with no Storybook yet. The skill extends what exists and has no setup step.
Use it with UiChemy
This skill documents UI components in code, not in WordPress. When a finished build has to become an editable page, UiChemy AI to WordPress imports an AI build into WordPress. Click Get Started on uichemy.com.
How to install Storybook Stories Skill: Write Stories That Match Your Repo
git clone https://github.com/pedronauck/skills.git && cp -r skills/skills/mine/storybook-stories ~/.claude/skills/storybook-storiesThe README also documents a bundled installer through the skills CLI. The manual copy above avoids it.Clone the repo
Run
git clone https://github.com/pedronauck/skills.git. The skill sits at skills/mine/storybook-stories and contains SKILL.md and a references folder.Copy the folder
The README's manual install copies a single skill with
cp -rinto~/.claude/skills/, or symlinks a whole bucket. Copy the storybook-stories folder the same way.Keep references/patterns.md
Copy the whole folder, not only SKILL.md, because the skill points the agent to references/patterns.md for composition patterns.
Ask for a story
Prompt the agent with a task such as adding a story for a component. Its description should match Storybook story work.
Check that it loaded
Ask the agent to add a story for an existing component. It should open the nearest story first and reuse the global decorators.
Key features
- Extend the nearest storyThe agent starts from the closest existing story and follows its naming conventions for that layer, instead of inventing a layout for the file.
- Find the owning StorybookIt locates the Storybook configuration that owns the component, separating primitives from app or domain stories before writing anything.
- Reuse global decoratorsQueryClient, router and MSW providers come from global decorators. The rule is to reuse them rather than duplicate providers inside each story.
- Check the primitive inventoryBefore composing examples it inspects the shared primitives and uses their public exports. Domain components stay local to their own stories.
- Typed CSF metadataStories use typed CSF metadata and
StoryObj<typeof meta>. Layout and decorators match the component's real surface, since centered layout suits some controls but not full routes. - Smallest useful set of statesThe skill asks for the fewest supported states that explain meaningful behavior. It sets no minimum or maximum story count and no exhaustive prop matrix.
- args versus renderUse
argsfor controlled props andrenderfor compound composition. A render-only story does not need emptyargs, and descriptions are added only where they explain something the canvas cannot. - Realistic and accessible examplesExamples stay interactive and accessible, built on the actual component API with no assumed variants.
- Consistent docs pagesThe agent follows the owner's existing policy on auto-generated docs, enabling or omitting the docs tag consistently so pages are not duplicated.
- Verify without extra suitesIt runs the owning Storybook build or visual check for the changed behavior and reuses existing evidence. Stories do not automatically need new unit or end-to-end tests.
Frequently asked questions
What is the storybook-stories skill?
It is a SKILL.md in the pedronauck/skills repo that guides an AI coding agent through creating, updating, refactoring and troubleshooting Storybook stories. It follows the project's own conventions, reuses global decorators, keeps examples to the states that matter, and verifies the changed behavior.
How do I install the storybook-stories skill?
Clone pedronauck/skills and copy skills/mine/storybook-stories into your agent's skills folder. The README's manual route copies a single skill into ~/.claude/skills. Keep the references folder with it, then ask the agent to add or fix a story for a component.
Does it write the component too?
No. The description says it excludes component implementation, token changes, end-to-end browser tests and other documentation. It only handles Storybook stories, so pair it with whatever skill or prompt builds the component. For design-driven build flows see design-component.
How many stories will it create per component?
There is no fixed number. The skill states no minimum or maximum story count and no exhaustive prop matrix. It aims for the smallest set of supported states that explains meaningful behavior, so a simple component may get one or two stories.
Does it work with Cursor or Codex?
The repo README says its skills follow the agentskills.io specification and shows a Claude Code install. It does not list Cursor or Codex for this skill, so confirm how your agent loads skills from a folder before relying on it.
Will it add new tests for every story?
No. The skill says to run the owning Storybook build or visual check for the changed behavior and reuse existing evidence. Stories do not automatically require new unit or end-to-end suites. For accessibility checks per component, see accessibility-per-component.
What should I check after the agent writes a story?
Confirm the story sits beside its neighbours, uses global decorators instead of its own providers, shows only supported states, and matches your docs-page setting. A final pass with a design QA checklist catches visual gaps.
Does it help with WordPress pages?
No. It edits Storybook files in a front-end project. To bring a finished AI build into WordPress as an editable page, UiChemy AI to WordPress imports an AI build. Click Get Started on uichemy.com to begin.


