tailwind-spacing-auditlisted
Install: claude install-skill tony/ai-workflow-plugins
# Tailwind Spacing Audit & Refactor
Systematically detect and fix inconsistent spacing in Tailwind CSS v4+ layouts. The root
cause of most spacing bugs is **fragmented spacing authority** — multiple competing
mechanisms (gap, margin, padding, fixed widths) controlling the space between the same set
of visual peers.
Use `$ARGUMENTS` as the target scope. If `$ARGUMENTS` is empty, ask the user which
component or file to audit.
## Philosophy
Good spacing has one property: **a single source of truth per spacing relationship.** Every
pair of adjacent items should have exactly one class/mechanism determining the space between
them. When `gap-2` appears on a parent AND `me-1` on a child AND `ms-2` on a sibling, three
competing authorities produce visual noise.
The goal is never "make all numbers the same" — it's to ensure each spacing decision is
intentional, non-redundant, and traceable to one mechanism.
## Workflow
### Step 0: Detect Framework
Before auditing, detect the project's templating framework to determine which attribute
name and file globs to use throughout the audit.
Scan the project for template files:
- `*.tsx` / `*.jsx` — React (`className=`)
- `*.vue` — Vue (`class=`, `:class=`)
- `*.svelte` — Svelte (`class=`)
- `*.astro` — Astro (`class=`)
- `*.html` — plain HTML (`class=`)
- `*.erb` — Rails ERB (`class=`)
- `*.blade.php` — Laravel Blade (`class=`)
Use the detected attribute name(s) and file globs for all subsequent search commands. If
multiple framework