neon-postgres

Configure and manage Neon serverless Postgres connections, branches, and migrations.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/zomeru/zomlab --skill neon-postgres-zomeru
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: neon-postgres
Source: https://github.com/zomeru/zomlab/tree/main/.agents/skills/neon-postgres
Command: npx skills add https://github.com/zomeru/zomlab --skill neon-postgres-zomeru

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up and operating a serverless Postgres database involves many decisions—pooled versus direct connections, driver selection per runtime, branching, migrations, autoscaling, and cost controls—and mistakes like running migrations over a pooled connection cause confusing failures. This Skill provides structured guidance for every stage of working with Neon Postgres. ## Core Features & Use Cases - Setup and Connection Guidance: Walks through selecting projects, retrieving connection strings via CLI or MCP, and choosing the right driver (Drizzle, node-postgres, @neondatabase/serverless) for Vercel, Cloudflare, or edge runtimes. - Pooled vs Direct Connection Rules: Explains when to use the -pooler hostname versus the direct URL, preventing errors like failed migrations, broken SET session state, and read-only transaction issues. - Platform Feature Coverage: Documents branching, schema migrations, autoscaling, scale-to-zero, instant restore, read replicas, connection pooling, IP allow lists, and logical replication. - Use Case: You are deploying a serverless app on Vercel with Drizzle ORM. Use this Skill to get the correct pooled DATABASE_URL for queries, the direct URL for Drizzle Kit migrations, and a branch of production to test the migration safely first. ## Quick Start Ask the AI to help you connect your application to a Neon Postgres database with the correct driver and connection string for your deployment platform.

Frequently Asked Questions about neon-postgres

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect to a Neon Postgres database?▼

Use the Neon CLI or MCP server to select your project and retrieve the connection string, then store it as DATABASE_URL in your .env file. Pair it with an ORM like Drizzle and pick a driver based on your runtime, such as @neondatabase/serverless for edge environments.

Should I use pooled or direct connection for Neon migrations?▼

Always use the direct (non-pooled) connection string for schema migrations, pg_dump, logical replication, and LISTEN/NOTIFY. The pooled connection routes through PgBouncer in transaction mode, which breaks session-level operations and causes obscure migration failures.

Which Postgres driver should I use on Vercel or Cloudflare?▼

On Vercel, use node-postgres (pg) with Fluid compute and attachDatabasePool from @vercel/functions. On Cloudflare, use node-postgres with Hyperdrive. For other serverless or edge runtimes like Netlify, use the @neondatabase/serverless driver.

Why does my Neon migration fail with prepared statement errors?▼

Errors like prepared statement already exists happen when migrations run over the pooled -pooler connection through PgBouncer. Point your migration tool at the direct URL, such as Prisma's directUrl, while keeping the pooled string for application queries.

Does Neon scale to zero and what is the cold start cost?▼

Yes, idle Neon computes suspend automatically after a default of 5 minutes, and the timeout is configurable. The first query after suspension typically incurs a cold-start penalty of around hundreds of milliseconds, while storage remains active.

How do I test a schema migration safely on Neon?▼

Create an instant copy-on-write branch of production using the Neon CLI or MCP server, then run the migration against that branch with production-like data. Apply it to production only after the branch test succeeds, using a direct connection.