Agent skill UI design
Tailwind Theme Builder
Work with color, contrast or theme choices for a web interface.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add https://github.com/jezweb/claude-skills/tree/main/plugins/frontend/skills/tailwind-theme-builder --skill tailwind-theme-builder --agent claude-code --yesCheck this file in your project.claude/skills/tailwind-theme-builder/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add https://github.com/jezweb/claude-skills/tree/main/plugins/frontend/skills/tailwind-theme-builder --skill tailwind-theme-builderSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Use a Vite React project with Tailwind CSS v4 for the bundled recipes. Check the installed version and configuration before applying a migration.
View operation manualWhat this skill helps with
- Work with color, contrast or theme choices for a web interface.
Good for
- Palettes and themes
- Input
- Current Vite config, CSS entry, theme values and one test component.
- Theme scopes
- :root and .dark.
- Mapping
- @theme inline connects semantic variables to Tailwind utilities.
- Deliverable
- A built stylesheet and a working local theme switch.
- Skill name
tailwind-theme-builder- Repository
jezweb/claude-skills
Check both the generated utility and its active value
No project context
Add dark mode for Tailwind.
The request leaves the Tailwind major version, theme controls and target components undefined.
A testable theme setup
- Identify the Vite plugin and CSS entry.
- Map approved semantic colors on one component.
- Compile and switch both themes on the real preview.
Tailwind Theme Builder operation manual
Follow the publisher’s Tailwind v4 variable and theme provider pattern. Verify one component before expanding.
Start with your existing project setup and one route where light and dark are both useful.
Identify the project’s actual theme entry
The published assets target a specific Vite and Tailwind setup.
Prompt · Step 1Use tailwind-theme-builder. In [Project directory], inspect package.json, the Vite plugins, CSS entry and any existing theme provider or Tailwind config. Compare them with the installed assets and migration guide. Confirm the current major version and show where you will make the changes. Keep existing migration files until their usages are understood.Create the semantic light and dark classes
One inline mapping reads values from both theme scopes.
Prompt · Step 2Use [Approved theme values] to define the semantic background, text and action colors in :root and .dark. Add one top-level @theme inline mapping and use the publisher’s dark selector pattern when the project uses the .dark class. Update [Pilot component] with the resulting semantic utility classes and connect the existing or approved ThemeProvider.Compile and test the switch
A working stylesheet needs both the utility class and the correct theme state.
- The CSS build produces the semantic utilities.
- The local route changes theme and keeps the selected preference on reload.
- The scoped component remains readable.
Prompt · Step 3Run [Project build] and check the generated CSS for bg-background and text-foreground. Open [Local route] in light and dark, toggle the mode and reload. Verify the provider or selector changes the active theme and that focus, text and primary actions remain readable. Report measured checks and any unverified state.
Look up a theme failure
Inspect the theme mapping and actual CSS output.
A semantic class is missing@theme inline
- Command or reference
Tailwind v4- Examples
- @theme inline { --color-background: var(--background); }
The page is stuck in one mode.dark
- Command or reference
Theme selector- Examples
- Check the class on the theme root and the resolved semantic variable in DevTools.
Troubleshooting and FAQ
Can I use this unchanged in a Tailwind v3 project?
The example uses the v4 CSS-first workflow. Consult the installed migration guide and your project’s build before converting its theme.
How can I tell which mapping is working?
Inspect the generated utility and read its resolved color in both light and dark states.