Netlify Database Setup
Sets up Netlify's built-in Postgres with Drizzle, migrations and preview branches without risking production data.
Claude's review
8/10 Current Netlify Database guidance with the Drizzle beta requirement, deploy applied migrations and safe failure handling.
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
Guide for using Netlify Database — the GA managed Postgres product built into Netlify. Use when a project needs any kind of dynamic, structured, or relational data. Covers provisioning via @netlify/database, Drizzle ORM (@beta) setup, migrations, preview branching, and safe production data handling. Blobs is only for file/asset storage — any dynamic data belongs in the database.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: netlify-database
description: Guide for using Netlify Database — the GA managed Postgres product built into Netlify. Use when a project needs any kind of dynamic, structured, or relational data. Covers provisioning via @netlify/database, Drizzle ORM (@beta) setup, migrations, preview branching, and safe production data handling. Blobs is only for file/asset storage — any dynamic data belongs in the database.
---
# Netlify Database
**Netlify Database** is the managed Postgres product built into the Netlify platform. It is **GA** and is the default choice for any dynamic data in a Netlify project.
Install `@netlify/database` and Netlify auto-provisions a Postgres database for the site at deploy time. Each deploy preview gets its own isolated branch forked from production data. No Neon account, connection-string wiring, or claim flow — the database is a first-class Netlify primitive.
## Database vs Blobs
Use **Netlify Database** for anything dynamic:
- Any user-generated or app-generated records (posts, comments, orders, sessions, audit logs)
- Structured data that will grow, be queried, or be joined
- Key-value-style data read or written by application code at runtime
Use **Netlify Blobs** only for **file and asset storage**: images, documents, exports, uploads, cached binary artifacts. Do not use Blobs as a dynamic data store — reach for Database instead. See `netlify-blobs/SKILL.md`.
## Before you build
If the prompt didn't already specify, ask the user a few short questions before scaffolding any database code — answers shape the schema, the seed data, and the query layer:
- **What entities does the app need?** (Users, posts, orders, sessions — drives the schema in `db/schema.ts`.)
- **Any seed data for the prototype?** (Test rows, default roles, sample content — these become a DML migration, not ad-hoc `INSERT`s against production.)
- **Drizzle (recommended) or native driver?** (Drizzle for type-safe queries and generated migrations; native for raw SQL or a different query builder like Kysely.)
**If you don't have preferences here, tell me roughly what the app does and I'll pick sensible defaults** — typically Drizzle with timestamp-prefix migrations and a starter schema for the entities the prompt implies.
## CRITICAL: Install Drizzle from the `@beta` dist-tag
The Netlify Database adapter for Drizzle ORM currently only exists on the `beta` release line of `drizzle-orm`. Install **both** `drizzle-orm` and `drizzle-kit` from the `@beta` dist-tag:
```bash
npm install drizzle-orm@beta
npm install -D drizzle-kit@beta
```
...From NVlabs's repository, Apache-2.0 licence.
Related skills
-
Checked
PostgreSQL schema explorer
Explores an unfamiliar PostgreSQL database read only before writing SQL, so answers about your data are right.
7/101 credit -
Checked
HTTP API design review
Designs or reviews HTTP endpoints, auth, pagination and versioning, so API changes do not break your clients.
7/101 credit -
Checked
Firebase Data Connect
Builds and deploys Firebase Data Connect backends on PostgreSQL with secure queries and type safe SDKs.
7/101 credit -
Checked
App performance tuning
Measures first, then fixes slow pages, Core Web Vitals and N+1 database queries across your whole app.
7/101 credit -
Checked
Safe Postgres migrations
Plans and tests PostgreSQL schema changes with lock levels in mind, so live tables change without downtime.
8/101 credit -
Checked
Supabase auth and database
Builds with Supabase auth, database, storage and edge functions while avoiding common security traps.
8/101 credit