Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIGitHub CopilotGitHub CopilotGemini CLIGemini CLI+20 more

    Tailwind Purge Fixer

    1

    The Tailwind Purge Fixer is an expert-level diagnostic skill designed for frontend developers struggling with oversized production CSS files.

    $5

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    0 installsSecurity scanned
    Tailwind Purge Fixer

    Tailwind Purge Fixer

    Example session with this skill installed

    "I just migrated my Vite React project from Tailwind v3 to v4. Everything works, but my production CSS jumped from about 4KB to over 80KB! I am using a few components from shadcn-ui. My app.css uses @import "tailwindcss"; and I added @source "../node_modules"; just to make sure the UI library styles loaded properly. Can you help me get my file size back down?"

    • Read your context and instructions
    • Compiled the tailwind purge fixer
    • Generated the app files

    Found it — the culprit is this line:

    @source "../node_modules";
    

    Root cause: In Tailwind v4, @source tells the Oxide engine to scan those files for class names to generate. Pointing it at the entire node_modules directory makes it scan every JS/TS/HTML file in every package you've installed — including packages that have nothing to do with your UI. Any string in any of those files that happens to look like a valid Tailwind utility (text-sm, flex, p-4, etc.) gets generated into your CSS. That's almost certainly your jump from 4KB to 80KB+.

    You don't need to scan node_modules at all — shadcn-ui components aren't styled by scanning the library's source; they're

    copied into your own project (usually src/components/ui/), so Tailwind already picks them up when it scans your app's source files.

    Fix

    Remove the broad @source directive entirely:

    @import "tailwindcss";
    
    /* Remove this line: */
    /* @source "../node_modules"; */
    

    If your @import "tailwindcss"; is at the root of your CSS and your app.css lives inside src/, Tailwind v4's automatic content detection should already pick up everything under your project root (excluding .gitignored paths like node_modules, dist, etc. by default). You likely don't need any manual @source directive at all.

    Only add @source back if:

    • You have shadcn/ui or other component files living outside the default scan root (e.g., a monorepo package), in which case scope it precisely:
    @source "../../packages/ui-components/**/*.{ts,tsx}";
    
    • Never point @source at node_modules as a whole — if you truly need one specific package's compiled output scanned (rare), target the exact subpath, e.g. @source "../node_modules/some-specific-package/dist";.

    Verify

    npm run build
    

    Check the new CSS file size — it should drop back down near your original ~4KB (plus whatever shadcn-ui components you're actually using). Do a quick visual pass on the pages using shadcn-ui components to confirm nothing broke, since shadcn relies on CSS variables (--background, --primary, etc.) defined in your @theme block — those aren't affected by this fix, just the utility-class bloat.

    If size is still high after removing that line, the next place I'd check is whether your @theme block has leftover unused CSS variables from the v3→v4 migration — happy to take a look at that file if you want a second pass.

    tailwind-purge-fixer-app.zip

    ZIP · project files

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Shrink production CSS bundles by removing unused utility classes.Resolve CSS size regressions after migrating from Tailwind v3 to v4.Optimize UI library imports for shadcn-ui, daisyUI, and Flowbite.Refactor dynamic class strings to enable proper compiler tree-shaking.

    About this skill

    The Tailwind Purge Fixer is an expert-level diagnostic skill designed for frontend developers struggling with oversized production CSS files. When Tailwind fails to purge properly, production CSS can easily balloon from a standard 2-5KB up to 50KB or more, hurting Core Web Vitals and load times.

    This skill provides a systematic troubleshooting workflow that covers both the Tailwind v3 JIT engine and the new Tailwind v4 Oxide engine. It expertly roots out common performance killers such as overly broad content globs, dangerous regex safelists, dynamic string interpolations that bypass the compiler, and bloated UI component libraries (like shadcn-ui, daisyUI, or Skeleton). By analyzing your build stack and configuration files, the skill delivers exact code replacements and refactoring strategies to strip out unused variables, @property rules, and component classes without breaking your production UI.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 20 days ago

    • Passed all security checks, Safe to install

    Listed20 days ago

    What's inside

    Frequently Asked Questions