tailwind-v3-to-v4-migration

tailwind-v3-to-v4-migration is a skill for Claude Code from a-tokyo/agent-skills. It costs 271 tokens per session (3,718 once invoked), scanned A, original, MIT.

A guided upgrade process for moving a project from Tailwind CSS version 3 to version 4, including code changes and configuration work.

In plain words
What is it for?
Use it when upgrading an existing Tailwind CSS project, fixing errors after a partial upgrade, or moving JavaScript-based settings into Tailwind’s CSS-based format.
Why use it?
It handles the migration details that automatic code conversion may miss, such as changed defaults, dependencies, and build-tool settings. It also checks that the upgrade does not unintentionally change the page’s appearance.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the all-skills plugin — 6 skills shipped together

Good fit Use it when upgrading an existing Tailwind CSS project, fixing errors after a partial upgrade, or moving JavaScript-based settings into Tailwind’s CSS-based format.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/a-tokyo/agent-skills/tailwind-v3-to-v4-migration
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add a-tokyo/agent-skills --skill tailwind-v3-to-v4-migration
Clone the repo
git clone --depth 1 https://github.com/a-tokyo/agent-skills

Made for: Claude Code.

Or install all-skills, the plugin that ships this one along with the rest of its 6 skills.

Its marketplace also offers this one on its own, as the plugin tailwind-v3-to-v4-migration/plugin install tailwind-v3-to-v4-migration after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tailwind-v3-to-v4-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/a-tokyo/agent-skills/tailwind-v3-to-v4-migration/github.svg)](https://agentmods.dev/skills/a-tokyo/agent-skills/tailwind-v3-to-v4-migration)
Your own site
<a href="https://agentmods.dev/skills/a-tokyo/agent-skills/tailwind-v3-to-v4-migration"><img src="https://agentmods.dev/badge/skills/a-tokyo/agent-skills/tailwind-v3-to-v4-migration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tailwind-v3-to-v4-migration

Your own site · 80×15
<a href="https://agentmods.dev/skills/a-tokyo/agent-skills/tailwind-v3-to-v4-migration"><img src="https://agentmods.dev/badge/skills/a-tokyo/agent-skills/tailwind-v3-to-v4-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 271 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,718 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00271 $0.03718
Opus 5 $0.00135 $0.01859
Sonnet 5 $0.00054 $0.00744
Haiku 4.5 $0.00027 $0.00372

Measured 11d ago against content hash 951f7e74aa7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

tailwind-v3-to-v4-migration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/tailwind-v3-to-v4-migration/SKILL.md · 209 lines

How it starts

The opening of the file, as written. The whole thing — 209 lines — stays where its author put it; the contents beside it link to each section on GitHub.

tailwind-v3-to-v4-migration

Upgrade a codebase from Tailwind CSS v3 to v4. The codemod does ~80% of the mechanical work; this skill supplies the 20% of judgment where migrations actually break — changed defaults, config porting, plugin/animation swaps, and proving nothing moved.

When to use

  • Upgrading any project from Tailwind v3.x to v4.x.
  • Build errors after a partial upgrade: @tailwind directives unknown, missing @tailwindcss/postcss, Cannot apply unknown utility class, tailwind.config no longer picked up.
  • Converting tailwind.config.{js,ts} to CSS-first @theme.

Skip if: the project is already on v4; you need to downgrade; or you are building a brand-new design system rather than migrating one. Note v4 targets Safari 16.4+, Chrome 111+, Firefox 128+ — if you must support older browsers, stay on v3.4 (flag this to the operator before proceeding).

The one idea that makes this safe

A correct migration is a visual no-op. Every renamed utility is a pure alias — shadow-smshadow-xs, roundedrounded-sm, ringring-3, outline-noneoutline-hidden all compile to the same CSS as before. So what changes pixels is almost entirely v4's changed defaults (Step 3); the few non-default exceptions — the space-x/y-* & divide-* selector change, gradient-variant preservation, and container config removal — are flagged in Step 4. Rename mechanically, neutralize the changed defaults, fix those few exceptions, and the rendered output is identical. That is also how you verify success (Step 5): capture the UI before, prove it's unchanged after.

Procedure

Always work on a branch. Run the steps in order; do not skip Step 0 or Step 3.

Step 0 — Pre-flight & baseline (do not skip)

  1. Confirm Node 20+ (node -v) and that the working tree is clean. Create a branch (e.g. tailwind-v4).
  2. Inventory every Tailwind entry point — there may be more than one: each CSS file with @tailwind/@import "tailwindcss", every tailwind.config.*, every postcss.config.*, the bundler config (next/vite/webpack), and package.json. Monorepos: do this per package.
  3. Record the current setup: darkMode value, custom theme.extend, plugins, the package manager (npm/yarn/pnpm/bun), and two easy-to-miss config options that need special handling later: prefix (v4 changes tw-flextw:flex) and theme.container (center/padding are gone in v4 — recreate via @utility container).
  4. Capture a baseline of how the app looks now so you can prove the migration changed nothing: a screenshot set or a visual-regression run on v3 (see references/05-verification-playwright.md), or at minimum a list of key pages to eyeball. Confirm the project builds green on v3 first.

Read the full file on GitHub · 209 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 209 lines · 271 tokens per session scan A 951f7e74aa7f

Subscribe to this mod's changes

tailwind-v3-to-v4-migration is a skill published in the GitHub repository a-tokyo/agent-skills (15 stars, last pushed 1mo ago), licensed MIT. It adds 271 tokens to every session and 3,718 once invoked, about $0.0014 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories