chrome-devtools-storybook
БесплатноБез исполняемых скриптовНе проверен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.
от leboncoin★ 94 звезды на GitHubОб этом скилле
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
- User asks for browser-based testing or visual checks of a Storybook component
- User mentions chrome devtools, CDP, DevTools MCP, or similar
- User provides a Storybook URL on
http://localhost:6006(or another Storybook host) - You need to interact with a specific story (click, type, focus, keyboard navigation, screenshots, etc.)
Storybook URL Rules
Storybook has two kinds of URLs:
- Docs pages (outer shell with iframes and MDX):
http://localhost:6006/?path=/docs/components-accordion--docs - Story iframes (what you actually want to test):
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
Docs page URL (
?path=/docs/...):- Example:
http://localhost:6006/?path=/docs/components-accordion--docs - Extract the part after
/docs/and before--docs→ here:components-accordion - Build the default story id by appending
--default:id=components-accordion--default
- Final iframe URL:
http://localhost:6006/iframe.html?id=components-accordion--default&viewMode=story
- Example:
Story page URL (
?path=/story/...):- Example:
http://localhost:6006/?path=/story/components-accordion--with-icon - Extract everything after
/story/→ here:components-accordion--with-icon - Use this as the
iddirectly:id=components-accordion--with-icon
- Final iframe URL:
http://localhost:6006/iframe.html?id=components-accordion--with-icon&viewMode=story
- Example:
Other query params:
- Always include
viewMode=storyin the iframe URL. - If the user provides
globals,args, or other query parameters, append them to the iframe URL as-is.
- Always include
Examples
User URL:
http://localhost:6006/?path=/docs/components-accordion--docs
→ Use with chrome-devtools:http://localhost:6006/iframe.html?id=components-accordion--default&viewMode=storyUser URL:
http://localhost:6006/?path=/story/components-accordion--with-icon
→ Use with chrome-devtools:http://localhost:6006/iframe.html?id=components-accordion--with-icon&viewMode=story
Using the chrome-devtools MCP
Resolve the correct Storybook URL
- If the user gives a docs or story URL (
?path=/docs/...or?path=/story/...), first convert it to the correspondingiframe.htmlURL as described above. - If the user already gives an
iframe.htmlURL with anidandviewMode, use it directly.
- If the user gives a docs or story URL (
Navigate directly to the iframe URL
- In your MCP calls to
project-0-spark-chrome-devtools, never ask it to search inside the docs page for the story iframe. - Instead, instruct it to open the computed
iframe.htmlURL directly. This avoids the extra layer of Storybook UI and speeds up tests.
- In your MCP calls to
Run interactions and checks
- Once on the iframe URL, interact with the component as if it were a standalone page:
- Find elements by role, text, or data attributes
- Perform clicks, keyboard navigation, focus/blur, etc.
- Take screenshots or inspect DOM/CSS as needed
- Once on the iframe URL, interact with the component as if it were a standalone page:
Assumptions
- Storybook is running locally on
http://localhost:6006unless the user specifies another base URL. - Component IDs follow the standard Storybook pattern (
<group>-<component>--<storyName>). - The
--defaultstory name exists for docs pages when you derive it from...--docs.
- Storybook is running locally on
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.
Установить chrome-devtools-storybook в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл chrome-devtools-storybook?
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.
Как установить скилл chrome-devtools-storybook?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл chrome-devtools-storybook запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic