Netlify Database
Netlify-managed Postgres skill covering provisioning, querying, Drizzle ORM setup, migrations, and branch-based dev workflows.
- CCM score
- 75 of 100
- skills.sh installs
- 3.3K
- GitHub stars
- 57
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers querying from Functions and Edge Functions, Drizzle ORM setup with
@betapackages, schema migrations, and local dev withnetlify dev - Includes
getDatabase()andgetConnectionString()usage, transactions viadb.pool, and migration naming and placement undernetlify/database/migrations/ - Enforces parameterized SQL through
db.sqltemplates and warns againstsql.raw()on untrusted input, plus no edits to applied migrations - Designed for teams replacing Neon, Supabase, or RDS with Netlify Database, or adding structured data to Netlify-hosted apps
Install
$ npx -y skills add netlify/context-and-tools --skill netlify-database -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Netlify Database
Managed Postgres built into Netlify. Netlify provisions the database, applies migrations on deploy, and creates a database branch for every deploy preview and agent run.
Use this, not that
// ✅ Modern: auto-configured, branch-aware
import { getDatabase } from "@netlify/database";
const db = getDatabase();
const users = await db.sql`SELECT * FROM users WHERE id = ${id}`;
// ✅ Drizzle: native adapter, connection configured automatically
import { drizzle } from "drizzle-orm/netlify-db";
export const db = drizzle({ schema });
// ❌ Legacy Neon extension: do not write new code with it
import { neon } from "@netlify/neon"; // reads NETLIFY_DATABASE_URL
Netlify Database reads NETLIFY_DB_URL. It does not read NETLIFY_DATABASE_URL.
Install
npm install @netlify/database # required: its presence triggers provisioning
npm install drizzle-orm@beta && npm install -D drizzle-kit@beta # Drizzle: @beta is mandatory
npm install -g netlify-cli # CLI 26.0.0+, Node 20.12.2+
Details
- Repository
- github.com/netlify/context-and-tools
- Categories
- Databases, Backend & APIs
- First seen
- Jul 14, 2026
Questions
Which other skills are in the Databases category with netlify-database?
netlify-database sits in the Databases category alongside supabase-postgres-best-practices, prisma-client-api, prisma-database-setup, prisma-cli and prisma-postgres. It is the skill for Netlify Database, a managed Postgres product built into Netlify that handles provisioning, migrations and preview branches.
How do I install the netlify-database skill?
Run npx -y skills add netlify/context-and-tools --skill netlify-database -y in your project. Once installed, the agent can set up Netlify Database, write queries from Functions, and manage schema changes through migrations.
What does netlify-database help an agent build?
It guides an agent through projects that need dynamic, structured or relational data on Netlify. It covers provisioning with the @netlify/database package, Drizzle ORM setup, migrations in netlify/database/migrations, and safe production data handling.
What do I need before using netlify-database?
The project needs @netlify/database installed, since its presence triggers provisioning, and the Netlify CLI version 26.0.0 or later on Node 20.12.2 or later. Netlify Database is available on Credit-based plans only, and an active database uses credits for compute and bandwidth.
Should I use netlify-database or Blobs for my app's data?
Use netlify-database for any dynamic, structured or relational data, and reserve Blobs for file and asset storage. The skill states that Blobs is only for files and assets, so records like users or orders belong in the database.
More from netlify/context-and-tools
All 12Similar to Netlify Database
More DatabasesprismaPluginanthropics/claude-plugins-official48.1K starsPrisma MCP integration for Postgres database management, schema migrations, SQL queries, and connection string management. Provision Prisma Postgres databases,
drizzle-best-practicesSkillhonra-io/drizzle-best-practices737 installsDrizzle ORM guidance for PostgreSQL that selects the correct v1 or legacy 0.45.x API before writing code.
databaseSkillsickn33/agentic-awesome-skills193 installsPhased workflow bundle that routes database design, migrations, optimization, pipelines, and operations to specialist skills.
drizzle-orm-patternsSkillgiuseppe-trisciuoglio/developer-kit6K installsComprehensive Drizzle ORM guide for type-safe schemas, queries, relations, transactions, and migrations across five databases.
drizzle-migrationsSkillbobmatnyc/claude-mpm-skills1.3K installsMigration-first Drizzle ORM workflow for TypeScript projects that writes SQL migrations before schema code.
database-designSkillsickn33/agentic-awesome-skills2.3K installsDecision-focused guide for choosing databases, ORMs, and schema designs, with indexing and migration guidance for each choice.