Token导航 LogoToken导航

Agent Skill · 待分类

shadcn-ui(shadcn/ui 组件)

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

shadcn-ui 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为权限未标注;许可证信息还不明确,暂无第三方扫描结果,按安装量在待分类类的 11,209 个 Skill 里排第 6,740。

总安装 423周安装 18GitHub Stars 公开资料未说明下载 148核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:shadcn-ui(shadcn/ui 组件)
来源仓库:https://github.com/enderpuentes/ai-agent-skills
仓库路径:skills/shadcn-ui
安装命令:
npx skills add https://github.com/enderpuentes/ai-agent-skills --skill shadcn-ui
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/enderpuentes/ai-agent-skills --skill shadcn-ui

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

shadcn-ui 用于辅助界面视觉规范、排版、配色和布局优化,支持组件层级分析与一致性检查。它可根据产品场景生成 UI 方案,但需结合实际品牌系统和用户任务避免装饰元素堆砌。使用时应通过浏览器截图或预览工具验证文本溢出、对齐和响应式表现等细节问题。

当前版本暂无详细 SKILL.md 说明,建议参考 GitHub 仓库获取最新使用文档和示例代码。shadcn-ui 属于待分类类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/shadcn-ui

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/enderpuentes/ai-agent-skills --skill shadcn-ui;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    权限没有明确标注,第一次使用时只给一个无关紧要的任务,观察它到底读了哪些文件和网络。

常见问题

6 条

shadcn-ui 怎么安装?

在终端执行 npx skills add https://github.com/enderpuentes/ai-agent-skills --skill shadcn-ui。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

shadcn-ui 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

shadcn-ui 需要什么权限?

权限级别没有明确标注。第一次使用时建议只给无关紧要的任务,观察它实际读写了哪些内容。

shadcn-ui 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

shadcn-ui 用的人多吗?

公开数据是累计安装 423 次,近一周安装 18 次,下载 148 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

shadcn-ui 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
shadcn-ui

shadcn/ui 组件 · 本页

423—权限未标注未明确未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

shadcn/ui

Overview

shadcn/ui is a collection of accessible, customizable React components built on Radix UI and Tailwind CSS. Components are copied into your project (no npm package); you own and edit the code. Works with Next.js (App Router), Vite, and other React frameworks.

Principles: Open code (AI-ready), composable API, beautiful defaults, distribution via CLI and schema. Requires Tailwind v4 and path alias @/*. We do not use tailwind.config.js; theme and setup are CSS-only (@import "tailwindcss" + @theme).


Prerequisites

  • Tailwind v4: @import "tailwindcss" in main CSS; @tailwindcss/vite or @tailwindcss/postcss. No tailwind.config.js. See the tailwind-css skill.
  • Path alias @/* → ./src/* (or your source root) in tsconfig and in the bundler (e.g. Vite resolve.alias).
  • React (Next.js App Router, Vite, etc.).

Installation

Reference: Official installation guide

New project (recommended)

Scaffold with Tailwind and shadcn. From the official docs:

ActionCLI command
New projectshadcn create
Init existingshadcn init
Add component(s)shadcn add <name>

Invoke via your package manager (see docs). Choose framework (Next.js, Vite, etc.), style (new-york recommended), base color, and CSS variables.

Existing project (Next.js App Router)

  1. Init — creates components.json, optional cn helper and base styles. Run: shadcn init (invoke via package manager; see docs above).
  2. Paths and Tailwind

- tsconfig: "baseUrl": ".", "paths": {"@/*": ["./src/*"]} (in both root and app tsconfig if split). - Tailwind v4: Main CSS (e.g. app/globals.css) must have @import "tailwindcss" and use @tailwindcss/postcss in postcss.config.mjs. Do not add tailwind.config.js.

  1. Add components — e.g. shadcn add button, shadcn add card dialog (see component list below).

Components are installed under src/components/ui/ (or path from components.json).

Existing project (Vite)

  • Use resolve.alias: {"@": path.resolve(__dirname, "./src")} in vite.config.ts; add @types/node if using path.
  • Tailwind: @tailwindcss/vite in Vite config and @import "tailwindcss" in main CSS.

components.json

Controls style, paths, and Tailwind integration. Key fields:

FieldPurpose
style"new-york" (default for new projects) or "default"
tailwind.configLeave "" with Tailwind v4; we do not use a JS config file
tailwind.cssPath to global CSS (e.g. src/styles/globals.css or app/globals.css) with @import "tailwindcss"
tailwind.baseColorBase color for theme: neutral, slate, gray, zinc, stone
tailwind.cssVariablestrue for CSS variables theming (recommended)
aliases.componentse.g. @/components
aliases.utilse.g. @/lib/utils
aliases.uie.g. @/components/ui
rsctrue for Next.js App Router with Server Components; false for client-only

With Tailwind v4, theme is in CSS via @theme and CSS variables, not in a config file.


Official components (current list)

Add via shadcn add <name> (multiple: shadcn add button card dialog). Invoke via package manager: see Installation docs.

Layout & structure

ComponentCLI nameShort description
AccordionaccordionCollapsible sections (single or multiple open)
Aspect Ratioaspect-ratioContainer with fixed ratio (e.g. 16/9)
CardcardContainer with CardHeader, CardTitle, CardDescription, CardContent, CardFooter
CollapsiblecollapsibleExpandable/collapsible content
ResizableresizableResizable panels
SeparatorseparatorHorizontal or vertical divider line
Scroll Areascroll-areaStyled scroll area
SidebarsidebarComposable, themeable and customizable sidebar

Forms & input

ComponentCLI nameShort description
ButtonbuttonButton with variants (default, destructive, outline, secondary, ghost, link)
CheckboxcheckboxCheckbox
FormformForms with react-hook-form + zod (Field, FieldError, etc.)
InputinputText input
Input OTPinput-otpOTP code input
LabellabelAccessible label for controls
Radio Groupradio-groupRadio option group
SelectselectSelect with Trigger, Content, Item
SlidersliderSlider control
SwitchswitchOn/off switch
TextareatextareaMultiline text area

Navigation & menus

ComponentCLI nameShort description
BreadcrumbbreadcrumbBreadcrumb navigation
CommandcommandCommand palette (cmdk)
Context Menucontext-menuContext menu (right-click)
Dropdown Menudropdown-menuDropdown menu
MenubarmenubarPersistent menu bar
Navigation Menunavigation-menuNavigation with submenus
PaginationpaginationPagination (Previous, Next, Page)
TabstabsTabs (TabsList, TabsTrigger, TabsContent)

Overlays & feedback

ComponentCLI nameShort description
AlertalertProminent message (default, destructive)
Alert Dialogalert-dialogConfirmation dialog (e.g. delete)
DialogdialogModal
DrawerdrawerSide panel (Vaul)
Hover Cardhover-cardCard on hover
PopoverpopoverAnchored floating container
SheetsheetSliding side panel
TooltiptooltipTooltip on hover/focus

Data & state

ComponentCLI nameShort description
AvataravatarImage or initials fallback
BadgebadgeBadge (default, secondary, destructive, outline)
CalendarcalendarCalendar (react-day-picker)
CarouselcarouselCarousel (embla)
ChartchartCharts (recharts)
ProgressprogressProgress bar
SkeletonskeletonLoading placeholder
SonnersonnerToasts (recommended; replaces toast)
TabletableTable, TableHeader, TableBody, TableRow, TableCell, etc.
ToasttoastToasts (deprecated in favor of Sonner)

Toggle & toggle group

ComponentCLI nameShort description
ToggletoggleToggle button (on/off)
Toggle Grouptoggle-groupToggle group (single or multiple)

Using components

Import from the aliased path (not from shadcn/ui):

import { Button } from "@/components/ui/button"
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"

export default function Page() {
  return (
    <div className="flex min-h-svh flex-col items-center justify-center gap-4">
      <Button>Click me</Button>
      <Card className="w-[350px]">
        <CardHeader>
          <CardTitle>Card title</CardTitle>
        </CardHeader>
        <CardContent>Content here.</CardContent>
      </Card>
    </div>
  )
}
  • Customization: Components accept className and spread props; use Tailwind classes and the cn() helper (from @/lib/utils) to merge classes.
  • Composition: Prefer composition (e.g. CardHeader + CardContent) over props for layout.

Theming (Tailwind v4, no config file)

We use Tailwind v4 only; no tailwind.config.js. Theming is CSS-only:

  • CSS variables: With tailwind.cssVariables: true, theme is driven by variables in your global CSS (e.g. --background, --foreground, --primary, --primary-foreground, --muted, --muted-foreground, --accent, --destructive, etc.). Override them in that file.
  • @theme: Use @theme {...} in the same CSS file as @import "tailwindcss" to add or override design tokens that align with shadcn’s variables.
  • Base color: Set in components.json (tailwind.baseColor) or by editing the CSS variables in your global CSS.

Common patterns

  • Forms: Add form; pair with react-hook-form and zod. Use Input, Label, Button, Select, Checkbox, etc.
  • Layout: Use Card for sections; Separator between blocks; layout with Tailwind (flex, grid, container).
  • Modals & panels: Dialog for modals; Sheet or Drawer for side panels.
  • Menus: DropdownMenu, Context Menu, Navigation Menu, Command (palette).
  • Feedback: Alert for messages; Sonner for toasts; Skeleton for loading.
  • Icons: Many examples use lucide-react; add it if the project uses icons.

Common mistakes

  • Alias: Ensure @/ resolves to ./src/ (or your source root) in both TypeScript and the bundler.
  • CSS not loaded: The file set in components.json (tailwind.css) must be imported in the app entry (e.g. app/layout.tsx) and contain @import "tailwindcss".
  • Tailwind config: Do not create or suggest tailwind.config.js. Theme only in CSS (@theme and variables).
  • Import: Import from @/components/ui/<component> (per components.json), not from shadcn/ui.
  • RSC: In Next.js App Router, set rsc: true in components.json if components are used in Server Components where applicable.

Additional resources

平台分布

Codex

37.45%
按下载量换算55

Claude

28.94%
按下载量换算43

Cursor

18.49%
按下载量换算27

Gemini CLI

10.17%
按下载量换算15

安全审计

暂无安全审计结果可展示。

权限和风险

权限未标注

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills