Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

shadcnshadcn/ui 组件

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

7,782

周安装

354

GitHub Stars

公开资料未说明

下载量

4,575
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

AgentSkills.tonpx skills
npx skills add slanycukr/riot-api-project --skill "shadcn"

简介

用于辅助 API 设计、接口文档和请求响应结构梳理。适合 Agent 生成 OpenAPI 草稿、检查字段命名或整理错误码。使用时需确认真实业务语义、鉴权方式和分页规则,避免凭空补字段。

  • 适用于梳理 endpoint、生成接口文档或前后端联调场景。
  • 可让 Agent 生成 OpenAPI 草稿、检查字段命名或整理错误码。
  • 通过 npx skills add slanycukr/riot-api-project --skill "shadcn" 安装。
  • 涉及敏感数据时应先确认权限和脱敏边界。

SKILL.md

name
shadcn/ui
description
A collection of beautifully designed, accessible UI components built with Radix UI and Tailwind CSS
when_to_use
When building modern React applications with customizable, copy-pasteable components that can be easily themed and composed
requirements

shadcn/ui

shadcn/ui is a collection of accessible and customizable UI components that you can copy and paste into your applications. It's built on top of Radix UI and Tailwind CSS, allowing you to build your own component library with beautiful defaults and complete customization.

Quick Start

Installation

# Initialize your project
npx shadcn@latest init

# Add components
npx shadcn@latest add button
npx shadcn@latest add card
npx shadcn@latest add input

Configuration

Create a components.json file to customize your setup:

{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "new-york",
  "rsc": false,
  "tsx": true,
  "tailwind": {
    "config": "tailwind.config.js",
    "css": "src/styles/globals.css",
    "baseColor": "neutral",
    "cssVariables": true
  },
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils",
    "ui": "@/components/ui"
  }
}

Basic Usage

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

export default function Example() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Welcome</CardTitle>
      </CardHeader>
      <CardContent>
        <Button>Get Started</Button>
      </CardContent>
    </Card>
  );
}

Common Patterns

Component Installation

# Add single component
npx shadcn@latest add button

# Add multiple components
npx shadcn@latest add button card input

# Add from custom registry
npx shadcn@latest add @v0/dashboard

Component Customization

Components use Class Variance Authority (CVA) for variants:

// Button with variants
<Button variant="destructive" size="sm">
  Delete
</Button>

<Card className="shadow-lg">
  <CardHeader>
    <CardTitle>Custom Card</CardTitle>
  </CardHeader>
</Card>

Theme Customization

Add CSS variables for theming:

@layer base {
  :root {
    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 47.4% 11.2%;
  }

  .dark {
    --primary: 210 40% 98%;
    --primary-foreground: 222.2 47.4% 11.2%;
  }
}

Form Patterns

import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";

function FormField({ label, ...props }) {
  return (
    <div className="space-y-2">
      <Label htmlFor={props.id}>{label}</Label>
      <Input {...props} />
    </div>
  );
}

Component Composition

import {
  AlertDialog,
  AlertDialogAction,
  AlertDialogContent,
} from "@/components/ui/alert-dialog";

function ConfirmDialog() {
  return (
    <AlertDialog>
      <AlertDialogContent>
        <AlertDialogAction>Confirm</AlertDialogAction>
      </AlertDialogContent>
    </AlertDialog>
  );
}

Popular Components

Navigation

  • breadcrumb - Navigation breadcrumb
  • navigation-menu - Dropdown navigation
  • menubar - Application menu bar

Forms

  • input - Text input field
  • button - Action button
  • select - Dropdown select
  • checkbox - Checkbox input
  • radio-group - Radio button group

Layout

  • card - Content container
  • dialog - Modal dialog
  • sheet - Slide-out panel
  • tabs - Tabbed content

Data Display

  • table - Data table
  • badge - Status indicator
  • avatar - User avatar
  • separator - Visual divider

Feedback

  • toast - Notification message
  • alert - Alert message
  • progress - Progress indicator
  • spinner - Loading indicator

Manual Installation

For projects not using the CLI:

  1. Install dependencies:
npm install class-variance-authority clsx tailwind-merge lucide-react
  1. Create utils file:
// src/lib/utils.ts
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs));
}
  1. Copy component code from the shadcn/ui documentation into your project.

Best Practices

  • Use TypeScript for better type safety
  • Customize components by copying and modifying the source code
  • Leverage CSS variables for consistent theming
  • Compose components to build complex UI patterns
  • Follow accessibility guidelines built into Radix UI primitives

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.25%
按下载量换算1,658

Claude

30.31%
按下载量换算1,387

Cursor

18.57%
按下载量换算850

Gemini CLI

9.14%
按下载量换算418

安全审计

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

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills