Install any skill in seconds. Free to start, no credit card required.
Get Started Free →component-doc
为 @skyroc/web-ui 组件编写文档。当用户说出组件名(如 Button、Accordion、AlertDialog)时触发。自动定位组件源码、playground demo、已有文档,按照项目文档规范生成或更新 MDX 文档。
Passed 9 of 24 test cases with the skill, and 3 of 24 without it.
7 fixed3 passed either way17 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
The instructions your model reads when the skill loads.
为 @skyroc/web-ui 组件库编写文档的专用工作流。
给定组件名 $COMPONENT(用户输入,如 Button),将其转为 kebab-case $slug(如 button),然后按以下路径查找:
| 用途 | 路径 |
|---|---|
| 组件源码 | packages/web/ui/shadcn/src/components/$slug/ |
| Playground Demo | apps/web-ui-playground/src/app/[locale]/(demo)/$slug/modules/ |
| 文档 MDX | apps/web-ui-docs/content/docs/components/$slug.mdx |
文档基础设施文件(不需要每次都读,但需要了解):
| 文件 | 作用 |
|---|---|
apps/web-ui-docs/components/props-table.tsx | <PropsTable> — API 属性表格 |
apps/web-ui-docs/components/type-table.tsx | <TypeTable> + <UnionType> — 类型定义区 |
apps/web-ui-docs/components/type-anchor.tsx | 类型链接解析(PascalCase 自定义类型 → 蓝色可点击锚点) |
apps/web-ui-docs/components/type-registry.ts | 跨页面类型链接注册表 |
apps/web-ui-docs/components/demo/index.tsx | <Demo> — 从 playground 加载 live demo |
apps/web-ui-docs/components/mdx.tsx | MDX 组件注册(Demo / PropsTable / TypeTable / UnionType) |
packages/web/ui/shadcn/src/components/$slug/ 下所有文件
index.ts(导出)、types.ts(Props 定义)、*-variants.ts(样式变体)、主组件文件apps/web-ui-playground/src/app/[locale]/(demo)/$slug/modules/ 下所有 demo
packages/web/ui/shadcn/src/preset/$slug/ 了解预设封装和 useComponentConfig 集成apps/web-ui-docs/content/docs/components/$slug.mdxalert.mdx,其次 button.mdx)文档不是 API 想象稿,必须从 源码、类型、demo、实际行为 四者交叉验证。
test cases passed, vs 3 / 24 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.