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

component-docs

它能做什么

这个技能让 AI 查阅使用 Storybook 的项目中的组件,包括它们的属性和示例用法。适合希望复用现有组件、而不是重新构建的开发者。

适用场景

  • ✓当你想在新建组件之前,先了解项目中已有哪些组件的时候。
  • ✓当你需要检查某个组件接受哪些属性以及如何使用它的时候。
  • ✓当团队的指南要求 AI 复用现有组件的时候。

技能链接

https://github.com/storybookjs/storybook/blob/next/code/lib/claude-plugin/skills/component-docs/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

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

可以这样问 AI

“在我新建按钮之前,请先告诉我我们已经有哪些按钮组件,以及它们是如何使用的。”

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

工作原理

AI 在项目中运行一条 Storybook 命令,列出组件、属性和使用示例,然后用这些信息来回答或复用组件。需要 Storybook 11.0 或更高版本,否则 AI 会改为读取源文件。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Prerequisites:

  1. Storybook must be installed in the project. If it is not, read the components' source files instead.
  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. If it is older, invoke the /storybook-upgrade skill only after the user explicitly approves an upgrade; until then, read the components' source files instead.

Run every Storybook CLI command from the package where Storybook is installed (in a monorepo often a leaf package such as packages/ui).

If the sandbox blocks network access, request escalated permissions for Storybook CLI commands.

Run npx storybook skills component-docs and follow its output: it lists the commands that show this project's components, props, and usage examples, and when to use them.

常见问题

我需要安装 Storybook 吗?

需要。如果没有安装,该技能会改为读取组件的源文件。

需要哪个 Storybook 版本?

11.0 或更高版本,包括 11.0 的预发布版本。更旧的版本需要先升级,并经你批准。

它需要网络访问吗?

有时需要。该技能说明,如果沙盒阻止网络访问,应请求运行 Storybook 命令的权限。

详情

作者的原始描述

Look up the components of a project with Storybook, with their props and usage examples, to answer questions about them or to reuse them instead of building duplicates. Use when the project's agent instructions (such as AGENTS.md) or the user ask for it. For a UI change, use ui-workflow, which includes the same component lookup.

repo: storybookjs/storybook

热度

GitHub 星标
91k
排名
#1324
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能