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/netlify/context-and-toolsWrote 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/netlify/context-and-tools/netlify-server)<a href="https://agentmods.dev/rules/netlify/context-and-tools/netlify-server"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-server/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/netlify/context-and-tools/netlify-server"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-server.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.00182 | $0.04624 |
| Opus 5.5 | $0.00073 | $0.01850 |
| Sonnet 5.5 | $0.00036 | $0.00925 |
| Haiku 4.5 | $0.00018 | $0.00462 |
Grade E, and why
netlify-server scanned grade E with 3 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 20d 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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- system: agent-context/server/system.md — human-owned, merged by ctx-gen; edit system.md, not this section --> Cloud metadata endpointhighServer-side request forgery
One request to 169.254.169.254 can return temporary IAM credentials.
(including 169.254.169.254), re-check after every redirect, and return only Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
| Object with `fetch` (Fetchable, e.g. Hono) | `fetch(request, context)` | `upgradeWebSocket` | How it starts
The opening of the file, as written. The whole thing — 365 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Netlify Server
Early Access, so APIs may change. It is available on credit-based plans and on Enterprise plans with credits enabled. It requires Node.js 24+ for both build and local dev, and Netlify CLI 27.17.0+ for both local dev and deploys.
It is free during Early Access and intended for evaluation, experimentation, and low-volume production use. At GA it will bill credits for reserved memory (GB-hours) and active CPU (vCPU-hours). Every request the server handles already counts toward the web requests meter.
Reach for this / avoid this
// ✅ netlify/server/index.ts — handler (same signature as Netlify Functions)
import type { Context, Config } from "@netlify/server";
export default async (req: Request, context: Context) =>
new Response(`Hello from ${context.geo.city ?? "somewhere"}`);
export const config: Config = { path: "/api/*" };
// ✅ Fetchable app (Hono etc.): export as is
export default app;
// ✅ Node request listener: wrap it, do NOT call listen(). WebSockets work.
export default createServer(handleRequest);
// ✅ Framework that starts itself (Express/Fastify): listen on PORT within 10 s
app.listen(process.env.PORT);
// ❌ export default (req, res) => {...} // two params = treated as a fetch handler, breaks
// ❌ export default expressApp // works, but WebSocket upgrades get 501
// ❌ server.close(() => process.exit(0)) // cuts off shutdown hooks and background work
// ❌ setInterval / fire-and-forget promise // invisible to Netlify; the instance can stop mid-work
You don't configure ports, add health endpoints, or install adapters. Install the package with npm install @netlify/server.
Entry file and detection
- Use one server per project:
netlify/server/index.ts,.mts,.js, or.mjs. The build fails if more than one exists. - Startup runs once per instance:
PORTis set.- The entry file is imported, running top-level code (top-level
awaitis awaited). onStarthooks run in order.- The default export is inspected.
- No traffic arrives until all steps finish. Any throw fails the start.
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.
- 20d ago First seen · 365 lines · 182 tokens per session scan E a6621ca6ae1c
netlify-server is a cursor rule published in the GitHub repository netlify/context-and-tools (58 stars, last pushed 4d ago), licensed MIT. It adds 182 tokens to every session and 4,624 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it E with 3 findings (hidden instructions, cloud metadata endpoint, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-11.
netlify-server compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| netlify-servernetlify/context-and-tools | Cursor rule | 58 | 4d ago | MIT | E | 182 | Cursor |
| cloudflare-email-telegram-cursorrules-prompt-filePatrickJS/awesome-cursorrules | Cursor rule | 41k | 6mo ago | CC0-1.0 | A | 720 | Cursor |
| implement-graceful-shutdown-for-your-applicationPaulJPhilp/EffectPatterns | Cursor rule | 807 | 5mo ago | MIT | A | 702 | Cursor |
| service-bindingslouisbrulenaudet/monorepo-template | Cursor rule | 19 | 8d ago | Apache-2.0 | A | 775 | Cursor |
| hatch3r-scalabilityhatch3r/hatch3r | Cursor rule | 26 | 2mo ago | MIT | A | 0 | Cursor |
| cloudflare-workers-hono-angular-saas-cursorrules-prompt-fileXD3an/awesome-ai-coding-all-in-one | Cursor rule | 14 | 3d ago | none | A | 1,335 | Cursor |
| knative-istio-typesense-gpu-cursorrules-prompt-filXD3an/awesome-ai-coding-all-in-one | Cursor rule | 14 | 3d ago | none | A | 613 | Cursor |