modus-angular-tailwind-usage

A set of rules for using Tailwind CSS version 4 with the Modus design system in an Angular and Vite application.

In plain words
What is it for?
Use it while styling Angular and Vite interfaces with the project’s approved semantic color classes.
Why use it?
It prevents generic Tailwind colors, hardcoded colors, and direct design-system variables from producing inconsistent or unsupported styles.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/julianoczkowski/create-trimble-app/modus-angular-tailwind-usage
Clone the repo
git clone --depth 1 https://github.com/julianoczkowski/create-trimble-app

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,616 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00000 $0.01616
Opus 5 $0.00000 $0.00808
Sonnet 5 $0.00000 $0.00323
Haiku 4.5 $0.00000 $0.00162

Measured 2d ago against content hash 9413ff698fb3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

modus-angular-tailwind-usage scanned grade C with 1 finding 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 2d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- CORRECT: Design system colors -->
templates/angular/.cursor/rules/modus-angular-tailwind-usage.mdc · 243 lines

How it starts

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

Tailwind CSS Usage in Angular + Vite

Tailwind v4 Integration

This Angular + Vite application uses Tailwind CSS v4 with Modus Design System integration.

Configuration: Tailwind v4 reads CSS variables directly from src/styles.css. No separate tailwind.config.js is required for basic color mapping.

FORBIDDEN: Generic Tailwind Colors

Never Use Generic Tailwind Color Classes

<!-- WRONG: Generic Tailwind color classes -->
<div class="bg-blue-500 text-white border-gray-300"></div>
<div class="bg-red-400 text-yellow-200 border-green-500"></div>
<div class="bg-gray-100 text-black border-purple-300"></div>

Never Use Hardcoded Colors

<!-- WRONG: Hardcoded colors -->
<div class="bg-[#ffffff] text-[#000000] border-[#e5e5e5]"></div>
<div [style.background-color]="'#ffffff'"></div>

Never Use Raw Modus Variables

<!-- WRONG: Raw Modus CSS variables -->
<div class="bg-[var(--modus-wc-color-base-page)]"></div>
<div [style.background-color]="'var(--modus-wc-color-base-page)'"></div>

CORRECT: Design System Colors

Use Design System Tailwind Classes

<!-- CORRECT: Design system colors -->
<div class="bg-background text-foreground"></div>
<div class="bg-card text-card-foreground border-default"></div>
<div class="bg-primary text-primary-foreground"></div>
<div class="bg-secondary text-secondary-foreground"></div>
<div class="bg-muted text-muted-foreground"></div>
<div class="bg-destructive text-destructive-foreground"></div>
<div class="bg-warning text-warning-foreground"></div>
<div class="bg-success text-success-foreground"></div>

Available Design System Colors

// Background colors
bg-background, bg-card, bg-muted, bg-secondary

// Text colors
text-foreground, text-card-foreground, text-muted-foreground

// Primary colors
bg-primary, text-primary-foreground

// Status colors
bg-destructive, text-destructive-foreground
bg-warning, text-warning-foreground
bg-success, text-success-foreground

// Border colors
border-border, border-default, border-primary, border-success, border-warning, border-destructive

Read the full file on GitHub · 243 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. 2d ago First seen · 243 lines · 0 tokens per session scan C 9413ff698fb3

Subscribe to this mod's changes

modus-angular-tailwind-usage is a cursor rule published in the GitHub repository julianoczkowski/create-trimble-app (3 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,616 tokens. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.