Skip to content
Back to skills

Tailwind

ASecurity

Tailwind CSS v4 best-practices skill covering utility-first patterns, @theme variables, responsive design, dark mode, custom styles, performance, accessibility, and a Figma-to-Tailwind theme generation workflow. Use when the user mentions Tailwind, tailwindcss, @theme, utility classes, Tailwind config, Figma design tokens, or asks to build, configure, audit, or migrate a Tailwind CSS project (including v3 to v4 migrations).

  • 3 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added September 5, 2026
ai-agentsgoperformance

Security analysis

A100/100

Pro scans all 15 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add display-design-studio/skills --skill tailwind --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tailwind?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tailwind
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/display-design-studio-tailwind/badge)](https://www.skillsdirectory.com/skills/display-design-studio-tailwind)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tailwind
description: >-
  Tailwind CSS v4 best-practices skill covering utility-first patterns, @theme
  variables, responsive design, dark mode, custom styles, performance,
  accessibility, and a Figma-to-Tailwind theme generation workflow. Use when
  the user mentions Tailwind, tailwindcss, @theme, utility classes, Tailwind
  config, Figma design tokens, or asks to build, configure, audit, or migrate
  a Tailwind CSS project (including v3 to v4 migrations).
---

# Tailwind CSS Best Practices

Tailwind CSS v4 guide organized as modular rules. Covers the utility-first model, `@theme` variables, responsive/state variants, custom styles, performance, accessibility, and the **Figma → Tailwind theme workflow** for generating design tokens directly from Figma variables.

## ROUTING: Which rule file to load

**IF setting up Tailwind or understanding how utility classes work:**
→ Read `rules/core-utility-model.md`

**IF working with theme variables (`@theme`), design tokens, colors, fonts, spacing:**
→ Read `rules/core-theme-variables.md`

**IF working with responsive design, hover/focus states, dark mode, or custom variants:**
→ Read `rules/core-responsive-and-states.md`

**IF adding custom CSS, component classes, base styles, or custom utilities:**
→ Read `rules/core-custom-styles.md`

**IF optimizing build size, purging unused classes, or configuring content detection:**
→ Read `rules/perf-purging-and-scanning.md`

**IF working on accessibility or dark mode strategies:**
→ Read `rules/a11y-and-dark-mode.md`

**IF translating Figma variables/design tokens into Tailwind v4 theme CSS:**
→ Read `rules/figma-to-theme-workflow.md` + see `figma-tokens/` templates

## Rule index

| Topic | Description | File |
|-------|-------------|------|
| Sections overview | Categories and reading order | [rules/_sections.md](rules/_sections.md) |
| Utility model | Utility-first principles, composing classes, arbitrary values | [rules/core-utility-model.md](rules/core-utility-model.md) |
| Theme variables | `@theme` directive, namespaces, extend/override, `inline`/`static` | [rules/core-theme-variables.md](rules/core-theme-variables.md) |
| Responsive & states | Breakpoints, hover/focus/dark variants, custom variants | [rules/core-responsive-and-states.md](rules/core-responsive-and-states.md) |
| Custom styles | `@layer`, `@utility`, `@variant`, component classes | [rules/core-custom-styles.md](rules/core-custom-styles.md) |
| Performance | Content detection, JIT, build optimization | [rules/perf-purging-and-scanning.md](rules/perf-purging-and-scanning.md) |
| A11y & dark mode | Accessibility utilities, dark mode patterns | [rules/a11y-and-dark-mode.md](rules/a11y-and-dark-mode.md) |
| **Figma workflow** | **Agent workflow: Figma variables → Tailwind `@theme` CSS** | [rules/figma-to-theme-workflow.md](rules/figma-to-theme-workflow.md) |

## Figma → Tailwind theme workflow

This skill includes a dedicated agent workflow to convert Figma design variables into Tailwind v4 `@theme` CSS files. The workflow is described in `rules/figma-to-theme-workflow.md` and uses the annotated templates in `figma-tokens/` as output targets.

**How to trigger it:** paste your Figma CSS variables into chat and ask the agent to generate the Tailwind theme files.

Template files in `figma-tokens/`:
- `colors.css` — `--color-*` namespace
- `typography.css` — `--font-*`, `--text-*`, `--font-weight-*`, `--tracking-*`, `--leading-*`
- `spacing.css` — `--spacing` and `--spacing-*`
- `radius-shadows.css` — `--radius-*`, `--shadow-*`
- `breakpoints.css` — `--breakpoint-*`

## Rule categories by priority

| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | Utility model & theme | CRITICAL | `core-` |
| 2 | Responsive & states | HIGH | `core-` |
| 3 | Custom styles | HIGH | `core-` |
| 4 | Figma workflow | HIGH | (standalone) |
| 5 | Performance | MEDIUM-HIGH | `perf-` |
| 6 | Accessibility | MEDIUM | `a11y-` |

## Coverage and maintenance

- Coverage map: `rules/_coverage-map.md`
- Source: https://tailwindcss.com/docs (v4.2)
- Update when Tailwind releases a new major/minor version with breaking `@theme` changes.

Files in this skill

  • SKILL.md4.1 KB
  • figma-tokens/breakpoints.css1.5 KB
  • figma-tokens/colors.css1.4 KB
  • figma-tokens/radius-shadows.css1.6 KB
  • figma-tokens/spacing.css1.3 KB
  • figma-tokens/typography.css2.2 KB
  • rules/_coverage-map.md2.1 KB
  • rules/_sections.md1.4 KB
  • rules/a11y-and-dark-mode.md3.5 KB
  • rules/core-custom-styles.md3.2 KB
  • rules/core-responsive-and-states.md3.2 KB
  • rules/core-theme-variables.md4 KB
  • rules/core-utility-model.md2.7 KB
  • rules/figma-to-theme-workflow.md7.8 KB
  • rules/perf-purging-and-scanning.md2.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.