← 返回 Skills 市场
Storybook Component Doc
作者
Bovin Phang
· GitHub ↗
· v2.5.0
· MIT-0
29
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install fec-storybook-component-doc
功能描述
Use when setting up or reviewing Storybook component documentation, design-system presentation, isolated component state previews, stories, addons, decorator...
使用说明 (SKILL.md)
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 测试或视觉回归基线。
安全使用建议
Before installing, confirm you want an agent to modify Storybook-related project files and possibly add Storybook, addon-a11y, test-runner, or Chromatic tooling. Keep any Chromatic project token in CI secrets or local secret storage rather than committing it.
能力评估
Purpose & Capability
The stated purpose is to help set up or review Storybook component docs, isolated component states, MDX docs, interaction tests, accessibility addons, and visual baselines; the artifact content stays within that scope.
Instruction Scope
Instructions are scoped to project Storybook configuration, stories, decorators, MDX examples, and optional Storybook/Chromatic test commands, with explicit boundaries against using Storybook for cross-page E2E workflows.
Install Mechanism
The package contains only markdown and JSON files, declares no dependencies or lifecycle scripts, and has no executable files; examples use normal user-invoked npx commands.
Credentials
The expected project access is proportionate for documenting UI components and design-system states; no broad local indexing, credential harvesting, unrelated network calls, or destructive file operations are requested.
Persistence & Privilege
No hidden persistence, privilege escalation, background worker, or automatic startup behavior is present. The reference mentions Chromatic with a project token placeholder, which is expected for visual regression but should be handled as a secret.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install fec-storybook-component-doc - 安装完成后,直接呼叫该 Skill 的名称或使用
/fec-storybook-component-doc触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.5.0
- Added comprehensive Chinese/English SKILL.md detailing Storybook component documentation workflow and best practices.
- Clarified requirements for Story coverage, decorators, MDX usage, and visual/interaction testing.
- Included explicit constraints for Provider dependencies, Git exclusions, and component API clarity.
- Outlined expected outputs: interactive documentation site, exhaustive state previews, auto-generated Props tables, and baseline testing options.
元数据
常见问题
Storybook Component Doc 是什么?
Use when setting up or reviewing Storybook component documentation, design-system presentation, isolated component state previews, stories, addons, decorator... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 29 次。
如何安装 Storybook Component Doc?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install fec-storybook-component-doc」即可一键安装,无需额外配置。
Storybook Component Doc 是免费的吗?
是的,Storybook Component Doc 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Storybook Component Doc 支持哪些平台?
Storybook Component Doc 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Storybook Component Doc?
由 Bovin Phang(@bovinphang)开发并维护,当前版本 v2.5.0。
推荐 Skills