Skip to content

Tailwind Best Practices

Stop your AI agent from generating Tailwind CSS v3 code. 20+ rules for v4 syntax, CSS-first config.

Install: npx skills add ofershap/tailwind-best-practices

Works with Claude Code, Cursor · 13 GitHub stars

Install

$npx skills add ofershap/tailwind-best-practices

Install command taken from the project's README or registry entry. Always review code before running it.

Tailwind CSS Best Practices

Stop your AI agent from generating Tailwind CSS v3 code. 12 rules for Tailwind v4 syntax, CSS-first config with @theme, modern utility patterns, and the anti-patterns every agent produces.

AI coding assistants (Cursor, Claude Code, Copilot, Codex) are trained on Tailwind v3 data. They generate tailwind.config.js, @tailwind directives, bg-opacity-50, and other patterns that don't exist in Tailwind CSS v4. This plugin fixes that.

Install

Cursor / Claude Code / Windsurf

npx skills add ofershap/tailwind-best-practices

Or copy skills/ into your .cursor/skills/ or .claude/skills/ directory.

What's Included

Type Name Description
Skill tailwind-best-practices 12 rules covering @import, @theme, opacity, gradients, container queries, @utility, and more
Rule best-practices Always-on behavioral rule that enforces v4 patterns on every file
Command /audit Scan your codebase for Tailwind v3 anti-patterns

What Agents Get Wrong

AI agents consistently produce these outdated Tailwind patterns:

What the agent writes What v4 actually uses
tailwind.config.js with JS objects CSS-first @theme { } in your stylesheet
@tailwind base; @tailwind components; @import "tailwindcss";
bg-opacity-50, text-opacity-25 bg-red-500/50, text-white/80
bg-gradient-to-r bg-linear-to-r, bg-linear-45
!flex, !bg-red-500 flex!, bg-red-500!
bg-[--brand-color] bg-(--brand-color)
grid-cols-[max-content,auto] grid-cols-[max-content_auto]

Related Plugins


If this helped your workflow, a star helps others find it.

Author

License

MIT

Similar plugs

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

PluginDev tools+6,803 this week

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro…

Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…

Explore related