neon-postgres

Expert patterns for Neon serverless Postgres, branching, connection pooling, and Prisma/Drizzle integration Use when: neon database, serverless postgres, database branching, neon postgres, postgres serverless.

Author

Install

Hot:1

Download and extract to your skills directory

Copy command and send to OpenClaw for auto-install:

Download and install this skill https://openskills.cc/api/download?slug=sickn33-skills-neon-postgres&locale=en&source=copy

Neon Postgres - Serverless PostgreSQL Expert Skills

Skill Overview


Provide expert-level modes and best practices for Neon serverless Postgres, covering database branching, connection pool configuration, and integration approaches with Prisma/Drizzle ORM.

Use Cases


  • Serverless Application Development: Use Neon’s HTTP driver to connect to the database in serverless and edge function environments

  • High-Concurrency Web Apps: Leverage Neon’s built-in PgBouncer connection pool to support up to 10,000 concurrent connections

  • Modern ORM Integration: Seamlessly integrate Prisma or Drizzle ORM with a Neon database
  • Core Features


  • Prisma Connection Pool Configuration: Configure Prisma Client to use the connection pool, and configure Prisma Migrate to use the correct direct-connection approach

  • Drizzle Serverless Driver: Support two modes—HTTP driver (single query) and WebSocket driver (transactions/sessions)

  • Connection Pool Optimization: Use PgBouncer for high-concurrency connections, and understand connection limits and best practices
  • Common Questions

    Does Neon Prisma need two connection strings?


    Yes. Neon + Prisma integration requires two connection strings: DATABASE_URL uses the pool endpoint for Prisma Client’s routine queries, and DIRECT_URL uses the direct endpoint for Prisma Migrate to perform DDL operations. This is because migration operations need a direct connection to the database, and the connection pool (based on PgBouncer) does not support DDL.

    Should Drizzle choose the HTTP or WebSocket driver?


    It depends on your scenario. The Neon HTTP driver is suitable for one-off queries and is the fastest option; the WebSocket driver (neon-serverless) is suitable for scenarios that require transactions and sessions. If you only need simple CRUD operations, the HTTP driver offers better performance; if you need database transactions or multi-step operations, choose the WebSocket driver.

    What are the limitations of Neon connection pools?


    Neon connection pools are based on PgBouncer and support up to 10,000 concurrent connections. However, note that these connections still consume underlying Postgres connections, and 7 connections are reserved for Neon superusers. Applications should use the pool endpoint, while migration operations should use the direct endpoint.