sort-tailwind-classes-automatically
Installation
SKILL.md
Summary
Enable and rely on automated class sorting (e.g., using prettier-plugin-tailwindcss). Do not manually order classes.
Rationale
- Cognitive Load: Eliminates decisions about where to put a class.
- Readability: Standard order helps eyes scan for specific properties (e.g. layout -> spacing -> typography -> color).
- Git Diffs: Reduces useless diff noise caused by reordering classes.
Guidance
- Install Prettier Plugin: Ensure
prettier-plugin-tailwindcssis configured in the project. - Run formatting: Let the formatter handle it.
- Ignore preferences: Do not argue about "logical" grouping vs "official" grouping. Just accept the tool's output.