---
name: "tailwind-v4-theme-tokens"
description: "Configure modern Tailwind CSS v4 using @theme directives and native CSS variables."
metadata:
  author: "Tailwind Labs"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "configure tailwind v4 @theme"
  - "migrate tailwind v3 to v4"
  - "custom css variables tailwind v4"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Tailwind CSS v4 CSS-First Architecture & Design Tokens

Configures Tailwind CSS v4: using modern CSS-first configuration (@theme in globals.css), eliminating legacy tailwind.config.js, defining custom color scales, container queries, and native font face variables.

## When to Invoke
Invoke this skill whenever you need to:
- configure tailwind v4 @theme
- migrate tailwind v3 to v4
- custom css variables tailwind v4

## Execution SOP & Rules
1. Install @tailwindcss/postcss and tailwindcss v4 packages.
2. In globals.css, import '@tailwindcss'; and declare custom tokens inside @theme { --color-brand: #...; }.
3. Reference tokens directly in utility classes: bg-brand, text-brand-dark, font-display.
4. Verify PostCSS plugin builds cleanly and inspect final generated stylesheet size.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
