neon-postgres

Configure, connect, and diagnose Neon serverless Postgres databases including branching, migrations, and search.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/Abhi-0930/online--lms --skill neon-postgres-abhi-0930
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: neon-postgres
Source: https://github.com/Abhi-0930/online--lms/tree/main/backend/.agents/skills/neon-postgres
Command: npx skills add https://github.com/Abhi-0930/online--lms --skill neon-postgres-abhi-0930

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Working with Neon serverless Postgres involves platform-specific decisions—pooled versus direct connections, branching workflows, autoscaling, scale-to-zero, and Neon-specific diagnostics—that generic Postgres knowledge does not cover. This Skill provides the operational guidance to set up, connect, migrate, troubleshoot, and extend a Neon database correctly. ## Core Features & Use Cases - Setup and Connection Guidance: Walks through selecting projects, obtaining connection strings, choosing pooled vs direct connections, and picking the right driver (node-postgres, @neondatabase/serverless) for Vercel, Cloudflare, and other runtimes. - Branching, Migrations, and Diagnostics: Covers copy-on-write branches, testing migrations on production-like branches with direct connections, and running read-only diagnostic checks via neon inspect db or the MCP inspect_database tool. - Lakebase Search: Implements semantic vector search with lakebase_vector, full-text BM25 search with lakebase_text, and hybrid search using Reciprocal Rank Fusion. - Use Case: A developer deploying a Next.js app on Vercel needs a Postgres database. Use this Skill to create a Neon project, store the pooled DATABASE_URL, run Drizzle migrations over the direct connection, and later diagnose slow queries with neon inspect db outliers. ## Quick Start Ask the AI to set up a Neon Postgres project, get the connection string into your .env file, and recommend the right driver 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?▼

Get the connection string using the Neon CLI, neon env pull, or the MCP server, then store it as DATABASE_URL in your .env file. Choose a driver based on your runtime, such as node-postgres on Vercel or @neondatabase/serverless for edge environments.

When should I use pooled vs direct Neon connections?▼

Use the pooled connection (hostname with -pooler suffix) for web applications and serverless functions. Use the direct connection for schema migrations, pg_dump/pg_restore, logical replication, LISTEN/NOTIFY, and anything relying on session state like SET.

Why does Prisma Migrate fail with prepared statement errors on Neon?▼

This happens when migrations run over the pooled PgBouncer connection in transaction mode, which does not support session-level operations. Point Prisma's directUrl at the unpooled connection string while keeping the pooled URL for application traffic.

How do I diagnose slow queries in Neon Postgres?▼

Run neon inspect db checks such as outliers for cumulative time, long-running-queries for active statements, or lfc-hit-rate for cache behavior. For per-query cache metrics, use EXPLAIN (ANALYZE, BUFFERS, PREFETCH, FILECACHE) on read-only queries.

Does Neon support vector and full-text search?▼

Yes, Lakebase Search on Postgres 16+ provides lakebase_vector for approximate nearest-neighbor search and lakebase_text for BM25-ranked full-text search. Hybrid search combines both retrievers using fusion strategies like Reciprocal Rank Fusion.

What are the limitations of Neon scale to zero?▼

Idle computes suspend after a default of 5 minutes, and the first query after suspension incurs a cold-start penalty of around hundreds of milliseconds. Disabling suspension is only available on the Launch and Scale plans, and statistics reset on restart.