Skip to content
Trending 2026→One of the top-searched agent skills of 2026.

// Migrate v3 to Tailwind v4 Oxide, author CSS-first @theme tokens, wire the Vite/PostCSS plugin, ship shadcn variants.

Tailwind v4 Migrator

skill --stat
  • last update

    Jun 24, 2026

  • license

    MITv1.0.0

  • format

    SKILL.md

quickstart.sh
3 steps
  1. Install

    // Downloads SKILL.md into ~/.claude/skills/tailwind-v4-oxide-css/

    $ curl -fsSL --create-dirs -o ~/.claude/skills/tailwind-v4-oxide-css/SKILL.md https://claudeskil.com/skills/tailwind-v4-oxide-css/SKILL.md
  2. Invoke

    // Inside Claude Code, type the skill name as a slash command

    > /tailwind-v4-oxide-css give my landing page a hero treatment
  3. Or just ask

    // Claude loads the skill by itself when a request matches its description

    > give my landing page a hero treatment
tailwind-v4-oxide-css/
references
SKILL.md
readonly
name:
Tailwind v4 Migrator
slug:
tailwind-v4-oxide-css
version:
v1.0.0
license:
MIT
author:
@chiragthummar16
categories:
tags:
#tailwind-v4#oxide#css-first#shadcn#vite
description:

Migrate v3 to Tailwind v4 Oxide, author CSS-first @theme tokens, wire the Vite/PostCSS plugin, ship shadcn variants.

features.md
5 capabilities

// What you can do with it

  • Runs npx @tailwindcss/upgrade (the codemod that rewrites utility class renames like shadow-sm → shadow-xs and outline-none → outline-hidden).
  • Replaces the three @tailwind base; @tailwind components; @tailwind utilities; directives with a single @import "tailwindcss";.
  • Translates theme.extend values into a CSS-first @theme { --color-, --font-, --spacing-* } block so tokens become real custom properties.
  • Wires the build: @tailwindcss/vite in vite.config.ts, or @tailwindcss/postcss in postcss.config.mjs for Next.js/Webpack. Removes the old tailwindcss + autoprefixer PostCSS entries (v4 handles prefixin
  • Ports custom utilities to @utility, plugins to @plugin, and converts dark mode to @custom-variant dark (&:where(.dark, .dark *));.

README.md

tailwind-v4-oxide-css/README.md
7 sections

Tailwind v4 Migrator

Move a Tailwind CSS v3 codebase to the v4 Oxide engine without leaving broken classes or a stale config behind. This skill runs the official upgrade tool, rewrites your CSS entry to the CSS-first model, swaps in the right build plugin for your bundler, and repairs shadcn/ui setups that assumed tailwind.config.js. It is aimed at frontend engineers maintaining real apps on Vite, Next.js, or a PostCSS pipeline.

When to use it

  • You have a working v3 project and want the faster Oxide engine plus native cascade-layer output.
  • npx @tailwindcss/upgrade ran but left @apply errors, missing CSS variables, or a tailwind.config.js that nothing reads anymore.
  • Your shadcn/ui components stopped theming correctly after the bump (the hsl(var(--...)) token plumbing changed).
  • You are starting fresh on v4 and want a clean @theme block instead of porting a JS config.

What it does

  • Runs npx @tailwindcss/upgrade (the codemod that rewrites utility class renames like shadow-sm → shadow-xs and outline-none → outline-hidden).
  • Replaces the three @tailwind base; @tailwind components; @tailwind utilities; directives with a single @import "tailwindcss";.
  • Translates theme.extend values into a CSS-first @theme { --color-*, --font-*, --spacing-* } block so tokens become real custom properties.
  • Wires the build: @tailwindcss/vite in vite.config.ts, or @tailwindcss/postcss in postcss.config.mjs for Next.js/Webpack. Removes the old tailwindcss + autoprefixer PostCSS entries (v4 handles prefixing).
  • Ports custom utilities to @utility, plugins to @plugin, and converts dark mode to @custom-variant dark (&:where(.dark, .dark *));.

Usage

bash
curl -fsSL --create-dirs -o ~/.claude/skills/tailwind-v4-oxide-css/SKILL.md https://claudeskil.com/skills/tailwind-v4-oxide-css/SKILL.md
# then, in your project:
claude "migrate this app to Tailwind v4"

Resulting CSS entry:

css
@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));

@theme {
  --color-brand: oklch(0.62 0.19 256);
  --font-display: "Inter", sans-serif;
}

@utility tap-highlight-none {
  -webkit-tap-highlight-color: transparent;
}

Tips & gotchas

  • v4 needs a modern target (Safari 16.4+, Chrome 111+); it emits oklch() and @property. Don't migrate if you must support older browsers.
  • @theme keys are namespaced — --color-brand generates bg-brand/text-brand automatically. Arbitrary CSS vars under :root do not create utilities; only @theme does.
  • Keep @import lines first. Anything before @import "tailwindcss"; breaks the cascade-layer ordering silently.
  • For shadcn, regenerate components.json-driven tokens; the v3 hsl(var(--background)) pattern still works but new components expect the v4 layout.

FAQ

Do I still need a JS config? No. @config "./tailwind.config.js"; is supported for gradual migration, but the target is a fully CSS-first setup with no JS config.

Is autoprefixer still required? No. Oxide includes vendor prefixing and @import inlining, so you remove both autoprefixer and postcss-import.

Will the codemod touch my components? It rewrites renamed utility classes in your templates and CSS. Review the diff — custom class strings built at runtime won't be caught.

$ cat reviews/

Reviews

// No reviews yet. Be the first.
Loading review form…

$ ls related/

explore all →