shadcn/ui

shadcnshadcn/ui

管理 shadcn 组件和项目,覆盖添加、搜索、修复、样式调整与组合,适合已有 React 界面的工程任务。具体组件版本、框架配置和生成文件需按项目检查。

  • SKILL.md 已保存
  • 已有中文用途摘要
  • 安装与运行未实测
先判断是否解决你的问题

shadcn 是什么?

管理 shadcn 组件和项目,覆盖添加、搜索、修复、样式调整与组合,适合已有 React 界面的工程任务。具体组件版本、框架配置和生成文件需按项目检查。

中文说明由本站依据来源整理;英文原文保留在页面下方。

同名项目,请核对仓库和目录

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 shadcn,然后告诉 Agent 你的任务和实际输入,让它先核对触发条件。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 shadcn

请在 Codex 的当前工作环境中安装并检查 shadcn 这个 Skill。

项目身份:shadcn/ui / shadcn
来源:https://github.com/shadcn/ui/blob/968d8cb9dc42ae5d52e8fd356cf84596ec832a26/skills/shadcn/SKILL.md
已定位的源文件:skills/shadcn/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-17T10:49:46.711Z
中文使用说明
已有中文用途摘要;具体用法尚待逐项整理
安装与任务测试
本站未执行安装或任务测试
来源复核
已保留来源记录;当前完整用法未逐项人工复核
展开 SKILL.md 原文、章节与历史收录资料

skills/shadcn/SKILL.md · 抓取时间 2026-11-17T10:49:46.711Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", "switch to --preset", and for building a design system or applying a DESIGN.md or brand spec to shadcn/ui.

查看源文件章节 / Source sections
  • 原文:shadcn/ui
  • 原文:Current Project Context
  • 原文:Principles
  • 原文:Critical Rules
  • 原文:Styling & Tailwind → [styling.md](./rules/styling.md)
  • 原文:Forms & Inputs → [forms.md](./rules/forms.md)
  • 原文:Component Structure → [composition.md](./rules/composition.md)
  • 原文:Use Components, Not Custom Markup → [composition.md](./rules/composition.md)
  • 原文:Icons → [icons.md](./rules/icons.md)
  • 原文:Chat & Messaging → [chat.md](./rules/chat.md)
  • 原文:CLI
  • 原文:Key Patterns
  • 原文:Component Selection
  • 原文:Key Fields
  • 原文:Component Docs, Examples, and Usage
  • 工作流程 / Workflow
  • 原文:Design Systems from DESIGN.md
  • 原文:Updating Components
  • 原文:Quick Reference
  • 原文:Detailed References
原文:shadcn/ui

A framework for building ui, components and design systems. Components are added as source code to the user's project via the CLI. > **IMPORTANT:** Run all CLI commands using the project's package runner: `npx shadcn@latest`, `pnpm dlx shadcn@latest`, or `bunx --bun shadcn@latest` — based on the project's `packageManager`. Examples below use `npx shadcn@latest` but substitute the correct runner for the project.

原文:Current Project Context

```json !`npx shadcn@latest info --json` ``` The JSON above contains the project config and installed components. Use `npx shadcn@latest docs <component>` to get documentation and example URLs for any component.

原文:Principles

1. **Use existing components first.** Use `npx shadcn@latest search` to check registries before writing custom UI. Check community registries too. 2. **Compose, don't reinvent.** Settings page = Tabs + Card + form controls. Dashboard = Sidebar + Card + Chart + Table. 3. **Use built-in variants before custom styles.** `variant="outline"`, `size="sm"`, etc. 4. **Use semantic colors.** `bg-primary`, `text-muted-foreground` — never raw values like `bg-blue-500`.

原文:Critical Rules

These rules are **always enforced**. Each links to a file with Incorrect/Correct code pairs.

原文:Styling & Tailwind → [styling.md](./rules/styling.md)

- **`className` for layout, not styling.** Never override component colors or typography. - **No `space-x-*` or `space-y-*`.** Use `flex` with `gap-*`. For vertical stacks, `flex flex-col gap-*`. - **Use `size-*` when width and height are equal.** `size-10` not `w-10 h-10`. - **Use `truncate` shorthand.** Not `overflow-hidden text-ellipsis whitespace-nowrap`. - **No manual `dark:` color overrides.** Use semantic tokens (`bg-background`, `text-muted-foreground`). - **Use `cn()` for conditional classes.** Don't write manual template literal ternaries. - **No manual `z-index` on overlay components.** Dialog, Sheet, Popover, etc. handle their own stacking.

原文:Forms & Inputs → [forms.md](./rules/forms.md)

- **Forms use `FieldGroup` + `Field`.** Never use raw `div` with `space-y-*` or `grid gap-*` for form layout. - **`InputGroup` uses `InputGroupInput`/`InputGroupTextarea`.** Never raw `Input`/`Textarea` inside `InputGroup`. - **Buttons inside inputs use `InputGroup` + `InputGroupAddon`.** - **Option sets (2–7 choices) use `ToggleGroup`.** Don't loop `Button` with manual active state. - **`FieldSet` + `FieldLegend` for grouping related checkboxes/radios.** Don't use a `div` with a heading. - **Field validation uses `data-invalid` + `aria-invalid`.** `data-invalid` on `Field`, `aria-invalid` on the control. For disabled: `data-disabled` on `Field`, `disabled` on the control.

文件 SHA256:93951e5e83f616a3e046491c00d770bd54c0a64164706cd1191822a233d27592

仓库许可证记录:未提供;not-established,查看来源。

Skills.sh收录简介 · 2026-07-28

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context,…

查看历史简介来源

这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。

历史收录数据

Skill标识shadcn
来源仓库shadcn/ui
榜单快照2026-07-28
榜单口径Skills.sh累计安装量
快照名次92
快照累计安装量255335

历史资料说明

  • 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
  • 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。

此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源