Skip to content
Back to skills

Tailwind Cleanup

ASecurity

Scan and fix Tailwind anti-patterns — hardcoded colors, arbitrary values, inconsistent spacing, and dark/light mode issues.

  • 2 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added October 26, 2026
developmentgoexpress

Security analysis

A100/100

Scanned October 26, 2026

npx -y skills add JoshuaShepherd/my-skills --skill tailwind-cleanup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tailwind Cleanup?

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

Security grade badge for Tailwind Cleanup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/joshuashepherd-tailwind-cleanup-49adf995/badge)](https://www.skillsdirectory.com/skills/joshuashepherd-tailwind-cleanup-49adf995)

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-cleanup
description: Scan and fix Tailwind anti-patterns — hardcoded colors, arbitrary values, inconsistent spacing, and dark/light mode issues.
user-invocable: true
allowed-tools: Read, Grep, Glob, Edit
---

Scan and fix Tailwind anti-patterns across the codebase.

Target: $ARGUMENTS

If no target is provided, scan `src/components/` and `src/`.

## Before Starting

1. Read the main CSS file (e.g., `src/index.css` or `src/app.css`) to understand existing CSS custom properties and tokens.
2. Read `vite.config.ts` and any Tailwind config to understand the current setup.

## Scan Checklist

Work through each category. For every violation, record the file, line number, the offending code, and a concrete fix.

### 1. HARDCODED COLORS (Critical)

Search for Tailwind palette colors used directly instead of semantic tokens:

```
bg-red-*, bg-blue-*, bg-green-*, text-red-*, text-blue-*, text-green-*, border-red-*, etc.
```

**Fix**: Replace with CSS custom property tokens or semantic class names. If no token exists, add one.

### 2. ARBITRARY VALUES (Warning)

Search for bracket notation that should be tokens:

```
w-[347px], h-[52px], text-[#hex], bg-[#hex], p-[13px], m-[7px]
```

**Fix**: Replace with nearest Tailwind spacing/sizing utility or create a token if reused.

Acceptable uses: one-off layout values, calc expressions, CSS variable references like `bg-[var(--color)]`.

### 3. INCONSISTENT SPACING

Search for spacing values that don't follow a consistent scale:

```
p-[13px], gap-[7px], m-[11px]
```

**Fix**: Round to nearest Tailwind spacing value (4px increments).

### 4. DARK/LIGHT MODE ISSUES

Search for color utilities missing dark mode counterparts:

```
bg-white (missing dark:bg-*)
text-black (missing dark:text-*)
border-gray-200 (missing dark:border-*)
```

**Fix**: Add `dark:` variants for all color utilities, or use CSS custom properties that handle both modes.

### 5. INLINE STYLES

Search for `style=` and `style={{` in JSX that could be Tailwind utilities:

```
style={{ color: '#xxx' }}
style={{ fontSize: '14px' }}
style={{ marginTop: '20px' }}
```

**Fix**: Replace with equivalent Tailwind class.

## Output Format

```
## Tailwind Cleanup Report

### Critical (must fix)
| File | Line | Issue | Fix |
|------|------|-------|-----|

### Warning (should fix)
| File | Line | Issue | Fix |
|------|------|-------|-----|

### Info (consider fixing)
| File | Line | Issue | Fix |
|------|------|-------|-----|
```

After reporting, apply all Critical and Warning fixes automatically.

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.

Comments

Loading comments…

Newsletter

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