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-database-legacy-extensiongit 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-database-legacy-extension)<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>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 | $0.00017 | $0.00802 |
| Opus 5 | $0.00009 | $0.00401 |
| Sonnet 5 | $0.00003 | $0.00160 |
| Haiku 4.5 | $0.00002 | $0.00080 |
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.
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/neoninpackage.jsondependenciesNETLIFY_DATABASE_URLreferenced in code or env files (note: different from the GANETLIFY_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/databasealongside@netlify/neonwithout a migration plan — you'll end up with two databases and two env vars. - Keep using
@netlify/neonandNETLIFY_DATABASE_URLfor reads and writes in that codebase. - Migrations still belong in a migrations directory (commonly
netlify/db/migrations/or./migrations/) and are typically applied viadrizzle-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:
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.
- 5d ago First seen · 51 lines · 17 tokens per session scan A 4539dad1f311
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.
Other cursor rules, from other repositories
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
as-contract-cast-smell
// ❌ WRONG — bypasses the family ContractSerializer seam const contract = JSON.parse(raw) as Contract; const contract = JSON.parse(raw) as Contract .
no-backward-compatibility
Do not add backward-compatibility shims or migration scaffolding.
postgresql
This guide defines the definitive best practices for writing clean, performant, and maintainable PostgreSQL SQL, focusing on modern conventions and avoiding common pitfalls.
query-optimization
查詢優化、EXPLAIN、index 設計與 RLS 效能測量.
sqlmodel
Satisfying the type checker when working with SQLModel.