Write, debug, and tune Playwright specs with locator strategy, trace diagnosis, and CI-aware timeouts.
Browser
Storybook Component Doc
Try itUse when setting up or reviewing Storybook component documentation, design-system presentation, isolated component state previews, stories, addons, decorators, MDX docs, component-state interaction checks, visual baselines, or Chromatic. For real-browser cross-page journeys or broader coverage plann
What it does
为 UI 组件建立文档化、设计系统展示和隔离状态预览环境;交互与视觉测试只覆盖 Storybook 场景内的组件状态。
The skill document
Storybook 组件文档化
Purpose
为 UI 组件建立文档化、设计系统展示和隔离状态预览环境;交互与视觉测试只覆盖 Storybook 场景内的组件状态。
Procedure
- 初始化或识别现有 Storybook 配置,沿用项目框架适配器、stories glob、主题和构建命令。
- 每个组件的 Story 覆盖默认态、主要变体、尺寸、语义 tone、disabled、loading、error、empty、selected、invalid 和关键边缘状态。
- 依赖 Router、Store、i18n、ThemeProvider 的组件用 decorators 包裹,不在 Story 中复制应用入口。
- 复杂组件用 MDX 补充使用说明、Props、slots/children、variant 矩阵、状态示例、可访问性要求和源码展示。
- 需要自动化时接入 interaction tests、addon-a11y、Chromatic 或 Storybook Test Runner;这些能力服务于组件文档和设计系统展示,不承接跨页业务旅程。
- 设计系统组件应记录 token 来源、Tailwind/class 变体、暗色模式、响应式尺寸和不支持的组合,避免消费者靠猜测拼装。
详细参考
- 需要
main.ts、preview.ts、stories、decorators、MDX、交互测试和视觉回归示例时,加载 references/story-patterns.md。
Constraints
- Story 需随组件 prop 变更同步更新。
- Provider 依赖必须通过 decorator 补齐。
- Storybook 构建产物
storybook-static/不应提交到 Git。 - Storybook 用于开发和组件文档,不替代生产页面 SEO。
- Storybook 视觉基线用于组件状态;跨页面截图和真实路由流程分流到 E2E workflow。
- 大型组件库需控制 stories glob 和 addon 开销。
- 不用 Storybook 隐藏组件 API 问题;若变体组合爆炸,应先收敛组件职责或拆分组件。
Expected Output
可交互的组件文档和设计系统展示站点,每个组件状态都有隔离预览,Props 表格可生成,关键 Storybook 场景有可选 play 测试或视觉回归基线。
Related skills
Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
Run Git operations — commits, branches, merges, rebases, conflict resolution, and recovery — with safety rules enforced.
Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.
More from bovinphang
Browse all skillsGenerate or edit diagrams, visual assets, and image workflows with reviewable PNG self-checks and bounded self-repair.
Use when creating editable technical diagrams with draw.io / diagrams.net sources, including architecture diagrams, ERD, UML, sequence diagrams, flowcharts, ML model diagrams, official shape lookup, brand symbols, Graphviz auto-layout, codebase structure maps, .drawio validation, or draw.io CLI expo
Use when building, reviewing, or improving frontend UI that needs product-specific design direction, design-system generation, Master/Page overrides, distinctive visual identity, anti-generic interface choices, first-screen hierarchy, UI polish, chart UX, interaction states, responsive behavior, or
Use when creating or reviewing Next.js 14+ App Router projects, file routes, layouts, server/client component boundaries, SSR/SSG/ISR, streaming, metadata, middleware, server actions, or Next-specific data fetching. For generic client React component architecture, apply the project's React conventio
Use when creating, reviewing, or restructuring frontend monorepos with pnpm workspace, Turborepo, Nx, multi-package dependency boundaries, task orchestration, package naming, or package publishing; Chinese triggers include monorepo, workspace, multi-package.
Use when creating or reviewing Nuxt 3 projects, file routes, pages, layouts, SSR/SSG/SPA behavior, Nuxt data fetching, route middleware, plugins, modules, server routes, or Nuxt-specific Vue 3 conventions. For generic Vue component architecture, apply the project's Vue conventions separately; Chines