Production-ready setup for Tailwind CSS v4 with shadcn/ui, dark mode, and CSS variable architecture.
Works with
Four-step architecture: define CSS variables at root level with hsl() wrapper, map to Tailwind utilities via @theme inline , apply base styles, and enable automatic dark mode switching
Vite plugin-based configuration (no PostCSS or tailwind.config.ts needed); requires @tailwindcss/vite and empty \"config\" in components.json
Semantic color tokens for destructive, success, warning, and
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiontailwind-v4-shadcnExecute the skills CLI command in your project's root directory to begin installation:
Fetches tailwind-v4-shadcn from secondsky/claude-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate tailwind-v4-shadcn. Access via /tailwind-v4-shadcn in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
5
total installs
5
this week
101
GitHub stars
0
upvotes
Run in your terminal
5
installs
5
this week
101
stars
Production-tested: WordPress Auditor (https://wordpress-auditor.webfonts.workers.dev) Last Updated: 2025-12-04 Status: Production Ready ✅
CRITICAL FOR AI AGENTS: If you're Claude Code helping a user set up Tailwind v4:
reference/common-gotchas.mdUSER ACTION REQUIRED: Tell Claude to check this skill first!
Say: "I'm setting up Tailwind v4 + shadcn/ui - check the tailwind-v4-shadcn skill first"
Without skill activation:
With skill activation:
All of these are handled automatically when the skill is active.
bun add tailwindcss @tailwindcss/vite
# or: npm install tailwindcss @tailwindcss/vite
bun add -d @types/node
# Note: Using pnpm for shadcn init due to known Bun compatibility issues
# (bunx has "Script not found" and postinstall/msw problems)
pnpm dlx shadcn@latest init
// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import path from 'path'
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
}
})
{
"tailwind": {
"config": "", // ← CRITICAL: Empty for v4
"css": "src/index.css",
"cssVariables": true
}
}
rm tailwind.config.ts # v4 doesn't use this file
This pattern is mandatory - skipping steps will break your theme.
/* src/index.css */
@import "tailwindcss";
:root {
--background: hsl(0 0% 100%); /* ← hsl() wrapper required */
--foreground: hsl(222.2 84% 4.9%);
--primary: hsl(221.2 83.2% 53.3%);
/* ... all light mode colors */
}
.dark {
--background: hsl(222.2 84% 4.9%);
--foreground: hsl(210 40% 98%);
--primary: hsl(217.2 91.2% 59.8%);
/* ... all dark mode colors */
}
Critical Rules:
@layer base)hsl() wrapper on all color values.dark for dark mode (NOT .dark { @theme { } })@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-primary: var(--primary);
/* ... map ALL CSS variables */
}
Why This Is Required:
bg-background, text-primary)bg-primary etc. won't exist@layer base {
body {
background-color: var(--background); /* NO hsl() here */
color: var(--foreground);
}
}
Critical Rules:
var(--background)hsl(var(--background))<div className="bg-background text-foreground">
{/* No dark: variants needed - theme switches automatically */}
</div>
See reference/dark-mode.md for full implementation or use template:
// Copy from: templates/theme-provider.tsx
// src/main.tsx
import { ThemeProvider } from '@/components/theme-provider'
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
<App />
</ThemeProvider>
</React.StrictMode>,
)
pnpm dlx shadcn@latest add dropdown-menu
See reference/dark-mode.md for ModeToggle component code.
Wrap color values with hsl() in :root and .dark
--background: hsl(0 0% 100%); /* ✅ Correct */
Use @theme inline to map all CSS variables
@theme inline {
--color-background: var(--background);
}
Set "tailwind.config": "" in components.json
{ "tailwind": { "config": "" } }
Delete tailwind.config.ts if it exists
Use @tailwindcss/vite plugin (NOT PostCSS)
Use cn() for conditional classes
import { cn } from "@/lib/utils"
<div className={cn("base", isActive && "active")} />
Put :root or .dark inside @layer base
/* WRONG */
@layer base {
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
anthropics/claude-code
mblode/agent-skills
github/awesome-copilot
leonxlnx/taste-skill
sickn33/antigravity-awesome-skills
erichowens/some_claude_skills
Useful defaults in tailwind-v4-shadcn — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
tailwind-v4-shadcn is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
tailwind-v4-shadcn fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
tailwind-v4-shadcn is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Solid pick for teams standardizing on skills: tailwind-v4-shadcn is focused, and the summary matches what you get after install.
Useful defaults in tailwind-v4-shadcn — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Registry listing for tailwind-v4-shadcn matched our evaluation — installs cleanly and behaves as described in the markdown.
tailwind-v4-shadcn is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
tailwind-v4-shadcn reduced setup friction for our internal harness; good balance of opinion and flexibility.
Keeps context tight: tailwind-v4-shadcn is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 62