SuperAPI AI 工具集

shadcn

写作与研究

查看项目

更新于 10-15 21:10

技能介绍

用途:该技能用于管理 shadcn/ui 组件与项目,在添加、样式化、组合或调试组件时提供上下文、文档与使用模式,并支持初始化项目或切换设计系统预设。

主要能力:可检索组件、获取组件文档与示例、查看未安装的注册表项、预览已安装组件的变更、安装或更新组件,并检查已安装组件列表。

使用方式:所有 CLI 命令需按项目包管理器选择运行器,如 npx shadcn@latest、pnpm dlx shadcn@latest 或 bunx --bun shadcn@latest。常用命令包括 npx shadcn@latest info、npx shadcn@latest search、npx shadcn@latest docs <component>、npx shadcn@latest view、npx shadcn@latest add、npx shadcn@latest add --diff、npx shadcn@latest add --dry-run。切换预设时先询问用户选择重装、合并或跳过,对应命令如 npx shadcn@latest init --preset <code> --force --reinstall 等。

适用场景:新增组件、样式与组合、调试、初始化项目、切换预设、获取文档与 API 参考。

限制:添加第三方注册表组件后需检查硬编码导入路径并按项目别名修正;图标需替换为项目 iconLibrary;添加注册表组件前需明确注册表,不可默认猜测;更新组件前应先用 --dry-run 与 --diff 预览。其他收费、平台或效果信息暂未提供。