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 rules/inboxpraveen/minimize-cursor-cost/reactgit clone --depth 1 https://github.com/inboxpraveen/Minimize-Cursor-CostWhat 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.00471 |
| Opus 5 | $0.00000 | $0.00235 |
| Sonnet 5 | $0.00000 | $0.00094 |
| Haiku 4.5 | $0.00000 | $0.00047 |
Grade A, and why
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 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.
What it actually says
React Rules
Output Format
- Single component change → show only the changed JSX section + affected hooks.
- Use
// ... rest of componentto skip unchanged JSX. - Don't reprint the import block unless adding new imports.
Components
- Don't extract a new component unless asked or unless the same JSX repeats 3+ times.
- Don't switch a function component to a class component (or vice versa).
- Don't rename props, state variables, or event handlers.
Hooks
- Don't add
useMemo/useCallbackunless the task is performance. - Don't introduce
useReducerifuseStateis already in use. - Don't add
useEffectto "be safe" — only when a side-effect is required. - Don't change the dependency array of an existing
useEffectunless the bug is in there.
State
- Match existing state library: Redux / Zustand / Jotai / Context. Never introduce a second.
- Don't lift state without asking.
- Don't add a new context provider unless the data is genuinely tree-wide.
Data Fetching
- Match existing pattern:
fetch/axios/ TanStack Query / SWR / RTK Query. - Don't introduce a query library if the codebase uses raw
fetch. - Don't add loading/error states beyond what siblings have.
Styling
- Match existing system: CSS Modules / Tailwind / styled-components / Emotion / vanilla CSS.
- Don't switch styling systems within a file.
- Don't add
classNameprops for styles that don't exist yet.
Forms
- Match existing form library: React Hook Form / Formik / native. Don't switch.
- Don't add validation libraries (zod, yup) if the project doesn't use one.
Never
- Don't add
keyprops on non-list elements. - Don't add
React.memospeculatively. - Don't add
forwardRefunless a parent actually passes a ref. - Don't add inline
onClick={() => handler(arg)}if there's an existing pattern usinguseCallback. - Don't add new ESLint disable comments — fix the underlying issue.
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 · 50 lines · 0 tokens per session scan A 0136e14ba54c
react is a cursor rule published in the GitHub repository inboxpraveen/Minimize-Cursor-Cost (7 stars, last pushed 17d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 471 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 cursor rules, from other repositories
sample_cursor_rule
React component best practices.
next
Next.js roof. Bundled docs for THIS next version. App vs Pages from the tree.
nextjs
Next.js: App Router, Server Components, server actions.
react
React: hooks, composition, performance patterns.
t3-stack
T3 Stack: tRPC + Prisma + NextAuth integration patterns.
tanstack-query
TanStack Query / React Query: query keys, mutations, caching, optimistic updates.