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.
npx agentmods add commands/farzannajipour/cursor-react-rules/setup-dark-modegit clone --depth 1 https://github.com/Farzannajipour/cursor-react-rulesWhat 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 | $0.00000 | $0.01996 |
| Opus 5 | $0.00000 | $0.00998 |
| Sonnet 5 | $0.00000 | $0.00399 |
| Haiku 4.5 | $0.00000 | $0.00200 |
Grade A, and why
setup-dark-mode 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 314 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Setup Dark Mode
Overview
Implement dark mode with Tailwind CSS, system preference detection, and user preference persistence.
Steps
-
Configure Tailwind
- Enable dark mode in config
- Choose strategy (class or media)
-
Create theme provider
- Detect system preference
- Store user preference
- Provide theme context
-
Add theme toggle
- Create toggle component
- Update theme on click
- Save preference
-
Style components
- Add dark: variants to Tailwind classes
- Ensure proper contrast in both modes
Implementation
1. Configure Tailwind CSS
// tailwind.config.js
module.exports = {
darkMode: 'class', // or 'media' for system preference only
content: [
'./app/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
],
theme: {
extend: {
colors: {
// Define custom colors for dark mode
},
},
},
};
2. Theme Provider
'use client';
import { createContext, useContext, useEffect, useState } from 'react';
type Theme = 'light' | 'dark' | 'system';
interface ThemeContextType {
theme: Theme;
setTheme: (theme: Theme) => void;
resolvedTheme: 'light' | 'dark';
}
const ThemeContext = createContext<ThemeContextType | undefined>(undefined);
export function ThemeProvider({ children }: { children: React.ReactNode }) {
const [theme, setTheme] = useState<Theme>('system');
const [resolvedTheme, setResolvedTheme] = useState<'light' | 'dark'>('light');
useEffect(() => {
// Get saved theme or default to system
const saved = localStorage.getItem('theme') as Theme | null;
if (saved) {
setTheme(saved);
}
}, []);
useEffect(() => {
const root = document.documentElement;
// Remove existing class
root.classList.remove('light', 'dark');
if (theme === 'system') {
// Use system preference
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches
? 'dark'
: 'light';
root.classList.add(systemTheme);
setResolvedTheme(systemTheme);
// Listen for system preference changes
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
const handleChange = (e: MediaQueryListEvent) => {
const newTheme = e.matches ? 'dark' : 'light';
root.classList.remove('light', 'dark');
root.classList.add(newTheme);
setResolvedTheme(newTheme);
};
mediaQuery.addEventListener('change', handleChange);
return () => mediaQuery.removeEventListener('change', handleChange);
} else {
// Use explicit theme
root.classList.add(theme);
setResolvedTheme(theme);
}
// Save to localStorage
localStorage.setItem('theme', theme);
}, [theme]);
return (
<ThemeContext.Provider value={{ theme, setTheme, resolvedTheme }}>
{children}
</ThemeContext.Provider>
);
}
export function useTheme() {
const context = useContext(ThemeContext);
if (!context) {
throw new Error('useTheme must be used within ThemeProvider');
}
return context;
}
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.
- 2d ago First seen · 314 lines · 0 tokens per session scan A 9e82d2982ab7
setup-dark-mode is a command published in the GitHub repository Farzannajipour/cursor-react-rules (3 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,996 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-31.
Other commands, from other repositories
polish
Final quality pass: alignment, spacing, consistency, design system adherence, typography, interaction states, and code cleanup. Replaces polish + normalize + distill.
ux-evolve
Auto-iterate the lint→polish→re-lint loop on a generated artifact until score crosses 90 or plateaus. Triggers on "polish this", "evolve this surface", "improve until score 90+", "auto-fix", "run the loop". Use when the user has a freshly generated surface that needs automatic refinement to ship-ready quality. Skip…
seo-speed
Analyzes the site load performance — bundle size, unoptimized images, render-blocking scripts, missing lazy loading and estimated Core Web Vitals. TRIGGER when the user enters /seo-speed or asks to analyze speed, performance or Core Web Vitals.
review-css-complexity
Scan codebase for overly complex CSS/styling patterns that should be simplified.
dark-mode-specialist
Use when dark mode looks wrong. Pure black surfaces, elevation that disappears, brand colours that vibrate against dark, a white flash on load, or a mode toggle that does not persist.
responsive-design-specialist
Use when a layout breaks between sizes. Arbitrary breakpoints, type that does not scale, images that blow out the grid, or a desktop design retrofitted onto mobile.