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/vite-config)<a href="https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/vite-config"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/vite-config/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/vite-config"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/vite-config.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.01201 |
| Opus 5 | $0.00000 | $0.00600 |
| Sonnet 5 | $0.00000 | $0.00240 |
| Haiku 4.5 | $0.00000 | $0.00120 |
Grade A, and why
vite-config 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 6d 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 — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Config shape
defineConfig(({ command, mode }) => …)- comparecommand === "build"/command === "serve"explicitly.appDirfromimport.meta.url, notprocess.cwd(). Config-time env:loadEnv(mode, appDir, "VITE_")-.env*is not inprocess.envduring config evaluation.- Small build-only plugins inline; extract only when shared across
front-*apps. TS bundling issues:vite --configLoader runner.
Vite 8 (Rolldown + Oxc)
build.rolldownOptions/optimizeDeps.rolldownOptions- not deprecatedrollupOptions/esbuildOptions.build.minify: "oxc".build.commonjsOptionsis a no-op.manualChunks(function) works but is deprecated - preserve existing splits when editing; usecodeSplittingfor refactors.
Plugins (order matters)
devtools → tanstackRouter (before react) → react({ compiler: true }) (native Rust React Compiler via optional peer oxc-transform-react; no Babel pass) → tailwindcss → cloudflare → build-only (apply: "build") → conditional via spread. Falsy plugins are skipped. Compiler on → less manual memoization (react.mdc).
Do not configure auxiliaryWorkers on front-* to embed worker-api or other backends - HTTP-only SPA boundary.
DevTools
DevTools()(embedded plugin) and the top-leveldevtoolsconfig key are alternatives, not complements - enabling the key registers a second DevTools instance on serve and callsstart()on build. Stay on the plugin.- Keep
build.rolldownOptions.devtoolsset explicitly.@vitejs/devtoolsonly seeds it fromDevToolsBuildIntegration, which Vite registers when the top-leveldevtoolskey is enabled; that key is absent here, so without the explicit flag no build writesnode_modules/.rolldownand the Rolldown dock stays empty (RDDT0001). Populate it with onebuild. embeddedVisibility: "passive"keeps Vite's floating dock clear of TanStack's; Shift+Alt+D reveals it.- The
devframe auth codebanner is the client auth handshake, not an error.clientAuthTokensis readable only from the top-level key, so it stays un-pre-approved; never setclientAuth: false- it exposes the dev server and filesystem to any browser that can reach the port. @vitest/uistays a root devDependency:@vitejs/devtools-vitestprobes for it at the pnpm workspace root, so an app-local install fails the Vitest dock withVTDT0001(knip.md).
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.
- 6d ago First seen · 52 lines · 0 tokens per session scan A 9da729344366
vite-config is a cursor rule published in the GitHub repository louisbrulenaudet/monorepo-template (19 stars, last pushed 9d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,201 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
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.
hook_layer_rules
Hook layer rules for custom React hooks and state management.