Neon — Serverless Postgres

You are an expert in Neon, the serverless Postgres platform. You help developers use fully managed PostgreSQL with instant database branching, autoscaling to zero, edge-compatible HTTP driver, connection pooling, and point-in-time recovery — enabling development workflows where each PR gets its own database branch and production scales automatically based on load.

25 stars

Best use case

Neon — Serverless Postgres is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

You are an expert in Neon, the serverless Postgres platform. You help developers use fully managed PostgreSQL with instant database branching, autoscaling to zero, edge-compatible HTTP driver, connection pooling, and point-in-time recovery — enabling development workflows where each PR gets its own database branch and production scales automatically based on load.

Teams using Neon — Serverless Postgres should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/neon-serverless/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/TerminalSkills/skills/neon-serverless/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/neon-serverless/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Neon — Serverless Postgres Compares

Feature / AgentNeon — Serverless PostgresStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

You are an expert in Neon, the serverless Postgres platform. You help developers use fully managed PostgreSQL with instant database branching, autoscaling to zero, edge-compatible HTTP driver, connection pooling, and point-in-time recovery — enabling development workflows where each PR gets its own database branch and production scales automatically based on load.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Neon — Serverless Postgres

You are an expert in Neon, the serverless Postgres platform. You help developers use fully managed PostgreSQL with instant database branching, autoscaling to zero, edge-compatible HTTP driver, connection pooling, and point-in-time recovery — enabling development workflows where each PR gets its own database branch and production scales automatically based on load.

## Core Capabilities

### Connection

```typescript
// Standard Postgres driver (Node.js)
import { Pool } from "@neondatabase/serverless";

const pool = new Pool({ connectionString: process.env.DATABASE_URL });

const { rows } = await pool.query(
  "SELECT * FROM users WHERE email = $1",
  ["alice@example.com"],
);

// HTTP driver (works on Edge/Serverless — no TCP needed)
import { neon } from "@neondatabase/serverless";

const sql = neon(process.env.DATABASE_URL);

// Tagged template queries
const users = await sql`SELECT * FROM users WHERE role = ${role} LIMIT ${limit}`;
const [user] = await sql`INSERT INTO users (name, email) VALUES (${name}, ${email}) RETURNING *`;

// Transaction
const results = await sql.transaction([
  sql`INSERT INTO orders (user_id, total) VALUES (${userId}, ${total}) RETURNING id`,
  sql`UPDATE users SET order_count = order_count + 1 WHERE id = ${userId}`,
]);
```

### With Drizzle ORM

```typescript
import { drizzle } from "drizzle-orm/neon-http";
import { neon } from "@neondatabase/serverless";
import { users, posts } from "./schema";

const sql = neon(process.env.DATABASE_URL);
const db = drizzle(sql);

// Type-safe queries
const allUsers = await db.select().from(users).where(eq(users.role, "admin"));

const userWithPosts = await db
  .select()
  .from(users)
  .leftJoin(posts, eq(users.id, posts.authorId))
  .where(eq(users.id, userId));
```

### Database Branching

```bash
# Create branch for PR (instant, copy-on-write)
neonctl branches create --name pr-42 --parent main

# Each branch gets its own connection string
DATABASE_URL=$(neonctl connection-string pr-42)

# Run migrations on branch
npx drizzle-kit push --url $DATABASE_URL

# Delete after PR merge
neonctl branches delete pr-42

# Point-in-time restore
neonctl branches create --name recovery --parent main --restore-point "2026-03-12T10:00:00Z"
```

## Installation

```bash
npm install @neondatabase/serverless
npm install -g neonctl                    # CLI for branch management
```

## Best Practices

1. **HTTP driver on edge** — Use `@neondatabase/serverless` HTTP driver on Vercel Edge, CF Workers; no TCP needed
2. **Branch per PR** — Create database branches for preview environments; instant, zero-cost copies
3. **Autoscale to zero** — Neon suspends compute after inactivity; pay only when queries run
4. **Connection pooling** — Use pooled connection string (`-pooler` suffix) for serverless; prevents connection exhaustion
5. **Drizzle integration** — Use Drizzle ORM with Neon HTTP driver; full type safety, edge-compatible
6. **Point-in-time recovery** — Branch from any point in history; debug production issues on isolated copy
7. **Postgres extensions** — Use pgvector, PostGIS, pg_trgm; Neon supports standard Postgres extensions
8. **Free tier** — 0.5 GB storage, autoscaling compute; enough for side projects and prototyping

Related Skills

scaffolding-oracle-to-postgres-migration-test-project

25
from ComeOnOliver/skillshub

Scaffolds an xUnit integration test project for validating Oracle-to-PostgreSQL database migration behavior in .NET solutions. Creates the test project, transaction-rollback base class, and seed data manager. Use when setting up test infrastructure before writing migration integration tests, or when a test project is needed for Oracle-to-PostgreSQL validation.

reviewing-oracle-to-postgres-migration

25
from ComeOnOliver/skillshub

Identifies Oracle-to-PostgreSQL migration risks by cross-referencing code against known behavioral differences (empty strings, refcursors, type coercion, sorting, timestamps, concurrent transactions, etc.). Use when planning a database migration, reviewing migration artifacts, or validating that integration tests cover Oracle/PostgreSQL differences.

postgresql-code-review

25
from ComeOnOliver/skillshub

PostgreSQL-specific code review assistant focusing on PostgreSQL best practices, anti-patterns, and unique quality standards. Covers JSONB operations, array usage, custom types, schema design, function optimization, and PostgreSQL-exclusive security features like Row Level Security (RLS).

planning-oracle-to-postgres-migration-integration-testing

25
from ComeOnOliver/skillshub

Creates an integration testing plan for .NET data access artifacts during Oracle-to-PostgreSQL database migrations. Analyzes a single project to identify repositories, DAOs, and service layers that interact with the database, then produces a structured testing plan. Use when planning integration test coverage for a migrated project, identifying which data access methods need tests, or preparing for Oracle-to-PostgreSQL migration validation.

migrating-oracle-to-postgres-stored-procedures

25
from ComeOnOliver/skillshub

Migrates Oracle PL/SQL stored procedures to PostgreSQL PL/pgSQL. Translates Oracle-specific syntax, preserves method signatures and type-anchored parameters, leverages orafce where appropriate, and applies COLLATE "C" for Oracle-compatible text sorting. Use when converting Oracle stored procedures or functions to PostgreSQL equivalents during a database migration.

creating-oracle-to-postgres-migration-integration-tests

25
from ComeOnOliver/skillshub

Creates integration test cases for .NET data access artifacts during Oracle-to-PostgreSQL database migrations. Generates DB-agnostic xUnit tests with deterministic seed data that validate behavior consistency across both database systems. Use when creating integration tests for a migrated project, generating test coverage for data access layers, or writing Oracle-to-PostgreSQL migration validation tests.

creating-oracle-to-postgres-migration-bug-report

25
from ComeOnOliver/skillshub

Creates structured bug reports for defects found during Oracle-to-PostgreSQL migration. Use when documenting behavioral differences between Oracle and PostgreSQL as actionable bug reports with severity, root cause, and remediation steps.

creating-oracle-to-postgres-master-migration-plan

25
from ComeOnOliver/skillshub

Discovers all projects in a .NET solution, classifies each for Oracle-to-PostgreSQL migration eligibility, and produces a persistent master migration plan. Use when starting a multi-project Oracle-to-PostgreSQL migration, creating a migration inventory, or assessing which .NET projects contain Oracle dependencies.

electric-postgres-security

25
from ComeOnOliver/skillshub

Pre-deploy security checklist for Postgres with Electric. Checks REPLICATION role, SELECT grants, CREATE on database, table ownership, REPLICA IDENTITY FULL on all synced tables, publication management (auto vs manual with ELECTRIC_MANUAL_TABLE_PUBLISHING), connection pooler exclusion for DATABASE_URL (use direct connection), and ELECTRIC_POOLED_DATABASE_URL for pooled queries. Load before deploying Electric to production or when diagnosing Postgres permission errors.

using-neon

25
from ComeOnOliver/skillshub

Guides and best practices for working with Neon Serverless Postgres. Covers getting started, local development with Neon, choosing a connection method, Neon features, authentication (@neondatabase/auth), PostgREST-style data API (@neondatabase/neon-js), Neon CLI, and Neon's Platform API/SDKs. Use for any Neon-related questions.

postgresql-optimization

25
from ComeOnOliver/skillshub

PostgreSQL database optimization workflow for query tuning, indexing strategies, performance analysis, and production database management.

postgres-best-practices

25
from ComeOnOliver/skillshub

Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.