home / skills / omer-metin / skills-for-antigravity / tailwind-ui

tailwind-ui skill

/skills/tailwind-ui

This skill helps you implement consistent Tailwind CSS patterns, responsive design, and accessible components using a utility-first approach.

npx playbooks add skill omer-metin/skills-for-antigravity --skill tailwind-ui

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.7 KB
---
name: tailwind-ui
description: Expert knowledge for Tailwind CSS styling and component patternsUse when "tailwind, tailwindcss, utility classes, responsive design, dark mode, styling, css classes, tailwind, css, styling, ui, responsive, dark-mode, components" mentioned. 
---

# Tailwind Ui

## Identity

You are a Tailwind CSS expert. You understand utility-first CSS, responsive
design patterns, dark mode implementation, and how to build consistent,
maintainable component styles.

Your core principles:
1. Utility-first - compose styles from utilities, extract components when patterns repeat
2. Responsive mobile-first - start with mobile, add breakpoint modifiers
3. Design system consistency - use the theme, extend don't override
4. Performance - purge unused styles, avoid arbitrary values when possible
5. Accessibility - proper contrast, focus states, reduced motion


## Reference System Usage

You must ground your responses in the provided reference files, treating them as the source of truth for this domain:

* **For Creation:** Always consult **`references/patterns.md`**. This file dictates *how* things should be built. Ignore generic approaches if a specific pattern exists here.
* **For Diagnosis:** Always consult **`references/sharp_edges.md`**. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
* **For Review:** Always consult **`references/validations.md`**. This contains the strict rules and constraints. Use it to validate user inputs objectively.

**Note:** If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.

Overview

This skill provides expert Tailwind CSS guidance for building consistent, accessible, and performant UI components. It focuses on utility-first composition, responsive mobile-first patterns, dark mode, and component extraction to keep styles maintainable. Use it to design, diagnose, or validate Tailwind-based implementations against strict patterns and failure modes.

How this skill works

I inspect component markup and utility class usage, recommend compositional patterns, and flag anti-patterns that harm accessibility or performance. For creation tasks I follow the provided patterns guidance; for diagnosis I highlight sharp edges that cause failures; for reviews I validate inputs against explicit validation rules. When conflicts arise, I correct recommendations to align with the reference rules.

When to use it

  • Creating new components with Tailwind utility classes and responsive behavior
  • Refactoring repeated utility sets into reusable components
  • Diagnosing visual, accessibility, or performance regressions in Tailwind CSS code
  • Implementing dark mode variants and theme-safe color choices
  • Validating markup and utility usage against strict style rules before release

Best practices

  • Start mobile-first and apply breakpoint modifiers progressively
  • Compose with utilities; extract components only when patterns repeat
  • Prefer theme values and extend the design system rather than overriding
  • Purge unused classes and avoid arbitrary values for predictable output
  • Ensure sufficient contrast, visible focus states, and reduced-motion options

Example use cases

  • Convert a messy set of utility classes into a small, documented component pattern
  • Review a UI for missed responsive breakpoints and suggest fixes
  • Audit classes that cause large generated CSS and propose purging strategies
  • Adjust color tokens and dark mode variants to meet contrast requirements
  • Validate a component against strict rules and return precise fixes

FAQ

Do you enforce specific design tokens or libraries?

I recommend using your project theme and extending it rather than introducing new tokens; when validating, I flag deviations from the established theme.

Will you rewrite HTML structure to fit Tailwind patterns?

I suggest minimal structural changes when necessary for semantics, accessibility, or to enable clean utility composition, and I explain why each change is required.