Token导航 LogoToken导航

Agent Skill · 研究检索

using-shadcn-ui(using shadcn/ui UI 搜索)

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

using-shadcn-ui 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 53,170。

总安装 539周安装 22GitHub Stars 26下载 174核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/nilecui/skillsbase --skill using-shadcn-ui

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助界面设计、视觉规范和交互体验优化,适合 UI 开发场景。可帮助整理页面结构、生成 UI 方案或检查视觉一致性表现。通过 npx skills add 命令从指定 GitHub 仓库安装使用。使用时需结合现有品牌和设计系统,涉及页面改动时应通过预览检查效果。

using-shadcn-ui 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

using-shadcn-ui 怎么安装?

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

using-shadcn-ui 支持哪些 AI 工具?

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

using-shadcn-ui 需要什么权限?

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

using-shadcn-ui 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

using-shadcn-ui 用的人多吗?

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

using-shadcn-ui 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
using-shadcn-ui

using shadcn/ui UI 搜索 · 本页

53926需要联网MIT通过

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

SKILL.md 原文

Using shadcn/ui

Overview

shadcn/ui is a collection of re-usable, accessible React components built on Radix UI and Tailwind CSS. Unlike traditional component libraries, shadcn/ui copies components directly into your project, giving you full ownership and customization control.

Core principle: Components live in your codebase. You own the code. No package.json dependency.

When to Use

Use shadcn/ui when:

  • Building React applications with Tailwind CSS
  • Need accessible, customizable UI components
  • Want pre-built patterns without library lock-in
  • Implementing common UI patterns (forms, dialogs, dropdowns, etc.)
  • Starting new projects that need design system foundation
  • Need production-ready blocks for hero sections, pricing, testimonials, etc.

shadcnblocks.com integration:

  • 829 blocks across 42 categories
  • Production-ready sections (Hero, Navbar, Footer, Pricing, Testimonials, etc.)
  • Copy-paste directly into your project
  • Built with same shadcn/ui primitives

Don't use for:

  • Non-React projects
  • Projects without Tailwind CSS
  • When you need a locked, versioned component library
  • Simple HTML/CSS projects

Installation Workflow

1. Initialize shadcn/ui

npx shadcn@latest init

Configuration prompts:

  • Style: Default or New York
  • Color: Slate, Gray, Zinc, etc.
  • CSS variables: Yes (recommended)
  • Tailwind config: Use CSS variables for colors

2. Add Components

# Add specific components
npx shadcn@latest add button
npx shadcn@latest add dialog
npx shadcn@latest add form

# Add multiple at once
npx shadcn@latest add button card dialog dropdown-menu

Components install to: components/ui/

3. Using shadcnblocks.com

Visit: https://www.shadcnblocks.com/blocks

Workflow:

  1. Browse category (Hero, Pricing, Testimonial, etc.)
  2. Find desired block
  3. Click "Copy Code"
  4. Paste into your component file
  5. Install any missing shadcn/ui dependencies
  6. Customize colors, text, and layout

Component Categories Reference

CategoryCommon Use CasesExample Components
FormsUser input, validationInput, Textarea, Select, Checkbox, Radio Group
OverlaysModals, popoversDialog, Popover, Tooltip, Sheet
NavigationMenus, dropdownsDropdown Menu, Navigation Menu, Tabs
FeedbackUser notificationsAlert, Toast, Progress, Skeleton
Data DisplayTables, cards, badgesTable, Card, Badge, Avatar
LayoutContainers, separatorsSeparator, Aspect Ratio, Scroll Area

shadcnblocks.com Categories (829 blocks)

Layout & Navigation (200 blocks)

  • Hero (162 blocks): Landing page headers with CTAs
  • Navbar (13 blocks): Navigation headers
  • Footer (18 blocks): Page footers
  • Banner (7 blocks): Announcement bars

Content Sections (367 blocks)

  • Feature (266 blocks): Product feature showcases
  • Blog (22 blocks): Blog layouts and cards
  • Gallery (47 blocks): Image galleries
  • Timeline (14 blocks): Event timelines
  • Team (10 blocks): Team member profiles
  • About (10 blocks): About us sections

Business Components (116 blocks)

  • Pricing (35 blocks): Pricing tables and cards
  • Testimonial (28 blocks): Customer testimonials
  • Case Studies (9 blocks): Success stories
  • Integration (16 blocks): Integration showcases
  • Service/Services (21 blocks): Service offerings
  • Stats (17 blocks): Statistics displays

User Engagement (64 blocks)

  • CTA (25 blocks): Call-to-action sections
  • Contact (13 blocks): Contact forms
  • Signup/Login (17 blocks): Authentication forms
  • Waitlist (2 blocks): Email capture
  • Community (7 blocks): Community features

Information Display (82 blocks)

  • FAQ (15 blocks): Frequently asked questions
  • Comparison (10 blocks): Feature comparisons
  • Logos (11 blocks): Logo grids
  • Resources (4 blocks): Resource libraries
  • Download (12 blocks): Download sections
  • Changelog (7 blocks): Update logs
  • Careers (9 blocks): Job listings
  • Compliance (3 blocks): Legal/privacy sections

Quick Start Example

// 1. Add button component
// $ npx shadcn@latest add button

// 2. Import and use
import { Button } from "@/components/ui/button"

export function MyComponent() {
  return (
    <div>
      <Button variant="default">Click me</Button>
      <Button variant="destructive">Delete</Button>
      <Button variant="outline">Cancel</Button>
      <Button variant="ghost">Subtle</Button>
    </div>
  )
}

Form Pattern with shadcn/ui

// Install: npx shadcn@latest add form input button

import { useForm } from "react-hook-form"
import { zodResolver } from "@hookform/resolvers/zod"
import * as z from "zod"
import { Button } from "@/components/ui/button"
import {
  Form,
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form"
import { Input } from "@/components/ui/input"

const formSchema = z.object({
  email: z.string().email("Invalid email address"),
  password: z.string().min(8, "Password must be at least 8 characters"),
})

export function LoginForm() {
  const form = useForm<z.infer<typeof formSchema>>({
    resolver: zodResolver(formSchema),
    defaultValues: {
      email: "",
      password: "",
    },
  })

  function onSubmit(values: z.infer<typeof formSchema>) {
    console.log(values)
  }

  return (
    <Form {...form}>
      <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
        <FormField
          control={form.control}
          name="email"
          render={({ field }) => (
            <FormItem>
              <FormLabel>Email</FormLabel>
              <FormControl>
                <Input placeholder="you@example.com" {...field} />
              </FormControl>
              <FormMessage />
            </FormItem>
          )}
        />
        <FormField
          control={form.control}
          name="password"
          render={({ field }) => (
            <FormItem>
              <FormLabel>Password</FormLabel>
              <FormControl>
                <Input type="password" {...field} />
              </FormControl>
              <FormMessage />
            </FormItem>
          )}
        />
        <Button type="submit">Sign In</Button>
      </form>
    </Form>
  )
}

Dialog/Modal Pattern

// Install: npx shadcn@latest add dialog button

import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from "@/components/ui/dialog"
import { Button } from "@/components/ui/button"

export function ConfirmDialog() {
  return (
    <Dialog>
      <DialogTrigger asChild>
        <Button variant="destructive">Delete Account</Button>
      </DialogTrigger>
      <DialogContent>
        <DialogHeader>
          <DialogTitle>Are you absolutely sure?</DialogTitle>
          <DialogDescription>
            This action cannot be undone. This will permanently delete your
            account and remove your data from our servers.
          </DialogDescription>
        </DialogHeader>
        <div className="flex justify-end gap-3">
          <Button variant="outline">Cancel</Button>
          <Button variant="destructive">Delete</Button>
        </div>
      </DialogContent>
    </Dialog>
  )
}

Using Blocks from shadcnblocks.com

Example: Adding a Hero Section

1. Visit: https://www.shadcnblocks.com/blocks 2. Navigate to: Hero category 3. Select a design 4. Click "Copy Code" 5. Create component:

// app/components/hero.tsx
// (Paste copied code from shadcnblocks.com)

import { Button } from "@/components/ui/button"

export function Hero() {
  return (
    <section className="container flex flex-col items-center gap-8 pt-20 pb-12">
      <h1 className="text-6xl font-bold text-center">
        Build amazing products
      </h1>
      <p className="text-xl text-muted-foreground text-center max-w-2xl">
        Get started with production-ready components built with shadcn/ui
      </p>
      <div className="flex gap-4">
        <Button size="lg">Get Started</Button>
        <Button size="lg" variant="outline">Learn More</Button>
      </div>
    </section>
  )
}

6. Install missing components:

npx shadcn@latest add button

7. Import and use:

import { Hero } from "@/components/hero"

export default function Home() {
  return <Hero />
}

Example: Adding a Pricing Section

// Install: npx shadcn@latest add card button badge

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

export function Pricing() {
  return (
    <section className="container py-20">
      <h2 className="text-4xl font-bold text-center mb-12">
        Simple, transparent pricing
      </h2>
      <div className="grid md:grid-cols-3 gap-8">
        <Card>
          <CardHeader>
            <CardTitle>Starter</CardTitle>
            <CardDescription>Perfect for trying out</CardDescription>
          </CardHeader>
          <CardContent>
            <div className="text-4xl font-bold mb-2">$9</div>
            <p className="text-sm text-muted-foreground">per month</p>
          </CardContent>
          <CardFooter>
            <Button className="w-full">Get Started</Button>
          </CardFooter>
        </Card>

        <Card className="border-primary">
          <CardHeader>
            <Badge className="w-fit mb-2">Most Popular</Badge>
            <CardTitle>Pro</CardTitle>
            <CardDescription>For growing businesses</CardDescription>
          </CardHeader>
          <CardContent>
            <div className="text-4xl font-bold mb-2">$29</div>
            <p className="text-sm text-muted-foreground">per month</p>
          </CardContent>
          <CardFooter>
            <Button className="w-full">Get Started</Button>
          </CardFooter>
        </Card>

        <Card>
          <CardHeader>
            <CardTitle>Enterprise</CardTitle>
            <CardDescription>For large organizations</CardDescription>
          </CardHeader>
          <CardContent>
            <div className="text-4xl font-bold mb-2">Custom</div>
            <p className="text-sm text-muted-foreground">contact us</p>
          </CardContent>
          <CardFooter>
            <Button className="w-full" variant="outline">Contact Sales</Button>
          </CardFooter>
        </Card>
      </div>
    </section>
  )
}

Customization

Theme Colors

Edit app/globals.css or styles/globals.css:

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    /* ... more CSS variables */
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    /* ... dark mode colors */
  }
}

Component Variants

Components use class-variance-authority for variants:

import { Button } from "@/components/ui/button"

// Available variants:
<Button variant="default">Default</Button>
<Button variant="destructive">Destructive</Button>
<Button variant="outline">Outline</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="link">Link</Button>

// Available sizes:
<Button size="default">Default</Button>
<Button size="sm">Small</Button>
<Button size="lg">Large</Button>
<Button size="icon">Icon</Button>

Extending Components

Edit the component file directly in components/ui/:

// components/ui/button.tsx
const buttonVariants = cva(
  "inline-flex items-center justify-center...",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground...",
        destructive: "bg-destructive text-destructive-foreground...",
        // Add custom variant:
        success: "bg-green-600 text-white hover:bg-green-700",
      },
      // ... rest of variants
    }
  }
)

Common Patterns

Loading States

import { Button } from "@/components/ui/button"
import { Loader2 } from "lucide-react"

export function LoadingButton() {
  const [isLoading, setIsLoading] = useState(false)

  return (
    <Button disabled={isLoading}>
      {isLoading && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
      {isLoading ? "Loading..." : "Submit"}
    </Button>
  )
}

Toast Notifications

// Install: npx shadcn@latest add toast

import { useToast } from "@/hooks/use-toast"
import { Button } from "@/components/ui/button"

export function ToastExample() {
  const { toast } = useToast()

  return (
    <Button
      onClick={() => {
        toast({
          title: "Success!",
          description: "Your changes have been saved.",
        })
      }}
    >
      Show Toast
    </Button>
  )
}

Data Tables

// Install: npx shadcn@latest add table

import {
  Table,
  TableBody,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from "@/components/ui/table"

const invoices = [
  { invoice: "INV001", status: "Paid", amount: "$250.00" },
  { invoice: "INV002", status: "Pending", amount: "$150.00" },
]

export function InvoiceTable() {
  return (
    <Table>
      <TableHeader>
        <TableRow>
          <TableHead>Invoice</TableHead>
          <TableHead>Status</TableHead>
          <TableHead>Amount</TableHead>
        </TableRow>
      </TableHeader>
      <TableBody>
        {invoices.map((invoice) => (
          <TableRow key={invoice.invoice}>
            <TableCell>{invoice.invoice}</TableCell>
            <TableCell>{invoice.status}</TableCell>
            <TableCell>{invoice.amount}</TableCell>
          </TableRow>
        ))}
      </TableBody>
    </Table>
  )
}

Common Mistakes

MistakeFix
Installing as npm packageshadcn/ui copies code. Run npx shadcn@latest add [component]
Importing from shadcnImport from @/components/ui/[component]
Not installing dependenciesEach component may need additional packages (listed in CLI)
Modifying in node_modulesComponents live in your components/ui/ - edit directly
Forgetting Tailwind configRun npx shadcn@latest init to configure properly
Skipping shadcnblocks.comDon't build common sections from scratch - use 829 ready blocks

Workflow Summary

Starting new project:

  1. npx shadcn@latest init
  2. Add needed components: npx shadcn@latest add button card dialog
  3. Browse shadcnblocks.com for section blocks
  4. Copy blocks, install dependencies, customize

Adding new feature:

  1. Identify needed components (form, dialog, etc.)
  2. npx shadcn@latest add [components]
  3. Check shadcnblocks.com for similar patterns
  4. Build or adapt from block
  5. Customize colors and content

Customizing:

  1. Edit component files in components/ui/ directly
  2. Modify globals.css for theme colors
  3. Add variants using class-variance-authority patterns

Resources

Integration with Other Tools

Works seamlessly with:

  • Next.js (App Router or Pages)
  • Remix
  • Astro
  • Vite + React
  • React Hook Form
  • Zod validation
  • Tailwind CSS
  • Radix UI (under the hood)

平台分布

Claude Code

26.76%
按下载量换算47

Antigravity

21.36%
按下载量换算37

windsurf

20.08%
按下载量换算35

trae

13%
按下载量换算23

OpenCode

7.59%
按下载量换算13

Gemini CLI

3.1%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills