Token导航 LogoToken导航

Agent Skill · 研究检索

shadcn-component-review(shadcn/ui component 审查)

shadcn-component-review 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

shadcn-component-review 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 28,556。

总安装 3,195周安装 128GitHub Stars 4下载 1,034核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/mattbx/shadcn-skills --skill shadcn-component-review

这个 Skill 是做什么的

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

shadcn-component-review 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。适用于 shadcn/ui 组件的功能性或安全性审查,支持项目质量控制。

通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。可结合来源仓库和 SKILL.md 继续核验功能细节,确保与项目需求匹配。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

shadcn-component-review 怎么安装?

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

shadcn-component-review 支持哪些 AI 工具?

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

shadcn-component-review 需要什么权限?

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

shadcn-component-review 是免费的吗?

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

shadcn-component-review 用的人多吗?

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

shadcn-component-review 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 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调用外部服务未明确有提醒
shadcn-component-review

shadcn/ui component 审查 · 本页

3,1954需要联网未明确通过

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

SKILL.md 原文

shadcn Component Review

Systematic audit process for ensuring custom components align with shadcn design patterns, the project's chosen visual style, and modern composition conventions.

How This Complements the Official shadcn Skill

The official shadcn skill (shipped with CLI v4) enforces rules at *generation time* — telling agents "use gap-* not space-y-*, use semantic colors, use size-* for equal width/height," and so on. That's correct behavior when writing new code.

This skill is for *post-hoc audit* — reviewing components that already exist (written by Claude, by a teammate, by a previous iteration) against those same rules *plus* the visual-style-specific patterns that vary by theme (Vega spacing differs from Maia differs from Mira). When the two skills both apply, the official handles forward-generation and this one handles retrospective review. They don't conflict — they check the same rules from different directions.

Core Principle

Reviews catch drift. Even with the official skill enforcing rules during generation, components drift over time: someone copies from an older project, an LLM suggests space-y-4 and nobody catches it, a component was built before the project standardized on Maia, or a contributor uses Tailwind's color scale instead of semantic tokens. This skill finds those issues systematically.

When to Trigger

Proactive triggers (activate after components are written):

  • Claude just finished writing or modifying a custom component
  • User says "I built this" and pastes a component
  • User asks to add styling to an existing element
  • User is iterating on a layout

Explicit triggers (user directly requests review):

  • "Review this component"
  • "Check my spacing"
  • "Is this shadcn-idiomatic?"
  • "Does this follow the patterns?"
  • "Audit this layout"

Before Reviewing: Project Context

Before applying theme-specific patterns, understand the project. If the shadcn CLI is available, run:

npx shadcn@latest info --json

This returns: framework (Next.js / Vite / etc.), Tailwind version, base library (radix or base), installed components, icon library, resolved file paths, and the current style. Use this output to:

  • Match spacing/shape expectations to the project's visual style
  • Apply the correct composition pattern for the primitive base (Radix vs Base UI — APIs differ)
  • Know which components are already installed vs suggesting installs

If the CLI isn't available, infer from components.json directly, or ask the user: "Which visual style is this project using — Vega, Nova, Maia, Lyra, or Mira?"

Review Workflow

Step 1: Structure & Composition

Check the component is structured using shadcn conventions.

data-slot attributes. Every semantic element within a component should carry a data-slot attribute naming its role. This enables styling hooks, testing selectors, and consistent theming. Confirmed current pattern in shadcn source (e.g. <button data-slot="button" data-variant={variant} data-size={size}>).

Composition, not modification. Custom components should compose primitives from @/components/ui/*, not fork and modify them. If a primitive needs different behavior, wrap it; don't edit the source.

Primitive base awareness. If the project uses Radix (--base radix), expect asChild and Slot patterns, Radix data-state attributes. If Base UI (--base base), expect different composition APIs. Reference the current docs for the installed primitive: npx shadcn@latest docs <component>.

Step 2: Spacing Audit

Spacing is where most drift happens. Check against the project's visual style — see references/theme-styles.md for per-style patterns.

Universal rules (apply to all themes):

  • Use gap-* in flex/grid containers, never space-y-* / space-x-* or margins
  • Use Tailwind's standard spacing scale (multiples of 4px: 1, 1.5, 2, 4, 6, 8 — avoid 3, 5, 7)
  • Use size-* when width and height are equal (size-10 not w-10 h-10)
  • Responsive spacing uses gap-X md:gap-Y pattern

Style-specific rules: density and radius expectations differ by style. Reference references/theme-styles.md for the specifics.

Step 3: Design Tokens

Verify semantic tokens only — no hardcoded Tailwind color scale values.

CategoryUseAvoid
Text colortext-foreground, text-muted-foreground, text-primarytext-neutral-500, text-gray-900, text-slate-700
Backgroundbg-background, bg-card, bg-muted, bg-accentbg-gray-100, bg-white, bg-neutral-50
Borderborder-border, border-inputborder-gray-200, border-neutral-300
Border radiusrounded-md, rounded-lg (uses --radius)rounded-[20px], rounded-[8px]

Quick grep to flag hardcoded colors:

grep -rE '\b(neutral|gray|slate|zinc|stone)-[0-9]{2,3}\b' <path>

Step 4: Composability

Check the component can be reused without modification.

  • Takes a className prop merged via cn()
  • Exposes variants via CVA where variation is likely
  • Doesn't hardcode content; accepts children or content-shaped props
  • Isn't tightly coupled to a specific data model or route

Step 5: Responsive & Accessibility

  • Mobile-first baseline (< 768px design), progressive enhancement via md:, lg:
  • Touch targets minimum ~44px on interactive elements
  • min-w-0 on flex children to prevent overflow
  • Semantic HTML (buttons are <button>, not styled <div>)
  • Focus-visible states present (focus-visible:ring-*, focus-visible:border-*)
  • Motion respects motion-safe: / prefers-reduced-motion

See references/review-checklist.md for the expanded checklist.

Foundational Patterns

CVA (Class Variance Authority)

Variants are declared via cva(), typed via VariantProps:

import { cva, type VariantProps } from "class-variance-authority"

const buttonVariants = cva(
  "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-all",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground hover:bg-primary/90",
        outline: "border bg-background hover:bg-accent",
      },
      size: {
        default: "h-9 px-4 py-2",
        sm: "h-8 px-3 text-xs",
      },
    },
    defaultVariants: { variant: "default", size: "default" },
  }
)

type ButtonProps = React.ComponentProps<"button"> & VariantProps<typeof buttonVariants>

Extend with new variants; don't modify the base layer.

cn() Utility

Combines clsx (conditionals) + tailwind-merge (conflict resolution). Always use for className composition:

import { cn } from "@/lib/utils"

<div className={cn(
  "base-classes",
  isActive && "active-classes",
  className // consumer overrides win
)} />

Theme-Aware Styling

shadcn themes use CSS variables (OKLCH-based since 2025). Key variables: --radius, --background, --foreground, --primary, --secondary, --accent, --muted, --card, --popover, --destructive, --border, --input, --ring.

Use Tailwind's semantic class names that map to these (rounded-md → --radius, bg-primary → --primary) rather than hardcoded values.

Animation

Brief conventions:

  • Hover/focus/active: Tailwind transitions, 150ms
  • Color/state transitions: 200ms
  • Enter/exit of DOM elements: Tailwind animate-in/animate-out with Radix data-state, or Motion's AnimatePresence
  • Always respect motion-safe: for transform-based animations

See references/animation-patterns.md for the full guide.

Visual Styles Reference

shadcn ships five official visual styles, configurable via npx shadcn create or via preset codes (CLI v4):

StyleDensityShapeCanonical use
VegaStandardClassicDefault shadcn look
NovaCompactStandardDense UIs, data-heavy apps
MaiaGenerousSoft/rounded (often pill)Consumer apps, friendly interfaces
LyraStandardBoxy/sharpDeveloper tools, mono fonts
MiraDenseCompactAdmin dashboards, power users

Each style affects spacing scale, border radius, and component dimensions. See references/theme-styles.md for per-style spacing patterns and common mistakes.

Presets (new in CLI v4) pack style + theme + fonts + icons + radius into a single short code applied via npx shadcn@latest apply --preset <code>. When reviewing, check the project's preset if configured — it's the source of truth for many of these conventions.

Scope: What This Skill Does NOT Enforce

Be explicit about the difference between shadcn canon and project-specific conventions. This skill reviews against shadcn canon. Project-specific conventions (e.g. "our team always uses gap-4 between form fields") belong in the project's own style guide or a project-specific skill, not this one.

When in doubt, cite the source: "shadcn components use data-slot — see the button source at ui.shadcn.com/docs/components/button" vs "your project consistently uses gap-4 between form fields."

Output Format

A good review:

  1. Summarizes what was reviewed in one line
  2. Flags issues grouped by category (structure, spacing, tokens, composability, responsive/a11y)
  3. Severity-marks each issue: ✅ passes, ⚠️ suggestion, ❌ blocking
  4. Shows the fix inline where the fix is short and obvious; references the relevant pattern file where the fix is nuanced
  5. Offers to apply fixes if the user wants

Keep it scannable. Don't belabor passing items — a single ✅ summary line for what's good is enough.

Example Review Output

## Review: `<PageHeader />`

**Structure** ✅ `data-slot` present, composition clean
**Spacing** ⚠️ Uses `space-y-4` in flex container — swap to `gap-4`
**Tokens** ❌ `text-neutral-500` on line 12 — use `text-muted-foreground`
**Composability** ✅ Accepts className, variant props via CVA
**Responsive/a11y** ⚠️ Missing `min-w-0` on flex child (may overflow on narrow screens)

Fixes:
- Line 8: `space-y-4` → `gap-4`
- Line 12: `text-neutral-500` → `text-muted-foreground`
- Line 18: Add `min-w-0` to wrapping `<div>`

Want me to apply these?

Reference Files

Resources

  • Official shadcn docs: ui.shadcn.com
  • Component reference (live): npx shadcn@latest docs <component> — returns current doc and example URLs
  • Project context: npx shadcn@latest info --json
  • Theme creator: ui.shadcn.com/create
  • TweakCN (interactive theme editor): tweakcn.com

平台分布

Codex

38.4%
按下载量换算397

Claude

29.47%
按下载量换算305

Cursor

17.24%
按下载量换算178

Gemini CLI

10.4%
按下载量换算108

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills