Class Extraction Guard

Source-level gate that catches utility-class soup — the same long run of utility classes (e.g. `flex items-center gap-1.5 text-fg-muted hover:text-accent`) copy-pasted inline across many files instead of extracted into a named class or component. Use whenever frontend work touches className/class markup: before committing or declaring a UI task done, when auditing for utility soup, when a Tailwind combo is repeated everywhere, or as an orchestrator/agent wave-gate. Trigger on: "utility soup", "repeated tailwind classes", "extract into named classes", "className duplication", "class string copy-pasted", "DRY up the styles", "class-extraction". Framework-agnostic (React/JSX, Vue, Svelte, Astro, HTML; clsx/cn/cva). Sibling to design-token-guard: it checks WHICH values styling uses (tokens vs hex), this checks HOW it's organized (extracted vs repeated) — invisible to render review since repeated utilities render identically.

ivy00johns Updated

File contents

ivy00johns/Skill-Madness/tree/main/skills/workflows/class-extraction-guard commit 0b748979fb

Frequently asked questions

npx skillmds@latest add ivy00johns/class-extraction-guard