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/netlify/context-and-tools/netlify-frameworks-vitegit clone --depth 1 https://github.com/netlify/context-and-toolsWhat 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.00017 | $0.00820 |
| Opus 5 | $0.00009 | $0.00410 |
| Sonnet 5 | $0.00003 | $0.00164 |
| Haiku 4.5 | $0.00002 | $0.00082 |
Grade A, and why
netlify-frameworks-vite 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.
How it starts
The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Vite + React on Netlify
Setup
Check current versions before pinning. Knowledge cutoffs lag behind npm, and guessing a version tends to fail (
npm installrejects it, or worse, installs something incompatible). Before pinning@netlify/vite-plugin,vite,@vitejs/plugin-react, or any other package inpackage.json, runnpm view <pkg> versionto get the currentlatest. Or omit explicit pins and letnpm installpick them up. If that check itself fails (no network, registry unreachable), still don't fall back to a guessed exact pin — install without a version (or with@latest) and tell the user live verification wasn't possible so they should confirm the installed versions. Never present an unverifiedx.y.zas the current release.
Install the Netlify Vite plugin as a dev dependency (it's a build/dev-time tool, not a runtime dependency):
npm install -D @netlify/vite-plugin
// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import netlify from "@netlify/vite-plugin";
export default defineConfig({
plugins: [react(), netlify()],
});
What the Plugin Does
- Enables Netlify Functions, Blobs, DB, and environment variables in local dev
- Handles build output for Netlify deployment
- No need for
netlify dev— runnpm run devdirectly
SPA Routing
For client-side routing (React Router, etc.), add the catch-all redirect:
# netlify.toml
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
Netlify Functions
Write functions in netlify/functions/ as usual. The Vite plugin makes them available during local dev at their configured paths.
// netlify/functions/api.ts
import type { Config, Context } from "@netlify/functions";
export default async (req: Request, context: Context) => {
return Response.json({ message: "Hello from API" });
};
export const config: Config = { path: "/api/hello" };
Forms (AJAX Pattern)
Since Vite + React renders forms client-side, include a hidden HTML form for Netlify to detect, and submit via AJAX:
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 · 113 lines · 17 tokens per session scan A 42758c105d3b
netlify-frameworks-vite is a cursor rule published in the GitHub repository netlify/context-and-tools (36 stars, last pushed 6d ago), licensed MIT. It adds 17 tokens to every session and 820 once invoked, about $0.0001 per session on Opus 5. 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
ssr-noexternal-netlify
Netlify SSR (TanStack Start) — fix Cannot use import statement outside a module / ERRREQUIREESM by adding the offending package to ssr.noExternal in web/vite.config.ts. Always run the SSR import smoke test before pushing.
aws-ecs
Definitive guidelines for building, deploying, and operating applications on AWS ECS, emphasizing immutable containers, secure secrets management, and robust operational patterns.
frontend-patterns
React/TypeScript patterns for src/ code.
frontend-architecture
Vite + React SPA architecture - directory layout, providers, bundle splitting. Tailwind styling in tailwind.mdc.
nextjs
Next.js 16 App Router Standards & Constraints.
redteam-compute
Compute security sub-agent for an Azure red team engagement. Covers VMs, VMSS, App Service, and Functions. Finds disk encryption gaps, exposed managed identities, plaintext secrets, runCommand exposure, FTP/remote-debug, and missing auth. Containers and Kubernetes (AKS, ACR, Container Apps/Instances) are owned by the…