/qadri-build:shadcn-component-reviewfrom qadri-build
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.
Ships in qadri-build. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Systematic audit process for ensuring custom components align with shadcn design patterns, the project's chosen visual style, and modern composition conventions.
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.
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.
Proactive triggers (activate after components are written):
Explicit triggers (user directly requests review):
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:
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?"
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>.
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):
gap-* in flex/grid containers, never space-y-* / space-x-* or marginssize-* when width and height are equal (size-10 not w-10 h-10)gap-X md:gap-Y patternStyle-specific rules: density and radius expectations differ by style. Reference references/theme-styles.md for the specifics.
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>
Check the component can be reused without modification.
className prop merged via cn()children or content-shaped propsmd:, lg:min-w-0 on flex children to prevent overflow<button>, not styled <div>)focus-visible:ring-*, focus-visible:border-*)motion-safe: / prefers-reduced-motionSee references/review-checklist.md for the expanded checklist.
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.
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
)} />
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.
Brief conventions:
animate-in/animate-out with Radix data-state, or Motion's AnimatePresencemotion-safe: for transform-based animationsSee references/animation-patterns.md for the full guide.
shadcn ships five official visual styles, configurable via npx shadcn create or via preset codes (CLI v4):
| Style | Density | Shape | Canonical use |
|---|---|---|---|
| Vega | Standard | Classic | Default shadcn look |
| Nova | Compact | Standard | Dense UIs, data-heavy apps |
| Maia | Generous | Soft/rounded (often pill) | Consumer apps, friendly interfaces |
| Lyra | Standard | Boxy/sharp | Developer tools, mono fonts |
| Mira | Dense | Compact | Admin 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.
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."
A good review:
Keep it scannable. Don't belabor passing items — a single ✅ summary line for what's good is enough.
## 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?
npx shadcn@latest docs <component> — returns current doc and example URLsnpx shadcn@latest info --jsonWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub qadri-uk/claude-skills --plugin qadri-build135 skills in this plugin
/a-b-test-designDesign an A/B experiment — hypothesis, variants, primary metric, and sample size. Use when a change can be measured quantitatively at scale. For observing behaviour qualitatively, use `test-scenario`./addyosmani-qualityWeb quality skills from Google Chrome's Addy Osmani: a measurement-first
web quality audit (Lighthouse-style), accessibility (WCAG 2.2), Core Web
Vitals (LCP/INP/CLS), performance, SEO, and security/modern-web best practices.
/agent-harness-reviewReviews an agent harness or agent design against Anthropic's agent and Claude Opus 5.5 guidance, Cognition's context principles and 2026 research on skill routing and skill-induced failures. Covers when subagents or parallel agents pay off, how to brief them, how many skills, plugins, MCP servers and hooks load every session, tool design and proportionate verification. Use when auditing a Claude Code or Codex setup, deciding whether to add subagents or a multi-agent workflow, trimming a skill library, or designing an agent loop in an app. For writing or evaluating a single skill, use skill-creator.Other plugins' skills for the same job