用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill shadcn命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | shadcn |
| description | shadcn/ui — Radix UI + Tailwind copy-paste; MCP for component install. |
components/ui/ directory with component files (button.tsx, card.tsx, dialog.tsx)components.json at project root@radix-ui/* and lucide-react in package.jsoncn() utility import from @/lib/utilsclass-variance-authority (cva) in dependenciesshadcn/ui has an official MCP that enables component browsing, searching, and installation via natural language.
Add to .claude/settings.json (or .claude/settings.local.json for local-only):
{
"mcpServers": {
"shadcn-ui": {
"command": "npx",
"args": ["-y", "shadcn@latest", "mcp"]
}
}
}
If auto-configuration fails, ask the user to add the entry manually in their CLI's MCP settings (Claude Code → Settings → MCP Servers; the
mcpblock ofopencode.json; Codex CLI's MCP config). Once active, components can be requested by description and the MCP handles installation.
| Concept | Detail |
|---|---|
| Copy-paste | Components live in components/ui/ — owned by the project, not a package |
| Radix UI | Accessible, unstyled headless primitives under the hood |
| Tailwind CSS | All styling via utility classes |
cn() utility | clsx + tailwind-merge — required for safe class merging |
| CVA | class-variance-authority — defines component variants |
| CLI | npx shadcn@latest add <component> installs with all dependencies |
// Always use cn() for className merging — never string concatenation
import { cn } from "@/lib/utils"
<Button className={cn("w-full", isLoading && "opacity-50")} />
// Variants via CVA — check the component file for available variant values
<Button variant="destructive" size="sm" />
// asChild for polymorphism — render as a different element without wrapper hacks
<Button asChild>
<Link href="/dashboard">Go to dashboard</Link>
</Button>
npx shadcn@latest add button # add single component
npx shadcn@latest add dialog sheet # add multiple at once
npx shadcn@latest diff # check for component updates
cn() for merging classNames — direct concatenation causes Tailwind class conflictscomponents/ui/ — that is the intended extension point; no need to wrap or forkcomponents.json before adding — it defines path aliases (@/components/ui) that must be respectedasChild for polymorphism — when a button needs to render as a <Link>, use asChild not a wrapper div