跳到正文
Skillpedia
网站与界面(前端)91k · #1328

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/storybookjs/storybook/blob/next/code/lib/claude-plugin/skills/ui-workflow/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为我们的产品卡片添加加载状态,更新它的 story,并准备一份我可以查看的审阅。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 按固定顺序进行:先查找现有组件,编写或更新 story,运行 story 测试,然后准备审阅。部分步骤需要在正确的包文件夹中运行 Storybook 开发服务器。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Prerequisites:

  1. Storybook must be installed in the project. Invoke the /storybook-init skill to set up Storybook, but only if the user explicitly invoked this skill and approves a Storybook installation.
  2. 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-upgrade skill 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:

  1. 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 existing package.json Storybook 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.
  2. 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能