All skills
asyrafhussin avatar

/tailwind-best-practices

@481a693

Tailwind CSS patterns and conventions. Use when writing responsive designs, implementing dark mode, creating reusable component styles, configuring Tailwind, or migrating from v3 to v4. Triggers on tasks involving Tailwind classes, responsive design, dark mode, CSS styling, or "migrate to Tailwind v4".

Use this Skill: https://skilld.dev/gh/asyrafhussin/agent-skills/tailwind-best-practices

This session only. Nothing lands on disk.

README.md

≈449 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Tailwind CSS Best Practices

Patterns and conventions for effective Tailwind CSS usage.

Overview

This skill provides guidance for:

  • Mobile-first responsive design
  • Dark mode implementation
  • Component styling patterns
  • Tailwind configuration (v3 and v4)
  • V4 migration from v3
  • Animation and transitions

Categories

1. Responsive Design (Critical)

Mobile-first approach, breakpoints, and responsive layouts.

2. Dark Mode (Critical)

Setup, styling, and system preference handling.

3. Component Patterns (High)

Conditional classes, variants, and reusable patterns.

4. Custom Configuration — v3 (High)

Colors, fonts, spacing, and plugins via tailwind.config.js.

5. V4 & Migration (High)

v4 installation, @theme configuration, @utility/@custom-variant, and v3-to-v4 migration.

6. Spacing & Typography (Medium)

Consistent spacing and typography scales.

7. Animation (Medium)

Transitions, keyframes, and reduced motion.

8. Performance (Low)

Content configuration and optimization.

Quick Start

// cn utility for conditional classes
import { clsx, type ClassValue } from 'clsx'
import { twMerge } from 'tailwind-merge'

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}

// Usage
<button
  className={cn(
    'px-4 py-2 rounded-md font-medium',
    variant === 'primary' && 'bg-blue-600 text-white',
    variant === 'secondary' && 'bg-gray-100 text-gray-900',
  )}
>
  Click me
</button>

Usage

This skill triggers automatically when:

  • Writing Tailwind classes
  • Implementing responsive designs
  • Setting up dark mode
  • Configuring Tailwind

References

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill is a comprehensive collection of best practices, rules, and code patterns for Tailwind CSS v3 and v4. It provides guidance on responsive design, dark mode, component architecture, and theme configuration. No security issues were detected in the instructions or provided code snippets.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    32 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 481a693. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 7 months ago
Other metadata
metadata
{
  "author": "agent-skills",
  "version": "1.0.0",
  "tailwindVersion": "3.4+ / 4.0+"
}

README badge

README badge for asyrafhussin/agent-skills/tailwind-best-practices