tailwind-cleanup

tailwind-cleanup is a skill for Claude Code from berkcangumusisik/claude-code-practices. It costs 18 tokens per session (400 once invoked), scanned A, original, MIT.

A cleanup helper for Tailwind CSS, a utility-based way to style web pages. It finds unused styles and repeated class combinations that could be shared.

In plain words
What is it for?
Use it to clean a selected folder, extract repeated styles into components or CSS, and check Tailwind scanning rules.
Why use it?
It reduces leftover styling and repetition, while also pointing out patterns that can cause dynamic classes to disappear from the built site.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is npx tailwindcss --content "./src/**/*.{ts,tsx}" --input ./src/styles/globals.css --dry-run 2>/dev/null | grep "Removing".

Good fit Use it to clean a selected folder, extract repeated styles into components or CSS, and check Tailwind scanning rules.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/berkcangumusisik/claude-code-practices
agentmods
npx agentmods add skills/berkcangumusisik/claude-code-practices/tailwind-cleanup

Made for: Claude Code.

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-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/berkcangumusisik/claude-code-practices/tailwind-cleanup/github.svg)](https://agentmods.dev/skills/berkcangumusisik/claude-code-practices/tailwind-cleanup)
Your own site
<a href="https://agentmods.dev/skills/berkcangumusisik/claude-code-practices/tailwind-cleanup"><img src="https://agentmods.dev/badge/skills/berkcangumusisik/claude-code-practices/tailwind-cleanup/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-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/berkcangumusisik/claude-code-practices/tailwind-cleanup"><img src="https://agentmods.dev/badge/skills/berkcangumusisik/claude-code-practices/tailwind-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 400 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.
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.00018 $0.00400
Opus 5 $0.00009 $0.00200
Sonnet 5 $0.00004 $0.00080
Haiku 4.5 $0.00002 $0.00040

Measured 6d ago against content hash 4169d5c270a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

tailwind-cleanup 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 6d 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-cleanup/SKILL.md · 46 lines

What it actually says

Tailwind CSS Cleanup

Target: $1 (or src/ if not specified)

1. Find Unused Classes

npx tailwindcss --content "./src/**/*.{ts,tsx}" --input ./src/styles/globals.css --dry-run 2>/dev/null | grep "Removing"

2. Find Repeated Class Combinations

grep -rn 'className="' ${1:-src/} --include="*.tsx" | grep -oP 'className="[^"]+"' | sort | uniq -c | sort -rn | head -20

3. Extract Repeated Patterns

When the same 5+ class combination appears 3+ times, it should become:

  • A component (if it's a complete UI element)
  • A cn() variant (if it's a style pattern)
  • A @apply in CSS (sparingly)

4. Check for Anti-Patterns

  • !important overrides (!text-red-500)
  • Arbitrary values where a design token exists (text-[#FF0000] → use color from theme)
  • Mixing Tailwind with raw CSS in the same element

5. Verify PurgeCSS config covers all dynamic class patterns:

// ❌ Dynamic classes get purged
const color = isError ? 'red' : 'green'
<div className={`text-${color}-500`} />

// ✅ Full class names are safe
const className = isError ? 'text-red-500' : 'text-green-500'

Report: N unused classes removed, N patterns extracted.

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. 6d ago First seen · 46 lines · 18 tokens per session scan A 4169d5c270a2

Subscribe to this mod's changes

tailwind-cleanup is a skill published in the GitHub repository berkcangumusisik/claude-code-practices (10 stars, last pushed 4mo ago), licensed MIT. It adds 18 tokens to every session and 400 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

accessibility-a11y

WCAG 2.2 compliance, ARIA patterns, keyboard navigation, screen readers, automated testing.

travisjneuman/.claude · 26 tokens

flutter-development

Cross-platform development with Flutter and Dart for iOS, Android, Web, Desktop, and embedded. Use when building Flutter apps, implementing Material/Cupertino design, or optimizing Dart code.

travisjneuman/.claude · 41 tokens

frontend-enhancer

This skill should be used when enhancing the visual design and aesthetics of web applications. It provides modern UI components, design patterns, color palettes, animations, and layout templates. REQUIRES ui-research skill first. Use this skill for tasks like improving styling, creating responsive designs…

travisjneuman/.claude · 79 tokens

generic-design-system

Complete design system reference for any project - colors, typography, spacing, components, animations. Adapts to project theme and tech stack. Use when implementing UI, choosing colors, creating animations, or ensuring brand consistency. For new design systems, use ui-research skill first.

travisjneuman/.claude · 60 tokens

generic-react-design-system

Complete design system reference for React applications. Covers colors, typography, spacing, component patterns, glassmorphism effects, GPU-accelerated animations, and WCAG AA accessibility. Use when implementing UI, choosing colors, applying spacing, creating components, or ensuring brand consistency.

travisjneuman/.claude · 59 tokens

generic-static-design-system

Complete design system reference for static HTML/CSS/JS sites. Covers colors, typography, component patterns, animations, and accessibility. Use when implementing UI, choosing colors, or ensuring brand consistency.

travisjneuman/.claude · 44 tokens