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.
git clone --depth 1 https://github.com/louisbrulenaudet/monorepo-templateWrote 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/louisbrulenaudet/monorepo-template/react)<a href="https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/react"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/react/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/react"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/react.svg" alt="Reviewed on agentmods" width="80" 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.01427 |
| Opus 5.5 | $0.00000 | $0.00571 |
| Sonnet 5.5 | $0.00000 | $0.00285 |
| Haiku 4.5 | $0.00000 | $0.00143 |
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 10d 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 — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React SPA (React 19 + Vite)
front-* apps are client-only Vite SPAs: no SSR, React Server Components, or "use server"; ignore React guidance framed around those. Targeted performance audit: skill vercel-react-best-practices (browser/client guidance only).
Layout
- Screens live in
src/pages/, thin route files insrc/routes/(tanstack-router.mdc); shared UI insrc/components/(primitives insrc/components/ui/); non-render logic insrc/hooks/,src/services/,src/utils/; frontend-only value sets insrc/enums/; runtime config insrc/config/. HTTP calls pair with theirqueryOptionsinsrc/services/worker-api/<feature>.ts+<feature>-query-options.ts. components/ui/holds primitives that import only#/utils/*and other primitives (lint-enforced by ano-restricted-importsoverride). A component that reads a hook, a service, or feature content lives insrc/components/<feature>/beside that content (health/,onboarding/), andcomponents/feedback/holds app-shell states only (error, not-found);RouteErrorFallbackstays router-free, because the rootErrorBoundaryrenders it outsideRouterProvider. Promote a feature tosrc/features/<x>/only once it spans two routes, updating the rulepaths:globs in the same change, because they key on the layered folders.- In-app absolute imports use the
package.json"imports"map (#/*→./src/*, e.g.#/components/ui/Button) - never an@/alias,resolve.alias, orcompilerOptions.paths.
Components and hooks
- Never define a component (or a
memo/lazywrapper) inside another component's body; hoist it to module scope. - Never fetch in
useEffector mirror query data into local state: server state is TanStack Query (tanstack-query.mdc), andreact-doctor/no-fetch-in-effectis a lint error. Derive during render rather than syncing props/state inuseEffect; effects are only for external sync and clean up on unmount. - React Compiler is on: do not default to
useMemo/useCallback/memo; they are an escape hatch. useTransition/startTransition/useDeferredValuefor non-urgent or expensive UI work.- List keys use stable identity (
item.id), never the index when order can change. refis a normal prop (no newforwardRef).use()only with a stable cached promise under<Suspense>, neveruse(fetch(...))created during render.- Hook rules (
react/rules-of-hooks,react/exhaustive-deps) andjsx-a11y(partial a11y coverage) are oxlint rules; never add an ESLint /eslint-plugin-react-hookstoolchain.
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.
- 10d ago Changed · +2 lines 4a49b95f7ca8
- 17d ago Changed d90e9d51e1fe
- 18d ago Changed · +14 lines 0f53191cf829
- 22d ago Changed 576fe836a05a
- 1mo ago First seen · 27 lines · 0 tokens per session scan A 0c7f4b916787
react is a cursor rule published in the GitHub repository louisbrulenaudet/monorepo-template (19 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,427 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-30.
Other cursor rules, from other repositories
react_hooks
React Hooks best practices for frontend package.
react-typescript-auto
This rule enforces best practices for building React 18+ applications with TypeScript, ensuring type safety, maintainability, and consistency.
nextjs-react19-auto
This rule enforces Next.js best practices for React 19 with TypeScript.
react-component-template
Template for creating new React components.
nextjs-standards
Next.js Frontend Development Standards and Patterns.
react-tanstack-router-query-cursorrules-prompt-file
Cursor rules for React SPAs combining TanStack Router v1 and TanStack Query v5 for zero-loading-spinner routing and type-safe server state.