/davila7:tailwind-theme-builderfrom davila7
Sets up Tailwind v4 with shadcn/ui theming and dark mode. Guides through dependency installation, Vite configuration, CSS variable architecture, and theme provider setup.
Ships in davila7. 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.
Set up a fully themed Tailwind v4 + shadcn/ui project with dark mode. Produces configured CSS, theme provider, and working component library.
pnpm add tailwindcss @tailwindcss/vite
pnpm add -D @types/node tw-animate-css
pnpm dlx shadcn@latest init
# Delete v3 config if it exists
rm -f tailwind.config.ts
Copy assets/vite.config.ts or add the Tailwind plugin:
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') } }
})
This exact order is required. Skipping steps breaks the theme.
src/index.css:
@import "tailwindcss";
@import "tw-animate-css";
/* 1. Define CSS variables at root (NOT inside @layer base) */
:root {
--background: hsl(0 0% 100%);
--foreground: hsl(222.2 84% 4.9%);
--primary: hsl(221.2 83.2% 53.3%);
--primary-foreground: hsl(210 40% 98%);
/* ... all semantic tokens */
}
.dark {
--background: hsl(222.2 84% 4.9%);
--foreground: hsl(210 40% 98%);
--primary: hsl(217.2 91.2% 59.8%);
--primary-foreground: hsl(222.2 47.4% 11.2%);
}
/* 2. Map variables to Tailwind utilities */
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
}
/* 3. Apply base styles (NO hsl() wrapper here) */
@layer base {
body {
background-color: var(--background);
color: var(--foreground);
}
}
Result: bg-background, text-primary etc. work automatically. Dark mode switches via .dark class — no dark: variants needed for semantic colours.
Copy assets/theme-provider.tsx to your components directory, then wrap your app:
import { ThemeProvider } from '@/components/theme-provider'
ReactDOM.createRoot(document.getElementById('root')!).render(
<ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
<App />
</ThemeProvider>
)
Add a theme toggle:
pnpm dlx shadcn@latest add dropdown-menu
See references/dark-mode.md for the ModeToggle component.
{
"tailwind": {
"config": "",
"css": "src/index.css",
"baseColor": "slate",
"cssVariables": true
}
}
"config": "" is critical — v4 doesn't use tailwind.config.ts.
Always:
hsl() in :root/.dark@theme inline to map all CSS variables@tailwindcss/vite plugin (NOT PostCSS)tailwind.config.ts if it existsNever:
:root/.dark inside @layer base.dark { @theme { } } (v4 doesn't support nested @theme)hsl(var(--background))@apply with @layer base classes (use @utility instead)| Symptom | Cause | Fix |
|---|---|---|
bg-primary doesn't work | Missing @theme inline | Add @theme inline block |
| Colours all black/white | Double hsl() wrapping | Use var(--colour) not hsl(var(--colour)) |
| Dark mode not switching | Missing ThemeProvider | Wrap app in <ThemeProvider> |
| Build fails | tailwind.config.ts exists | Delete the file |
| Animation errors | Using tailwindcss-animate | Install tw-animate-css instead |
@apply fails on custom class | v4 breaking change | Use @utility instead of @layer components |
See references/common-gotchas.md for detailed error explanations with sources.
Copy from assets/ directory:
index.css — Complete CSS with all colour variablescomponents.json — shadcn/ui v4 configvite.config.ts — Vite + Tailwind plugintheme-provider.tsx — Dark mode providerutils.ts — cn() utilityreferences/common-gotchas.md — 8 documented errors with GitHub sourcesreferences/dark-mode.md — Complete dark mode implementationreferences/architecture.md — Deep dive into 4-step patternreferences/migration-guide.md — v3 to v4 migrationassets/components.json (opens in a new tab)assets/index.css (opens in a new tab)assets/theme-provider.tsx (opens in a new tab)assets/tsconfig.app.json (opens in a new tab)assets/utils.ts (opens in a new tab)assets/vite.config.ts (opens in a new tab)references/architecture.md (opens in a new tab)references/common-gotchas.md (opens in a new tab)references/dark-mode.md (opens in a new tab)references/migration-guide.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tailwind-v4, shadcn-ui, dark-mode, css-variables, theme-setup
npx claudepluginhub ulpi-io/plugin-marketplace --plugin davila7328 skills in this plugin
/3d-web-experienceExpert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing .../ab-test-setupWhen the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," or "how long should I run this test." Use this whenever someone is comparing two approaches and wants to measure which performs better. For tracking implementation, see analytics-tracking. For page-level conversion optimization, see page-cro./Other plugins' skills for the same job
3 plugins in one repository ship this exact skill · first indexed Nov 8, 2026