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.
62
72%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./.cursor/skills/chrome-devtools-storybook/SKILL.mdUse 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.
http://localhost:6006 (or another Storybook host)Storybook has two kinds of URLs:
http://localhost:6006/?path=/docs/components-accordion--docshttp://localhost:6006/iframe.html?id=components-accordion--default&viewMode=storyAlways navigate chrome-devtools to the iframe URL, not the docs page.
Docs page URL (?path=/docs/...):
http://localhost:6006/?path=/docs/components-accordion--docs/docs/ and before --docs → here: components-accordion--default:
id=components-accordion--defaulthttp://localhost:6006/iframe.html?id=components-accordion--default&viewMode=storyStory page URL (?path=/story/...):
http://localhost:6006/?path=/story/components-accordion--with-icon/story/ → here: components-accordion--with-iconid directly:
id=components-accordion--with-iconhttp://localhost:6006/iframe.html?id=components-accordion--with-icon&viewMode=storyOther query params:
viewMode=story in the iframe URL.globals, args, or other query parameters, append them to the iframe URL as-is.User URL: http://localhost:6006/?path=/docs/components-accordion--docs
→ Use with chrome-devtools:
http://localhost:6006/iframe.html?id=components-accordion--default&viewMode=story
User 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
Resolve the correct Storybook URL
?path=/docs/... or ?path=/story/...), first convert it to the corresponding iframe.html URL as described above.iframe.html URL with an id and viewMode, use it directly.Navigate directly to the iframe URL
project-0-spark-chrome-devtools, never ask it to search inside the docs page for the story iframe.iframe.html URL directly. This avoids the extra layer of Storybook UI and speeds up tests.Run interactions and checks
Assumptions
http://localhost:6006 unless the user specifies another base URL.<group>-<component>--<storyName>).--default story name exists for docs pages when you derive it from ...--docs.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.
76a3678
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.