Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/julianoczkowski/create-trimble-appnpx agentmods add rules/julianoczkowski/create-trimble-app/modus-themes-reactWrote 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.
[](https://agentmods.dev/rules/julianoczkowski/create-trimble-app/modus-themes-react)<a href="https://agentmods.dev/rules/julianoczkowski/create-trimble-app/modus-themes-react"><img src="https://agentmods.dev/badge/rules/julianoczkowski/create-trimble-app/modus-themes-react.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.03304 |
| Opus 5 | $0.00000 | $0.01652 |
| Sonnet 5 | $0.00000 | $0.00661 |
| Haiku 4.5 | $0.00000 | $0.00330 |
Grade A, and why
modus-themes-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 3d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- modus-themes-solidjs — 92% identical, 82 lines differ
How it starts
The opening of the file, as written. The whole thing — 507 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Modus Themes Implementation in React + Vite
🎨 Theme System Overview
CRITICAL: This React + Vite application supports 6 Modus themes with proper theme switching, persistence, and hydration safety.
Available Themes: 4 Modus themes + 2 Connect themes
modus-classic-light/modus-classic-darkmodus-modern-light/modus-modern-darkconnect-light/connect-dark
🏗️ Theme Architecture
✅ ThemeProvider Setup
// ✅ CORRECT: ThemeProvider in App.tsx
import { ThemeProvider } from "./contexts/ThemeContext";
function App() {
return (
<ThemeProvider>
<ModusProvider>
<Router>
<div className="min-h-screen flex flex-col">
<AppHeader />
<div className="flex-1">
<Routes>{/* Routes */}</Routes>
</div>
<AppFooter />
</div>
</Router>
</ModusProvider>
</ThemeProvider>
);
}
✅ Theme Context Implementation
// ✅ CORRECT: Theme context with hydration safety
import { useEffect, useState, type ReactNode } from "react";
import { ThemeContext, type Theme } from "./ThemeContextData";
interface ThemeProviderProps {
children: ReactNode;
}
const VALID_THEMES: Theme[] = [
"modus-classic-light",
"modus-classic-dark",
"modus-modern-light",
"modus-modern-dark",
"connect-light",
"connect-dark",
];
export function ThemeProvider({ children }: ThemeProviderProps) {
const [theme, setThemeState] = useState<Theme>("modus-classic-light");
const [mounted, setMounted] = useState(false);
// Derived state
const isDark = theme.includes("dark");
const isModern = theme.includes("modern");
// Load theme from localStorage on mount
useEffect(() => {
if (typeof window !== "undefined") {
try {
const savedTheme = window.localStorage.getItem(
"preferred-theme"
) as Theme | null;
if (savedTheme && VALID_THEMES.includes(savedTheme)) {
setThemeState(savedTheme);
}
} catch (error) {
console.warn("Unable to read stored theme preference:", error);
}
}
setMounted(true);
}, []);
// Apply theme to document when it changes
useEffect(() => {
if (!mounted) return;
const html = document.documentElement;
// Set theme attribute (official Modus way)
html.setAttribute("data-theme", theme);
// Save to localStorage
if (typeof window !== "undefined") {
try {
window.localStorage.setItem("preferred-theme", theme);
} catch (error) {
console.warn("Unable to persist theme preference:", error);
}
}
}, [theme, mounted]);
const setTheme = (newTheme: Theme) => {
setThemeState(newTheme);
};
// Prevent hydration mismatch by not rendering until mounted
if (!mounted) {
return <>{children}</>;
}
return (
<ThemeContext.Provider value={{ theme, setTheme, isDark, isModern }}>
{children}
</ThemeContext.Provider>
);
}
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.
- 3d ago First seen · 507 lines · 0 tokens per session scan A 4fcd1aed8d18
modus-themes-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 3,304 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.
Other cursor rules, from other repositories
hatch3r-design-system-detection
Mandatory detection of existing design tokens, theme primitives, and component library before AI agents author new UI components.
hatch3r-ux-states-and-flows
Four-state surface contract (loading/empty/error/partial), user-flow decomposition before implementation, and microcopy + tone discipline for end-user UIs.
hatch3r-accessibility-standards
Accessibility standards covering WCAG 2.2 AA compliance, keyboard navigation, screen readers, and ARIA patterns.
hatch3r-theming
Theming, dark mode, and color system conventions for the project.
design-ux
Accessibility and design-system conventions for the web dashboard and marketing site.
registry-bases-parity
Keep registry base and radix trees in sync when editing shared UI.