tailwind-performance

Optimize Tailwind CSS production builds by configuring content paths and JIT mode.

187|20|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/TheBushidoCollective/han --skill tailwind-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-performance
Source: https://github.com/TheBushidoCollective/han/tree/main/jutsu/jutsu-tailwind/skills/tailwind-performance
Command: npx skills add https://github.com/TheBushidoCollective/han --skill tailwind-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill focuses on production Tailwind optimization, including PurgeCSS, JIT, and build strategies to reduce bundle size.

Core Features & Use Cases

  • JIT & Purge: Minimize CSS output.
  • Content Paths: Precise scanning for classes.
  • Build Optimization: CSS minification and variable strategies.

Quick Start

Configure Tailwind for production with content paths and a safe purge list.

Frequently Asked Questions about tailwind-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce Tailwind CSS bundle size in production?

Reduce bundle size by configuring content paths to scan only your project files, enabling JIT mode, and using PurgeCSS to remove unused styles. Tailwind then generates only the CSS classes your code actually uses, dramatically shrinking output.

How do I configure Tailwind content paths correctly?

Set content paths in tailwind.config.js to match your template locations (e.g., './src/**/*.{html,js,jsx,ts,tsx}'). Precise paths ensure Tailwind scans all files containing class names and purges only truly unused CSS.

Can I use dynamic class names with Tailwind's purging system?

Avoid string construction for class names; instead, use Tailwind's safelist to explicitly include dynamic classes. This prevents purging from removing classes generated at runtime that static scanning cannot detect.

What's the best way to optimize Tailwind for Vite, Next.js, or Webpack?

Tailor build optimization for each framework: enable CSS minification in Tailwind config, use framework-specific tree-shaking, leverage CSS variables, and implement critical CSS extraction and lazy-loading to improve load times across bundlers.

Why does my Tailwind CSS file remain large after purging?

Large CSS usually indicates incorrect content paths (missing or overly broad patterns), dynamic classes not in safelist, or minification disabled. Verify scanning paths match all template files and that all dynamic selectors are explicitly whitelisted.

Do I need to handle Tailwind optimization differently across frameworks?

Yes; Vite, Next.js, and Webpack each handle JIT, code-splitting, and asset optimization differently. Framework-specific configuration ensures content paths are scanned correctly and build strategies align with each tool's bundling approach.