shadcn-component-review
БесплатноБез исполняемых скриптовНе проверенReview custom components and layouts against shadcn design patterns, visual style conventions (Vega, Nova, Maia, Lyra, Mira), composition rules, design token…
от mattbx★ 26 звёзд на GitHubОб этом скилле
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, neverspace-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-10notw-10 h-10) - Responsive spacing uses
gap-X md:gap-Ypattern
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.
| Category | Use | Avoid |
|---|---|---|
| Text color | text-foreground, text-muted-foreground, text-primary |
text-neutral-500, text-gray-900, text-slate-700 |
| Background | bg-background, bg-card, bg-muted, bg-accent |
bg-gray-100, bg-white, bg-neutral-50 |
| Border | border-border, border-input |
border-gray-200, border-neutral-300 |
| Border radius | rounded-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 b
Установить shadcn-component-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл shadcn-component-review?
Review custom components and layouts against shadcn design patterns, visual style conventions (Vega, Nova, Maia, Lyra, Mira), composition rules, design token usage, and Radix/Base UI composition patterns. Use PROACTIVELY after writing or modifying any custom UI component, page layout, or variant of a shadcn component. Use when the user says "review this component", "check my spacing", "does this follow shadcn patterns", "audit this layout", "is this shadcn-idiomatic", or shares a component for feedback. Catches spacing drift, hardcoded colors, missing data-slot attributes, inconsistent theme application, and composition anti-patterns that shipping-fast-with-AI tools often miss.
Как установить скилл shadcn-component-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл shadcn-component-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic