tailwind-css-rules
Installation
SKILL.md
Tailwind CSS Rules and Best Practices
Core Principles
- Always use Tailwind CSS v4.1+ - Ensure the codebase is using the latest version
- Do not use deprecated or removed utilities - ALWAYS use the replacement
- Never use
@apply- Use CSS variables, the--spacing()function, or framework components instead - Check for redundant classes - Remove any classes that aren't necessary
- Group elements logically to simplify responsive tweaks later
Upgrading to Tailwind CSS v4
Before Upgrading
- Always read the upgrade documentation first - Read https://tailwindcss.com/docs/upgrade-guide and https://tailwindcss.com/blog/tailwindcss-v4 before starting an upgrade.
- Ensure the git repository is in a clean state before starting