Chrome devtools storybook

From leboncoin/spark-web · View interactive version

Chrome devtools storybook is an AI agent skill from the GitHub repository leboncoin/spark-web. Use the chrome-devtools MCP to run browser tests on local Storybook stories by navigating directly to `iframe.html` story URLs instead of the outer docs pages.

How to use this skill

Skill file

Chrome DevTools + Storybook Browser Tests

Use the project-0-spark-chrome-devtools MCP server to run browser-level tests and interactions against local Storybook stories. Storybook renders stories inside iframes on the docs pages, so you must always target the underlying iframe.html story URL to avoid unnecessary DOM exploration.

When to Use

Storybook URL Rules

Storybook has two kinds of URLs:

http://localhost:6006/?path=/docs/components-accordion--docs

http://localhost:6006/iframe.html?id=components-accordion--default&viewMode=story

Always navigate chrome-devtools to the iframe URL, not the docs page.

Converting docs/story URLs to iframe URLs

  1. Docs page URL (?path=/docs/...):
  1. Story page URL (?path=/story/...):
  1. Other query params:

Examples

→ Use with chrome-devtools:

http://localhost:6006/iframe.html?id=components-accordion--default&viewMode=story

→ Use with chrome-devtools:

http://localhost:6006/iframe.html?id=components-accordion--with-icon&viewMode=story

Using the chrome-devtools MCP

  1. Resolve the correct Storybook URL
  1. Navigate directly to the iframe URL
  1. Run interactions and checks
  1. Assumptions

By always converting to the iframe.html URL first, the chrome-devtools MCP avoids wasting time exploring Storybook’s outer docs UI and directly loads the markup for the story under test.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.