netlify-database-legacy-extension

netlify-database-legacy-extension is a cursor rule for coding agents from netlify/context-and-tools. It costs 17 tokens per session (802 once invoked), scanned A, original, MIT.

A reference for the older Netlify DB extension, which is a deprecated database setup distinct from the current Netlify Database product. It explains how to recognize projects that still use the old extension.

In plain words
What is it for?
Use it only when maintaining a legacy project that contains the old extension’s packages, environment variables, or configuration, and when planning a move to the current database product.
Why use it?
It prevents new projects from being set up with an obsolete product and helps maintainers identify what an existing project is using before changing it.

Cursor rule

Install

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.

agentmods
npx agentmods add rules/netlify/context-and-tools/netlify-database-legacy-extension
Clone the repo
git clone --depth 1 https://github.com/netlify/context-and-tools

Wrote 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.

agentmods badge for netlify-database-legacy-extension

README.md
[![agentmods](https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-database-legacy-extension.svg)](https://agentmods.dev/rules/netlify/context-and-tools/netlify-database-legacy-extension)
Your own site
<a href="https://agentmods.dev/rules/netlify/context-and-tools/netlify-database-legacy-extension"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-database-legacy-extension.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 802 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.00802
Opus 5 $0.00009 $0.00401
Sonnet 5 $0.00003 $0.00160
Haiku 4.5 $0.00002 $0.00080

Measured 5d ago against content hash 4539dad1f311, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

netlify-database-legacy-extension 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 5d 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.

cursor/rules/netlify-database-legacy-extension.mdc · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Legacy Netlify DB extension (deprecated)

This reference covers the older Netlify DB extension (the Beta product), which is distinct from the current Netlify Database GA product described in SKILL.md.

Do not install or recommend the extension for new projects. Use it only when an existing project is already set up on it, and in that case encourage the user to switch to Netlify Database.

How to recognize an extension-based project

These signals indicate the project is on the legacy extension, not the GA product:

  • @netlify/neon in package.json dependencies
  • NETLIFY_DATABASE_URL referenced in code or env files (note: different from the GA NETLIFY_DB_URL)
  • The Neon extension is installed under Extensions in the Netlify UI

The legacy extension was historically set up via netlify db init on older versions of the CLI. That command is gone in the current CLI — netlify db init (the short alias for netlify database init) now sets up Netlify Database (the GA product), not the extension. If a project shows the signals above, it was created on an older CLI version, not by anything reachable today.

Keeping an extension project working

If you land in a project that uses the extension:

  • Don't rip it out unless the user has explicitly asked to migrate. The extension database holds their data and their Neon account holds the claim.
  • Don't mix packages. Don't install @netlify/database alongside @netlify/neon without a migration plan — you'll end up with two databases and two env vars.
  • Keep using @netlify/neon and NETLIFY_DATABASE_URL for reads and writes in that codebase.
  • Migrations still belong in a migrations directory (commonly netlify/db/migrations/ or ./migrations/) and are typically applied via drizzle-kit migrate.

Encourage migration

The extension is deprecated. New database creation through the extension is blocked, and the Netlify UI surfaces deprecation notices when a project is using it. When you're helping a user on an extension-based project, proactively tell them:

Read the full file on GitHub · 51 lines

Changes

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.

  1. 5d ago First seen · 51 lines · 17 tokens per session scan A 4539dad1f311

Subscribe to this mod's changes

netlify-database-legacy-extension is a cursor rule published in the GitHub repository netlify/context-and-tools (36 stars, last pushed 2d ago), licensed MIT. It adds 17 tokens to every session and 802 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.