Skip to content
Back to skills

Tailwind Css

ASecurity

Write maintainable Tailwind CSS: design tokens, static class names, variants, responsiveness and accessibility

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
developmentreact

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill tailwind-css --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tailwind Css?

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

Security grade badge for Tailwind Css
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adityaaatiwari-tailwind-css-anvil/badge)](https://www.skillsdirectory.com/skills/adityaaatiwari-tailwind-css-anvil)

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-css
description: "Write maintainable Tailwind CSS: design tokens, static class names, variants, responsiveness and accessibility"
---

<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->

# Tailwind CSS patterns

Use when styling components, configuring theme tokens, or reviewing Tailwind class usage.

## Class composition rules
- Always use complete static class names (`isError ? "text-red-600" : "text-slate-700"`). Never assemble classes dynamically (`text-${color}-600`), because Tailwind's content scanner drops unresolvable strings in production builds.
- Configure design tokens once in `@theme` (v4) or `tailwind.config` (`theme.extend`) instead of repeating arbitrary hex values like `bg-[#1f2937]` across files.
- Prefer `class-variance-authority` (or typed variant maps) + `tailwind-merge` when reusable primitives accept caller `className` overrides.

## Layout and maintenance
- Extract repeated multi-element patterns into framework components (React/Svelte/Astro components) rather than hiding large class lists behind `@apply`.
- Use Tailwind's logical spacing/gap utilities (`flex gap-4`, `grid`) and responsive prefixes (`sm:`, `md:`, `lg:`) mobile-first without overriding base specificity.

## Accessibility and states
- Include clear `focus-visible:outline` styles, `disabled:` affordances, and sufficient color contrast across both light and dark tokens (`dark:`).
- Use `motion-reduce:` utilities for animations and `sr-only` for accessible icon-only control labels.

## Verify
Inspect production CSS build output for unexpected purges, check keyboard focus rings across interactive elements, and test narrow mobile plus desktop viewports.

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 development →

Comments

Loading comments…

Newsletter

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