Tidy Tailwind classes with AI
Review one component, match the project’s class order and decide which repeated values belong in the design system.
Tidy Tailwind classes with AI when a small change to a button leaves a reviewer trying to decode a long list of utilities. The tailwind-best-practices skill asks an agent to inspect the theme and the component before offering edits. The project may already have a spacing scale or a sorting convention that explains what looks unusual in isolation.
A search that finds no literal use of a colour is a reason to investigate. A component can assemble a class name at runtime or select it from a table of variants. Checking those paths can save a carefully chosen design token from an accidental deletion.
What it does
- Collapse utilities that have a shorter equivalent.
- Check the touched class list against the team’s formatter.
- Name colours by their purpose in the interface.
- Move a repeated control into a component where a shared contract makes sense.
- Review the supported variants of a design-system button.
Install and use
- Provide a permitted Tailwind component, its theme and any existing Prettier configuration. The review can start from local project files.
- Ask, “Tidy this checkout button and tell me which classes or tokens need checking elsewhere before removing them.”
- Compare the default, disabled and other supported states where the button is already used.
FAQ
Source
Made by Evil Martians. Original skill: tailwind-best-practices, published on GitHub under the MIT licence.
View on GitHub