Skill library

Agent skill Frontend

Tailwind V4 shadcn

Build or refine reusable components for a web interface.

  • UI components

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add https://github.com/secondsky/claude-skills/tree/main/plugins/tailwind-v4-shadcn/skills/tailwind-v4-shadcn --skill tailwind-v4-shadcn --agent claude-code --yes

Check this file in your project.claude/skills/tailwind-v4-shadcn/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add https://github.com/secondsky/claude-skills/tree/main/plugins/tailwind-v4-shadcn/skills/tailwind-v4-shadcn --skill tailwind-v4-shadcn

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Bring an existing Vite React app with Tailwind CSS v4. The fixture built with Vite 7.2.4, React 19.2.0 and @tailwindcss/vite 4.3.5 and used shadcn CLI 4.23.1 for read-only inspection.

View operation manual

What this skill helps with

  • Build or refine reusable components for a web interface.

Good for

  • Component implementation
Skill name
tailwind-v4-shadcn
Scenario
Repair semantic theme tokens in a Vite project
Deliverable
A working semantic button color in each theme, with the CSS and Vite path documented.
Skill name
tailwind-v4-shadcn

Define a styling task with a visible result

A request with an unclear outcome

Run init again and delete the old Tailwind config.

A live v4 entry can still import a legacy config. Initialization can rewrite selected project files.

A workflow with observable results

  1. Confirm the Vite and shadcn configuration
  2. Restore the semantic mapping at the CSS entry
  3. Build and verify the themed component

Tailwind v4 + shadcn/ui operation manual

Trace the Vite entry and shadcn CSS configuration, then restore a semantic token through both modes.

Replace the bracketed details with your own project and target.

  1. Confirm the Vite and shadcn configuration

    Locate Tailwind's plugin, CSS entry and generated component paths.

    Prompt · Step 1
    Use tailwind-v4-shadcn to inspect [existing Vite React project]. Locate the active @tailwindcss/vite plugin, CSS import, aliases and components.json. Use your available shadcn info --json to confirm the detected project and CSS paths. Read any active @config before suggesting config changes. Show the first broken link in the bg-primary and text-primary-foreground chain.
  2. Restore the semantic mapping at the CSS entry

    Map root and dark values through @theme inline.

    Prompt · Step 2
    Use tailwind-v4-shadcn to repair [approved semantic token]. Define the theme's actual color values under :root and the existing dark selector, and map them at top level through @theme inline. Keep full CSS colors such as the template's hsl(...) or an existing supported OKLCH value, avoiding a second wrapper. If a new shadcn component is needed, preview add with --dry-run and show files and dependencies for approval.
  3. Build and verify the themed component

    Check emitted aliases, computed colors and persistence.

    • The project's own Vite build emits the semantic alias.
    • The same component computes distinct intended colors in both themes.
    Prompt · Step 3
    Use tailwind-v4-shadcn to build [local app] with its existing project command. Inspect the compiled semantic utility and then test [one button] in light and dark through the app's own switcher. Reload to check persistence if the switcher stores the selection. Report computed pairs, CSS output and any missing interaction or registry checks.

Find the relevant rule

Point the assistant to the installed Skill and a specific issue.

The component is only unthemed in dark modeReference
Command or reference
templates/index.css
Examples
Check the active dark selector and its alias in @theme inline.
The CLI resolves the wrong style pathReference
Command or reference
templates/components.json
Examples
Inspect CLI project info and match the active stylesheet and aliases.

Tailwind v4 + shadcn/ui troubleshooting

Does every Tailwind v4 color require hsl()?

The publisher template stores complete HSL colors. Tailwind v4 also supports complete OKLCH values. Match the project's representation and inspect the generated declaration where it is applied.