One-click install
npx skills add https://github.com/cheetah-alo/NegritaOS --skill tailwind-4-cheetah-alo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-4
Source: https://github.com/cheetah-alo/NegritaOS/tree/main/.codex/skills/tailwind-4
Command: npx skills add https://github.com/cheetah-alo/NegritaOS --skill tailwind-4-cheetah-alo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves inconsistent or broken Tailwind styling by enforcing safe class usage, avoiding invalid CSS constructs, and providing reliable guidance for dynamic and conditional styling.

Core Features & Use Cases

  • Tailwind class safety guardrails: Prevents unsupported patterns such as using CSS variables like var() inside className and forbids hex colors in className.
  • Deterministic class composition with cn(): Establishes when to use cn() for conditional classes and when not to wrap static classes.
  • Correct handling of dynamic styling: Guides dynamic values to the style prop and uses CSS custom properties only where libraries require non-class styling (e.g., chart components).

Quick Start

Use the tailwind-4 skill when you need to write or refactor React components that use Tailwind classes (including cn() conditions, responsive states, and dynamic styling) to ensure they follow the rules and avoid var() and hex colors in className.

Frequently Asked Questions about tailwind-4

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

FAQPage Schema
Why should I avoid CSS variables and hex colors in Tailwind className?

Avoiding CSS variables like var() and hex colors in Tailwind className prevents broken styling and unsupported patterns. Using standard Tailwind classes ensures reliable rendering and avoids invalid CSS constructs in React components.

How do I handle dynamic styling values in React components using Tailwind CSS?

Handle dynamic styling values in React components by passing them to the style prop instead of using Tailwind className. Apply CSS custom properties via style props only when libraries require non-class styling, such as dynamic chart components.

What is the correct way to use the cn() utility for conditional Tailwind classes?

The cn() utility establishes deterministic class composition for conditional variants in Tailwind CSS. Use cn() to merge conditional classes safely, but avoid wrapping static classes when refactoring React components to prevent unnecessary overhead.

How do I apply responsive and dark mode states with Tailwind CSS 4 in React?

Apply responsive and dark mode states with Tailwind CSS 4 by authoring React components with standard className prefixes. Following safe class usage rules ensures these states activate correctly without causing styling regressions or invalid CSS constructs.