ui-workflow
它能做什么
这个技能引导 AI 在使用 Storybook 的项目中进行用户界面改动。内容涵盖复用组件、编写和更新 story、运行 story 测试以及准备审阅。适合使用 Storybook 的前端团队。
适用场景
- ✓当你希望通过 Storybook story 完成并检查界面改动的时候。
- ✓当你新建、修改或删除前端组件,并需要保持其 story 同步的时候。
- ✓当你希望与团队分享界面改动的可视化审阅的时候。
技能链接
https://github.com/storybookjs/storybook/blob/next/code/lib/claude-plugin/skills/ui-workflow/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我们的产品卡片添加加载状态,更新它的 story,并准备一份我可以查看的审阅。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 按固定顺序进行:先查找现有组件,编写或更新 story,运行 story 测试,然后准备审阅。部分步骤需要在正确的包文件夹中运行 Storybook 开发服务器。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Prerequisites:
- Storybook must be installed in the project. Invoke the
/storybook-initskill to set up Storybook, but only if the user explicitly invoked this skill and approves a Storybook installation. - Storybook must be 11.0 or later. An 11.0 prerelease (
11.0.0-alpha.x) or a canary build (0.0.0-pr-*) also counts. Treat a request to set up or install Storybook as approval to perform any required Storybook upgrade. For other requests, invoke the/storybook-upgradeskill only after the user explicitly approves an upgrade.
Run the Storybook dev server and every Storybook CLI command from the same working directory: the package where Storybook is installed (in a monorepo often a leaf package such as packages/ui).
If the sandbox blocks network access or ports, request escalated permissions for Storybook CLI commands; otherwise the dev server can fail in confusing ways (for example, it finds no free port to bind to).
Run npx storybook skills ui-workflow and read the output in its entirety to get the mandatory, ordered workflow for working on UI changes, writing stories, and keeping stories in sync with every frontend component you create, modify, or delete. This workflow explains how to write stories, preview stories, and display a curated Storybook review.
Some commands require a running Storybook dev server:
- Reuse a dev server that already serves this project's Storybook (probe the URL, usually
http://localhost:6006) instead of starting a second one. Otherwise start one in the background, using the project's preferred package manager and existingpackage.jsonStorybook script (e.g.npm run storybook) instead of inventing a new command whenever possible. Wait until the URL responds before running commands that need it. - The dev server is part of the deliverable, not a temporary verification tool: leave it running when your work is done so the user can keep browsing stories. Never kill it after verification.
常见问题
它需要运行中的 Storybook 服务器吗?
部分步骤需要。该技能说明,开发服务器必须与 Storybook 命令在同一文件夹中运行。
如果沙盒阻止端口怎么办?
该技能说明,应为 Storybook 命令请求提升的权限,因为开发服务器可能以令人困惑的方式失败。
它会安装 Storybook 吗?
只有在你明确调用此技能并批准安装时才会。
详情
作者的原始描述
Storybook's workflow for UI changes in a project with Storybook - look up the components to reuse, write and update stories, run story tests, and publish a review of the result. Also shows existing components or stories in a review. Use when the project's agent instructions (such as AGENTS.md) or the user ask for it.
repo: storybookjs/storybook
热度
- GitHub 星标
- 91k
- 排名
- #1328
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
handle-pr-comments
91k帮你的智能体逐条处理 GitHub 拉取请求的审查意见,建议修复方案,应用你的选择,并把讨论串标为已解决。
principle-encode-lessons-in-structure
91k教你的智能体把反复出现的错误转化为自动检查,例如 lint 规则或脚本,而不是一再写下同样的提醒。
storybook-startup-benchmark
91k帮你的智能体测量 Storybook 的启动时间,以及显示第一个 story 所需的时间,并通过重复运行进行公平比较。
storybook-upgrade
91k教你的智能体把项目中的所有 Storybook 包升级到指定版本,每次只升级一个大版本。