shadcn-integration
БесплатноБез исполняемых скриптовНе проверенIntegration guide for shadcn/ui components with OKLCH design tokens. Use when setting up shadcn, customizing themes, or adding components to Next.js projects…
Об этом скилле
Key Principle: OKLCH tokens remain the source of truth. shadcn CSS variables are aliases that reference OKLCH tokens, not hardcoded values.
This skill is auto-invoked when:
- User runs
/init --tokens --shadcn - User asks to add shadcn components to a project
- Customizing shadcn theme colors or styles
- Setting up Next.js with shadcn/ui
Benefits:
- WCAG-compliant colors via OKLCH with perceptual uniformity
- Full shadcn component library compatibility
- 8 customization options without manual CSS editing
- Automatic dark mode support
- Menu-specific theming with variants
Step 2: Review generated files
design/systems/shadcn-variables.css- CSS variablescomponents.json- shadcn CLI configcomponents/ui/menu-variants.ts- Menu styling
Step 3: Import in globals.css
@import '../design/systems/shadcn-variables.css';
Step 4: Add components
npx shadcn@latest add button card dropdown-menu
After:
- 8 questions → complete theme system
- OKLCH ensures WCAG-compliant contrast
- Menu variants via tailwind-variants
- Automatic dark mode via CSS variables
Use AskUserQuestion tool with these questions in sequence:
- Style Preset → Determines shadcn style + density
- Base Color → Generates OKLCH primary scale (11 shades)
- Theme Mode → Configures light/dark/system preference
- Icon Library → Sets package and components.json config
- Font Family → Configures next/font
- Border Radius → Sets --radius CSS variable
- Menu Color → Generates menu background tokens
- Menu Accent → Generates menu active state tokens
Run the token generation script:
node .spec-flow/scripts/node/generate-shadcn-tokens.js --config answers.json
Generated files:
design/systems/shadcn-variables.css- shadcn CSS variable aliasesdesign/systems/tokens.json- Full token definitionscomponents.json- shadcn CLI configurationcomponents/ui/menu-variants.ts- Menu styling with tailwind-variants
Based on questionnaire answers:
# Icon library (based on choice)
pnpm add lucide-react # or @heroicons/react or @phosphor-icons/react
# shadcn dependencies
pnpm add tailwindcss-animate class-variance-authority clsx tailwind-merge
# For menu variants
pnpm add tailwind-variants
Update app/layout.tsx with font configuration:
import { Inter } from 'next/font/google'
const fontSans = Inter({
subsets: ['latin'],
variable: '--font-sans',
})
export default function RootLayout({ children }) {
return (
<html lang="en" className={fontSans.variable}>
<body>{children}</body>
</html>
)
}
Now users can add components that automatically use the generated theme:
npx shadcn@latest add button
npx shadcn@latest add card
npx shadcn@latest add dropdown-menu
npx shadcn@latest add dialog
Components will use CSS variables from shadcn-variables.css.
| OKLCH Token | shadcn Variable | Usage |
|---|---|---|
--color-neutral-50 |
--background |
Page background |
--color-neutral-900 |
--foreground |
Primary text |
--color-primary-600 |
--primary |
Brand actions |
--color-neutral-50 |
--primary-foreground |
Text on primary |
--color-neutral-100 |
--muted |
Subtle backgrounds |
--color-neutral-500 |
--muted-foreground |
Secondary text |
--color-error-fg |
--destructive |
Delete actions |
--color-neutral-200 |
--border |
Dividers, inputs |
Menu Token System
Menu Color Options:
| Choice | Effect |
|---|---|
background |
Uses page background |
surface |
Elevated card with shadow |
primaryTint |
5% primary color wash |
glass |
Transparent + blur |
Menu Accent Options:
| Choice | Effect |
|---|---|
| `bor |
Установить shadcn-integration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл shadcn-integration?
Integration guide for shadcn/ui components with OKLCH design tokens. Use when setting up shadcn, customizing themes, or adding components to Next.js projects. Auto-trigger on /init --tokens --shadcn flag.
Как установить скилл shadcn-integration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл shadcn-integration запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic