This covers the practical stuff for working with Neon's serverless Postgres: how to set up Prisma with both pooled and direct connections (you need both because migrations won't work through the pooler), configuring Drizzle with either the HTTP or WebSocket driver depending on whether you need transactions, and understanding PgBouncer's 10K connection limit. The patterns are solid and specific about when to use what. The sharp edges table exists but is just placeholder text, so you're on your own for gotchas. If you're deploying Postgres in a serverless context or want to use database branching for preview environments, this gets you oriented quickly.

skills.sh installs
206
GitHub stars
33.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add davila7/claude-code-templates --skill neon-postgres --agent claude-code

Installs into .claude/skills of the current project.

Files

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

Sponsors

Details

Repository
github.com/davila7/claude-code-templates
Categories
Backend & APIs, Cloud & Infrastructure, Databases
First seen
Jun 3, 2026

More from davila7/claude-code-templates

All 618
1yonatangross avatarimplementyonatangross/orchestkitFull-power feature implementation using parallel subagents for backend, frontend, testing, and security, with worktree isolation and quality verification in one206skills.sh installs
2davila7 avatarplaid-fintechdavila7/claude-code-templatesExpert patterns for Plaid API integration including Link token flows, transactions sync, identity verification, Auth for ACH, balance checks, webhook handling, 204skills.sh installs
3harperaa avatarsecurity-promptsharperaa/secure-claude-skillsLibrary of battle-tested security prompt templates for secure feature implementation. Use when implementing forms, endpoints, authentication, authorization, fil193skills.sh installs
4markpitt avatarazure-devopsmarkpitt/claude-skillsComprehensive skill for working with Azure DevOps REST API across all services including Boards (work items, queries, backlogs), Repos (Git, pull requests, comm191skills.sh installs
5yonatangross avatarmcp-patternsyonatangross/orchestkitMCP server building, advanced patterns, and security hardening. Use when building MCP servers, implementing tool handlers, choosing a transport, adding OAuth au190skills.sh installs
6julianobarbosa avatarcloudflare-dnsjulianobarbosa/claude-code-skillsComprehensive guide for managing Cloudflare DNS with Azure integration. Use when configuring Cloudflare as authoritative DNS provider for Azure-hosted applicati186skills.sh installs