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-frameworks-nextjs)<a href="https://agentmods.dev/rules/netlify/context-and-tools/netlify-frameworks-nextjs"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-frameworks-nextjs/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-frameworks-nextjs"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-frameworks-nextjs.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.00015 | $0.01065 |
| Opus 5.5 | $0.00006 | $0.00426 |
| Sonnet 5.5 | $0.00003 | $0.00213 |
| Haiku 4.5 | $0.00002 | $0.00106 |
Grade A, and why
netlify-frameworks-nextjs 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 29d 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 — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Next.js 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 pinningnextor 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.
Next.js on Netlify uses the @netlify/plugin-nextjs runtime, which is installed automatically. No manual adapter installation is required — Netlify detects Next.js and configures the build automatically.
The current Next.js Runtime (v5) supports Next.js 13.5 and later. A project on an older Next.js version cannot use it — upgrade Next.js to at least 13.5 before deploying.
# netlify.toml
[build]
command = "next build"
publish = ".next"
What the Runtime Does
- Converts Next.js server-side features (SSR, API routes, middleware, ISR) into Netlify Functions and Edge Functions
- Handles image optimization via Netlify Image CDN
- Maps Next.js routing to Netlify's infrastructure
- Supports App Router and Pages Router
Key Configuration
next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{ protocol: "https", hostname: "example.com" },
],
},
};
module.exports = nextConfig;
Remote image patterns in next.config.js are automatically mapped to Netlify Image CDN's remote_images configuration.
Skew protection
Opt-in. Set NETLIFY_NEXT_SKEW_PROTECTION to true, then redeploy — env values are injected at build time, so the live deploy is unchanged until a new build runs.
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.
- 29d ago Changed · +3 lines d3e608a08971
- 1mo ago First seen · 119 lines · 15 tokens per session scan A e6012973d62e
netlify-frameworks-nextjs is a cursor rule published in the GitHub repository netlify/context-and-tools (41 stars, last pushed 2d ago), licensed MIT. It adds 15 tokens to every session and 1,065 once invoked, about $0.0001 per session on Opus 5.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
beanstalk-deploy
Robust deployment patterns for Elastic Beanstalk with GitHub Actions, Pulumi, and edge case handling.
aws-ecs
Definitive guidelines for building, deploying, and operating applications on AWS ECS, emphasizing immutable containers, secure secrets management, and robust operational patterns.
aws-rds-best-practices
AWS RDS PostgreSQL best practices - database configuration, connection management, authentication, backup, and performance optimization standards.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.