Join live: Storybook 11 AMA with the team
Docs AI
Storybook Docs

Using Storybook with AI

Storybook helps your coding agent build UI that fits your project. Your agent reuses the components you already have, writes stories for what it builds, knows how to test them, and can show you a review to check the result.

What your agent can do

  • Set up Storybook: configure Storybook for your project and write the first stories.
  • Change UI: look up existing components, write or update stories for each change, know how to run the story tests with accessibility checks, and offer a review.
  • Answer questions about components: choose the right component and use only the props it documents.
  • Show you its work: a review groups the stories that a change affects, so you can check them in one place.

How it works

Storybook gives your agent skills: short instruction files in your repository that tell the agent what to do and when. Each skill gets its full instructions from your installed Storybook. The instructions match your framework, renderer, and Storybook version, so they stay correct when you upgrade.

A section in your project's AGENTS.md tells your agent which skills to use and how to run the story tests for a UI change. You can edit or remove it.

Projects that prefer using MCP tools instead of skills can connect to the Storybook MCP server instead.

Get started

  1. Connect your agent to Storybook.
  2. If your project doesn't have stories yet, have your agent set up Storybook.
  3. Ask your agent to build some UI. It follows the Storybook section in AGENTS.md and ends with a line that offers a review. Ask for it to see the changed components in Storybook.

To get the best results, follow the best practices for documenting your components.

More AI resources