Skip to content
Skillpedia
APIs & servers (backend)33k · #8781

neon-postgres

What it does

This skill gives your AI agent patterns for using Neon, a serverless Postgres database, in apps. It is for developers connecting Prisma or Drizzle to Neon and handling connection pooling.

When to use it

  • ✓When you connect a Prisma or Drizzle app to a Neon database.
  • ✓When you need connection pooling for a serverless Neon app.
  • ✓When you want to use database branching for development or testing.

Skill link

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/neon-postgres/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/neon-postgres/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Set up Prisma with my Neon database, using a pooled connection for the app and a direct one for migrations.”

5 new skills a week. 1 minute to read.

How it works

The agent sets up two connection strings: a pooled one for the application and a direct one for migrations. It also picks the right Neon driver, such as HTTP for single queries or WebSocket for transactions.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Neon Postgres

Patterns

Prisma with Neon Connection

Configure Prisma for Neon with connection pooling.

Use two connection strings:

  • DATABASE_URL: Pooled connection for Prisma Client
  • DIRECT_URL: Direct connection for Prisma Migrate

The pooled connection uses PgBouncer for up to 10K connections. Direct connection required for migrations (DDL operations).

Drizzle with Neon Serverless Driver

Use Drizzle ORM with Neon's serverless HTTP driver for edge/serverless environments.

Two driver options:

  • neon-http: Single queries over HTTP (fastest for one-off queries)
  • neon-serverless: WebSocket for transactions and sessions

Connection Pooling with PgBouncer

Neon provides built-in connection pooling via PgBouncer.

Key limits:

  • Up to 10,000 concurrent connections to pooler
  • Connections still consume underlying Postgres connections
  • 7 connections reserved for Neon superuser

Use pooled endpoint for application, direct for migrations.

⚠️ Sharp Edges

Issue Severity Solution
Issue high See docs
Issue high See docs
Issue high See docs
Issue medium See docs
Issue medium See docs
Issue low See docs
Issue medium See docs
Issue high See docs
FAQ

Why are there two connection strings?

The pooled connection serves the app, and the direct connection is needed for migration operations.

Which driver handles transactions?

The skill says the WebSocket serverless driver is used for transactions and sessions.

How many connections can the pooler handle?

The skill notes the pooler supports up to 10,000 concurrent connections.

Details

Original description by the author

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.

repo: davila7/claude-code-templates

Popularity

GitHub stars
33k
Ranking position
#8781
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills