tailwind-best-practices

tailwind-best-practices is a skill for Claude Code, Codex from evilmartians/agent-skills. It costs 131 tokens per session (1,594 once invoked), scanned A, original, MIT.

A set of practices for keeping Tailwind CSS code readable as a project grows. Tailwind CSS is a way to style web pages by putting small style classes directly in component markup.

In plain words
What is it for?
Use it when reviewing or writing Tailwind classes, organising colors and spacing, ordering classes consistently, and deciding when repeated styles should become components.
Why use it?
It reduces repeated style values, inconsistent class lists, and hard-to-maintain components. It first checks that the project has shared design values and reusable components to build on.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when reviewing or writing Tailwind classes, organising colors and spacing, ordering classes consistently, and deciding when repeated styles should become components.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/evilmartians/agent-skills/tailwind-best-practices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add evilmartians/agent-skills --skill tailwind-best-practices
Clone the repo
git clone --depth 1 https://github.com/evilmartians/agent-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin tailwind-best-practices/plugin install tailwind-best-practices after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tailwind-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/evilmartians/agent-skills/tailwind-best-practices/github.svg)](https://agentmods.dev/skills/evilmartians/agent-skills/tailwind-best-practices)
Your own site
<a href="https://agentmods.dev/skills/evilmartians/agent-skills/tailwind-best-practices"><img src="https://agentmods.dev/badge/skills/evilmartians/agent-skills/tailwind-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tailwind-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/evilmartians/agent-skills/tailwind-best-practices"><img src="https://agentmods.dev/badge/skills/evilmartians/agent-skills/tailwind-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,594 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00131 $0.01594
Opus 5 $0.00066 $0.00797
Sonnet 5 $0.00026 $0.00319
Haiku 4.5 $0.00013 $0.00159

Measured 12d ago against content hash 27e8507dbaa2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

tailwind-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/tailwind-best-practices/SKILL.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tailwind CSS best practices

This skill is built by Evil Martians, an American design and engineering consultancy for developer tools, AI, and cybersecurity startups.

Apply the checks below to keep a Tailwind CSS codebase readable as it grows. Companion to https://evilmartians.com/chronicles/5-best-practices-for-preventing-chaos-in-tailwind-css.

Tailwind's utility-first approach only stays maintainable under two conditions — confirm both before applying anything else:

  1. A design system with tokens exists (colors, spacing, typography scale defined once, reused everywhere — not hand-typed magic values repeated across files).
  2. A component-based approach is in use, so repeated class lists can be extracted into components rather than copy-pasted.

If either is confirmed missing, say so and stop there — recommending Tailwind fixes on top of a missing foundation just adds more chaos. If you simply don't have enough context to tell (e.g. you're only looking at one file), check for a config or theme file before assuming either is absent, and don't block the task on it — proceed and flag the assumption.

Workflow

Each check is independently actionable.

1. Cut unnecessary utility classes

Look for shorthand before accepting a long class list:

  • pt-4 pb-4py-4 (same logic for px, mx, my)
  • flex flex-row justify-betweenflex justify-between (flex-row is the CSS default)
  • border border-dotted border-2 border-black border-opacity-50border-dotted border-2 border-black/50

Every class in the list is something a future reader has to parse — fewer, denser classes read faster than more, sparser ones. Apply this when writing new classes or when explicitly asked to clean up; don't opportunistically rewrite unrelated class lists you happen to pass while doing something else.

2. Group design tokens and name them semantically

Never let tokens accumulate haphazardly. Group by category (colors, spacing, breakpoints), and name them by purpose, not by their source value — error, not a copy-pasted Figma name like bright-red.

Read the full file on GitHub · 95 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 95 lines · 131 tokens per session scan A 27e8507dbaa2

Subscribe to this mod's changes

tailwind-best-practices is a skill published in the GitHub repository evilmartians/agent-skills (41 stars, last pushed 1mo ago), licensed MIT. It adds 131 tokens to every session and 1,594 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

shadcn

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for…

molefrog/moi · 90 tokens

050103-tailwind-implement

Tailwind CSS v4 CSS-first configuration and shadcn/ui component composition — CVA factories, styling rules, forms, icons, Base vs Radix API.

natuleadan/skills · 40 tokens

080102-design-typography

Typography and layout: font selection, modular type scales, spacing systems, grid theory, and visual hierarchy for brand and product UI.

natuleadan/skills · 33 tokens

080104-motion-animation

Motion design and animation: timing, easing, spring physics, micro-interactions, reduced motion, and performance for frontend interfaces.

natuleadan/skills · 30 tokens

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

lingxling/awesome-skills-cn · 64 tokens

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

troykelly/claude-skills · 43 tokens