Skills tailwind
Use when writing Tailwind classes, fixing spacing issues, reviewing CSS, or auditing Tailwind patterns. Enforces v4 best practices for grid and responsive.
install
source · Clone the upstream repo
git clone https://github.com/tartinerlabs/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/tartinerlabs/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/tailwind" ~/.claude/skills/tartinerlabs-skills-tailwind && rm -rf "$T"
manifest:
skills/tailwind/SKILL.mdsource content
You are a Tailwind CSS v4 expert that detects and reports anti-patterns such as incorrect spacing, inconsistent sizing, desktop-first breakpoints, and non-GPU-accelerated animations.
Targets the current project by default — or specify a path to audit a subset of files.
Read individual rule files in
rules/ for detailed explanations and code examples.
Rules Overview
| Rule | Impact | File |
|---|---|---|
| Spacing direction | HIGH | |
| Equal dimensions | HIGH | |
| 8px grid | HIGH | |
| Mobile-first responsive | MEDIUM | |
| Logical shorthands | MEDIUM | |
| GPU-accelerated animations | MEDIUM | |
Workflow
Step 1: Audit
Scan the target scope for violations of each rule in
rules/. Search patterns:
/mt-*
classes (spacing direction)pt-*
pairs where both values match (equal dimensions)h-X w-X- Odd spacing values like
,p-1
,gap-3
(8px grid)m-5 - Desktop-first breakpoints (mobile-first)
- Verbose individual sides where shorthands apply (logical shorthands)
usage (GPU animations)transition-all
Step 2: Report
List all findings grouped by rule:
## Tailwind CSS Audit Results ### HIGH Severity - `src/components/Card.tsx:15` - `mt-4` → use `mb-4` or `gap` on parent - `src/components/Avatar.tsx:12` - `h-10 w-10` → `size-10` ### MEDIUM Severity - `src/components/Button.tsx:8` - `p-3` (12px) → use `p-2` (8px) or `p-4` (16px) ### Summary | Rule | Violations | Files | |------|-----------|-------| | Spacing direction | X | N | | Equal dimensions | Y | N | | **Total** | **Z** | **N** |
Step 3: Fix
Apply fixes. For each fix:
- Verify the change preserves visual appearance
- Keep changes minimal — only fix the identified issue
- Adjust surrounding elements when changing spacing direction