netlify avatar

Netlify Database

This teaches Claude how to work with Netlify's GA managed Postgres product, which auto-provisions a database for every deploy and gives each preview branch its own isolated fork of production data. The skill is opinionated about workflow: it insists on installing Drizzle from the beta dist-tag (where the Netlify adapter lives), blocks any direct schema changes outside of migration files, and routes everything through netlify database commands instead of raw psql or API calls. The guidance is unusually specific about failure modes and includes a full playbook for switching from the deprecated Netlify DB extension or other external Postgres providers. Use this when a project needs structured, relational, or user-generated data, not just file storage.

skills.sh installs
3.1K
GitHub stars
51
last updated
Aug 21, 2026

Install

$ npx -y skills add netlify/context-and-tools --skill netlify-database --agent claude-code

Installs into .claude/skills of the current project.

Files

Netlify Database

Zero-config managed Postgres. Install @netlify/database, write migrations under netlify/database/migrations/, deploy — Netlify provisions the DB and applies migrations automatically. Queryable from Functions, Edge Functions, Builds, and Agent Runners.

Modern client (reach for this)

import { getDatabase } from "@netlify/database";

const db = getDatabase();               // auto-selects connection for the runtime
const userId = 42;
const users = await db.sql`SELECT * FROM users WHERE id = ${userId}`;  // auto-parameterized

Own driver / ORM instead:

import { getConnectionString } from "@netlify/database";
const connectionString = getConnectionString();  // correct branch for this env

Legacy — do NOT use for new code: import { neon } from "@netlify/neon". Superseded by @netlify/database. Replace neon() calls with the Drizzle netlify-db adapter or a Postgres driver via getConnectionString(). The legacy env var NETLIFY_DATABASE_URL is replaced by NETLIFY_DB_URL.

Where things go

Sponsors

Details

Repository
github.com/netlify/context-and-tools
Categories
Backend & APIs, Documentation, Cloud & Infrastructure, Databases
First seen
Jul 14, 2026

More from netlify/context-and-tools

All 14
1apollographql avatarapollo-serverapollographql/skillsGuide for building GraphQL servers with Apollo Server 5.x. Use this skill when: (1) setting up a new Apollo Server project, (2) writing resolvers or defining Gr3.1Kskills.sh installs
2davila7 avatarsenior-backenddavila7/claude-code-templatesComprehensive backend development skill for building scalable backend systems using NodeJS, Express, Go, Python, Postgres, GraphQL, REST APIs. Includes API scaf2.7Kskills.sh installs
3mrgoonie avatarbackend-developmentmrgoonie/claudekit-skillsBuild robust backend systems with modern technologies (Node.js, Python, Go, Rust), frameworks (NestJS, FastAPI, Django), databases (PostgreSQL, MongoDB, Redis),2.3Kskills.sh installs
4google-deepmind avatarquickgo-databasegoogle-deepmind/science-skillsQuery the QuickGO and Evidence & Conclusion Ontology (ECO) REST API. Use this when you need to map genes to biological processes, molecular functions, or cellul2.2Kskills.sh installs
5google-deepmind avatarencode-ccres-databasegoogle-deepmind/science-skillsQuery the ENCODE Registry of cis-Regulatory Elements (cCREs) via the SCREEN GraphQL API, or make custom queries to the ENCODE Portal REST API for experiments an2.2Kskills.sh installs
6jiatastic avatarpython-backendjiatastic/open-python-skillsPython backend development expertise for FastAPI, security patterns, database operations, Upstash integrations, and code quality. Use when: (1) Building REST AP2.2Kskills.sh installs