modus-color-usage-react

modus-color-usage-react is a cursor rule for Cursor from julianoczkowski/create-trimble-app. It costs 0 tokens per session (2,713 once invoked), scanned A, original, MIT.

A set of rules for using the Modus design system's named colors in a React and Vite interface. It explains which semantic color classes to use instead of raw color values.

In plain words
What is it for?
Use it when styling backgrounds, text, borders, and interactive states in Modus-based React screens.
Why use it?
It keeps colors consistent across the design system and avoids hardcoded colors that may fail when themes change.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when styling backgrounds, text, borders, and interactive states in Modus-based React screens.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/julianoczkowski/create-trimble-app/modus-color-usage-react
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/julianoczkowski/create-trimble-app

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 modus-color-usage-react

README.md
[![agentmods](https://agentmods.dev/badge/rules/julianoczkowski/create-trimble-app/modus-color-usage-react.svg)](https://agentmods.dev/rules/julianoczkowski/create-trimble-app/modus-color-usage-react)
Your own site
<a href="https://agentmods.dev/rules/julianoczkowski/create-trimble-app/modus-color-usage-react"><img src="https://agentmods.dev/badge/rules/julianoczkowski/create-trimble-app/modus-color-usage-react.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,713 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.02713
Opus 5 $0.00000 $0.01357
Sonnet 5 $0.00000 $0.00543
Haiku 4.5 $0.00000 $0.00271

Measured 4d ago against content hash f6212f6db958, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

modus-color-usage-react 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 4d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

templates/react/.cursor/rules/modus-color-usage-react.mdc · 421 lines

How it starts

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

Modus Color Usage in React + Vite

🎨 Design System Color Architecture

CRITICAL: This React + Vite application uses a 9-color design system that maps Figma variables to Modus's color system, available as Tailwind classes.

Color System: 9 Modus colors mapped to design system variables in src/index.css

FORBIDDEN: Raw Modus CSS Variables

Never Use Raw Modus Variables

// ❌ WRONG: Raw Modus CSS variables
style={{ backgroundColor: "var(--modus-wc-color-base-page)" }}
style={{ color: "var(--modus-wc-color-base-content)" }}
style={{ borderColor: "var(--modus-wc-color-base-200)" }}

// ❌ WRONG: Direct Modus variable usage
className="bg-[var(--modus-wc-color-base-page)]"
className="text-[var(--modus-wc-color-base-content)]"

Never Use Hardcoded Colors

// ❌ WRONG: Hardcoded hex/RGB values
style={{ backgroundColor: "#ffffff" }}
style={{ color: "#000000" }}
style={{ borderColor: "#e5e5e5" }}

// ❌ WRONG: Hardcoded colors in Tailwind
className="bg-[#ffffff]"
className="text-[#000000]"

Never Use Generic Tailwind Colors

// ❌ WRONG: Generic Tailwind color classes
className = "bg-blue-500";
className = "text-red-400";
className = "border-green-300";
className = "bg-gray-100";

CORRECT: Design System Colors

Use Design System Tailwind Classes

// ✅ CORRECT: Design system colors
className = "bg-background text-foreground";
className = "bg-card text-card-foreground";
className = "bg-primary text-primary-foreground";
className = "bg-secondary text-secondary-foreground";
className = "bg-muted text-muted-foreground";
className = "bg-accent text-accent-foreground";
className = "bg-destructive text-destructive-foreground";
className = "bg-warning text-warning-foreground";
className = "bg-success text-success-foreground";

Available Design System Colors

// ✅ CORRECT: All available design system colors
const colorClasses = {
  // Background colors
  background: "bg-background",
  card: "bg-card",
  popover: "bg-popover",
  sidebar: "bg-sidebar",

  // Text colors
  foreground: "text-foreground",
  "card-foreground": "text-card-foreground",
  "popover-foreground": "text-popover-foreground",
  "sidebar-foreground": "text-sidebar-foreground",

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

  // Secondary colors
  secondary: "bg-secondary",
  "secondary-foreground": "text-secondary-foreground",

  // Muted colors
  muted: "bg-muted",
  "muted-foreground": "text-muted-foreground",

  // Accent colors
  accent: "bg-accent",
  "accent-foreground": "text-accent-foreground",

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

  // Border colors
  border: "border-border",
  input: "border-input",
  "sidebar-border": "border-sidebar-border",

  // Ring colors
  ring: "ring-ring",
  "sidebar-ring": "ring-sidebar-ring",
};

Read the full file on GitHub · 421 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. 4d ago First seen · 421 lines · 0 tokens per session scan A f6212f6db958

Subscribe to this mod's changes

modus-color-usage-react is a cursor rule published in the GitHub repository julianoczkowski/create-trimble-app (3 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,713 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-09-03.