tailwind-4

Enforce Tailwind CSS utility class patterns and semantic theming rules.

Updated Nov 20, 2025
One-click install
npx skills add https://github.com/JFEspanolito/Template_FrontEnd_NextJS_JF --skill tailwind-4-jfespanolito
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-4
Source: https://github.com/JFEspanolito/Template_FrontEnd_NextJS_JF/tree/main/AI/skills/curated/tailwind-4
Command: npx skills add https://github.com/JFEspanolito/Template_FrontEnd_NextJS_JF --skill tailwind-4-jfespanolito

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides clear guidelines and best practices for using Tailwind CSS, ensuring consistent, maintainable, and efficient styling across your project. It helps avoid common pitfalls like using raw values or incorrect utility class application.

Core Features & Use Cases

  • Styling Decision Tree: A flowchart to guide the application of Tailwind classes, dynamic styles, and conditional styling.
  • Critical Rules: Enforces best practices such as avoiding var() in class names and raw hex colors.
  • cn() Utility Usage: Demonstrates correct and incorrect usage of the clsx and twMerge utility for conditional classes and merging.
  • Style Constants: Provides guidance on using CSS variables for dynamic values in libraries that don't support class names.
  • Common Patterns: Examples for Flexbox, Grid, Spacing, Typography, Borders, Shadows, States, Responsive design, and Dark Mode.

Quick Start

Apply the bg-primary class to an element for its background color.

Frequently Asked Questions about tailwind-4

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

FAQPage Schema
How do I apply conditional Tailwind CSS classes correctly?

Use the `cn()` utility for conditional Tailwind CSS classes, which combines `clsx` and `twMerge` to merge classes and resolve conflicts safely. This ensures maintainable conditional styling without raw value pitfalls.

Why does Tailwind CSS discourage using raw values and var() in class names?

Tailwind CSS discourages raw values and `var()` in class names to enforce semantic theming and maintain consistency. Using predefined utility classes instead of arbitrary values ensures your styling remains scalable and manageable.

What is the best way to handle dynamic styling values in Tailwind CSS?

The best way to handle dynamic styling values in Tailwind CSS is by using CSS variables, or style constants, for libraries that don't support class names. This approach maintains performance while allowing dynamic value injection.

Can I use semantic theming for dark mode and responsive design in Tailwind?

Yes, you can use semantic theming for dark mode and responsive design in Tailwind by applying predefined state and responsive utility classes. This Skill provides common patterns for Flexbox, Grid, and dark mode states.

Tailwind CSS styling not working as expected with custom components?

If Tailwind CSS styling is not working, check for raw hex colors or incorrect utility class applications. Follow the styling decision tree flowchart to guide class application and enforce critical rules against raw values.