tailwind

tailwind is a cursor rule for Cursor from louisbrulenaudet/monorepo-template. It costs 0 tokens per session (2,195 once invoked), scanned A, original, Apache-2.0.

Project rules for using Tailwind CSS version 4, a CSS framework for styling web interfaces.

In plain words
What is it for?
Use it when adding or changing React interface styles, Tailwind classes, dark-mode colors, or Vite and CSS setup.
Why use it?
It prevents incorrect configuration and inconsistent styling by documenting how this project detects classes, defines design tokens, and builds CSS.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding or changing React interface styles, Tailwind classes, dark-mode…

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/louisbrulenaudet/monorepo-template/tailwind
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/louisbrulenaudet/monorepo-template

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tailwind

README.md
[![agentmods](https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/tailwind.svg)](https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/tailwind)
Your own site
<a href="https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/tailwind"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/tailwind.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,195 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02195
Opus 5 $0.00000 $0.01097
Sonnet 5 $0.00000 $0.00439
Haiku 4.5 $0.00000 $0.00219

Measured 7d ago against content hash 2e8d6fd06d85, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

tailwind scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/frontend/tailwind.mdc · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tailwind CSS v4 Rules

Styling for the React SPAs. Tailwind v4, CSS-first (no tailwind.config.js). Component/hook authoring is in react.mdc; Vite plugin wiring in vite-config.mdc; cross-cutting layout in frontend-architecture.mdc. Motion/interaction depth → ui-ux-design-best-practices skill.

Engine & entry

  • Single entry: @import "tailwindcss"; in src/index.css (canonical: apps/front-app/src/index.css). There is no tailwind.config.js / postcss.config.js - v4 configures in CSS.
  • The build runs through @tailwindcss/vite (Lightning CSS is built in - no separate Autoprefixer/PostCSS step). Plugin order lives in vite-config.mdc: tailwindcss() after react()/babel, before cloudflare().
  • Docs: https://tailwindcss.com/docs/installation/using-vite

Source detection (@source)

  • v4 detects templates automatically, scanning from the build's working directory (per-app here, so apps/front-app/**) and skipping .gitignore, node_modules, binaries, CSS, and lockfiles. The current @source "../index.html" + @source "./**/*.{ts,tsx}" are a defensive restatement of that default - keep them so detection stays cwd-independent.
  • Register a workspace package only when it ships Tailwind classes this app renders. Point at the real source (@source "../../../packages/<pkg>/src";), not the node_modules symlink. @repo/dtos-common / @repo/enums-common are class-free - do not add sources for them.
  • @source not "<path>"; excludes a large non-Tailwind directory from scanning. @source inline("...") safelists classes that never appear as literals - a last resort; prefer static strings (below).
  • Docs: https://tailwindcss.com/docs/detecting-classes-in-source-files

Design tokens: @theme vs :root

  • Put a value in @theme only when it must generate a utility/variant - i.e. it uses a Tailwind namespace (--color-*, --spacing-*, --font-*, --radius-*, --shadow-*, --ease-*, --animate-*, --breakpoint-*). @theme is top-level only (no nesting under selectors/media).
  • Every other custom property stays in plain :root (e.g. --health-glow-color, --health-shake-distance - not a namespace, correctly outside @theme).
  • Keyframes for an --animate-* token: nest the @keyframes inside @theme so they travel with the token (idiomatic v4). Top-level keyframes also emit correctly but drift from their token.
  • Use @theme inline when a token's value is itself a var(...) (semantic theming, below) so the utility resolves per-scope instead of baking in one value.
  • Docs: https://tailwindcss.com/docs/theme , https://tailwindcss.com/docs/colors

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 75 lines · 0 tokens per session scan A 2e8d6fd06d85

Subscribe to this mod's changes

tailwind is a cursor rule published in the GitHub repository louisbrulenaudet/monorepo-template (19 stars, last pushed 6d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,195 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.