Command Palette

Search for a command to run...

Назад к скиллам
скилл № 91962

frontend-tailwind-css

Use when the user asks to configure Tailwind v4 theme tokens, @theme, migrating tailwind.config from v3, utility classes, responsive and dark variants…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить frontend-tailwind-css в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Frontend Tailwind CSS

Purpose

Generate production-ready Tailwind CSS code following utility-first principles with consistent design tokens and responsive patterns. Covers v3 (config-based) and v4 (@theme-based) workflows, plugin integration, JIT optimization, and component extraction patterns. Output is deterministic, tree-shakeable, and under 15KB gzipped for typical apps.

Agent Protocol

Trigger

Exact phrases: "use tailwind", "tailwind css", "utility classes", "add tailwind", "tailwind config", "custom theme", "design tokens", "responsive tailwind", "tailwind v4", "tailwind plugin", "tailwind dark mode", "tailwind components"

Input Context

  • Check for existing tailwind.config.* or postcss.config.* files
  • Detect version: v3 uses @tailwind directives, v4 uses @import "tailwindcss"
  • Verify whether a custom design system (colors, fonts, spacing) already exists
  • Confirm framework (React, Vue, Astro, Next.js, etc.) for framework-specific setup
  • Check for existing dark mode strategy (class vs media)
  • Identify plugins already registered (@tailwindcss/forms, @tailwindcss/typography, etc.)

Output Artifact

No file output unless requested.

Response Format

  1. Respond with raw Tailwind classes or config snippets first, explain only if asked
  2. Use arbitrary values ([#123], [10px]) sparingly -- prefer design tokens
  3. When generating config, output the complete relevant section, not ellipses
  4. For responsive design, always list breakpoints in order: sm to md to lg to xl to 2xl
  5. Prefix v4 tokens with --color-, --font-, --spacing- namespacing
  6. No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output.

Completion Criteria

  • Tailwind classes follow utility-first (one class = one CSS property) where practical
  • Design tokens extracted into tailwind.config.* or CSS @theme directive
  • Responsive variants applied mobile-first (base = mobile, md: = tablet, lg: = desktop)
  • No unused custom CSS -- Tailwind utility covers the use case
  • Dark mode uses dark: variant unless config says otherwise
  • Output has been verified against an existing Tailwind project to confirm no breaking config changes
  • JIT mode properly detects all class sources in content paths
  • Third-party plugins (forms, typography) registered in config if form/article patterns exist

Max Response Length

100 lines unless generating a full config.

Component Architecture / Decision Trees

Build Tool Integration Decision Tree

Which framework?
  |-- Vite -->
  |     |-- v4: @tailwindcss/vite plugin
  |     |-- v3: postcss.config.js + tailwindcss + autoprefixer
  |-- Next.js -->
  |     |-- v4: @tailwindcss/postcss
  |     |-- v3: postcss.config.js with tailwindcss
  |-- Angular -->
  |     |-- v4: @tailwindcss/vite (if using Vite) or postcss.config.js
  |     |-- v3: postcss.config.json + angular.json styles
  |-- Remix / Astro / others -->
        |-- postcss.config.js in both v3 and v4

Design Token Architecture Options

Option A: Tailwind Config Extend (v3) Best for: Existing v3 projects, projects with static theme values.

theme.extend.colors.brand.500 = #3b82f6
theme.extend.fontFamily.body = ['Inter', 'sans-serif']

Pros: Familiar, well-documented, works with IntelliSense. Cons: JS config can become large, no dynamic theming at runtime.

Option B: CSS @theme Directive (v4) Best for: New projects, projects needing runtime CSS custom properties.

@theme { --color-brand-500: #3b82f6; --font-body: 'Inter', sans-serif; }

Pros: CSS-native, generates --color-brand-500 as CSS custom property automatically, works with any build tool. Cons: v4 only, less tooling support.

Option C: Hybrid CSS Custom Properties + Tailwind Config Best for: Design systems with runtime theming (light/dark mode). Define primitives as CSS custom properties, reference them in Tailwind config:

:root { --color-brand: #3b82f6; }
theme.extend.colors.brand: 'var(--color-brand)'

Pros: Runtime theme switching without rebuild. Cons: Harder to debug, potential for missing fallback values.

Component Abstraction Patterns

Pattern 1: @apply + @layer components (v3)

@layer components {
  .btn-primary {
    @apply inline-flex items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2;
  }
}

Pattern 2: Component Function (React)

function Button({ variant = 'primary', size = 'md', children }) {
  const classes = cn(
    'inline-flex items-center justify-center rounded-md font-medium transition-colors',
    variant === 'primary' && 'bg-blue-600 text-white hover:bg-blue-700',
    variant === 'secondary' && 'bg-gray-100 text-gray-900 hover:bg-gray-200',
    size === 'sm' && 'h-8 px-3 text-sm',
    size === 'md' && 'h-10 px-4 text-base
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/component-patterns.md
  • references/configuration.md
  • references/design-tokens.md
  • references/error-handling.md
  • references/performance.md
  • references/responsive-patterns.md
  • references/tailwind-performance-optimization.md
  • references/utility-first.md

FAQ

Что делает скилл frontend-tailwind-css?

Use when the user asks to configure Tailwind v4 theme tokens, @theme, migrating tailwind.config from v3, utility classes, responsive and dark variants, @apply, plugins or class sorting. Produces Tailwind setup and token configuration. Not for choosing a styling approach (use frontend-css-strategy) or token tiers in a component library (use frontend-design-system).

Как установить скилл frontend-tailwind-css?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл frontend-tailwind-css запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить frontend-tailwind-css с