neon
/neon
Use when working with Neon serverless Postgres, branching, connection pooling, pgvector, pg_trgm, SQL queries, and edge-friendly database access.
- Author
- LineLuLan ↗
- Repository
- line-harness ↗
- Licence
- MIT
- Last repository change
- 11.11.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when working with Neon serverless Postgres, branching, connection pooling, pgvector, pg_trgm, SQL queries, and edge-friendly database access.
Original author description
Use when working with Neon serverless Postgres, branching, connection pooling, pgvector, pg_trgm, SQL queries, and edge-friendly database access.
How it works
- When to Use
- Core Patterns
- Key Features
SKILL.md preview
---
name: neon
description: "Use when working with Neon serverless Postgres, branching, connection pooling, pgvector, pg_trgm, SQL queries, and edge-friendly database access."
verified: 2026-08
---
# Neon
> Serverless Postgres — autoscaling, branching, and HTTP-accessible with zero cold starts.
## When to Use
- Serverless/edge Postgres (Vercel, Cloudflare Workers, Lambda)
- Branch-based dev workflows (preview branches per PR)
- Postgres with pgvector (AI embeddings) or pg_trgm (fuzzy search)
- Connection pooling without external infrastructure
## Core Patterns
### Client Setup
```typescript
import { neon } from "@neondatabase/serverless";
const sql = neon(process.env.DATABASE_URL!);
// Single query — tagged template (returns rows directly)
const users = await sql`SELECT * FROM users WHERE id = ${userId}`;
// Parameterized
const results = await sql`
SELECT * FROM posts WHERE title ILIKE ${"%" + query + "%"} LIMIT ${limit}
`;
```
### Transactions
```typescript
import { neon } from "@neondatabase/serverless";
const sql = neon(process.env.DATABASE_URL!);
const tx = sql.transaction([
sql`UPDATE accounts SET balance = balance - ${amount} WHERE id = ${from}`,
sql`UPDATE accounts SET balance = balance + ${amount} WHERE id = ${to}`,
]);
await tx; // atomic — all or nothing
```
### WebSocket (Long-lived / Node.js)
```typescript
import { Pool } from "@neondatabase/serverless";
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
const { rows } = await pool.query("SELECT * FROM users WHERE id = $1", [userId]);
await pool.end();
```
### Drizzle Integration
```typescript
import { neon } from "@neondatabase/serverless";
import { drizzle } from "drizzle-orm/neon-http";
const sql = neon(process.env.DATABASE_URL!);
const db = drizzle(sql);
const users = await db.select().from(usersTable).where(eq(usersTable.id, id));
```
### Prisma Integration
```prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL") // pooled connection
directUrl = env("DIRECT_URL") // direct for migrations
}
```
## Key Features
- **Branching**: `neonctl branches create --name preview/pr-42` — instant DB copies for dev/preview
- **Autoscaling**: Scales compute 0.25–8 CU; scales to zero on inactivity
- **Connection pooling**: Built-in PgBouncer — use pooled URL for serverless
- **pg_trgm**: `CREATE EXTENSION pg_trgm;` — fuzzy text search with GIN indexes
- **pgvector**: `CREATE EXTENSION vector;` — embeddings with HNSW/IVFFlat indexes
- **HTTP driver**: Stateless SQL over HTTPS — ideal for edge/serverless (one round-trip per query)
### CLI
```bash
neonctl projects create --name myapp # Create project
neonctl branches create --name staging # Branch from main
neonctl branches reset staging # Reset branch to parent
neonctl connection-string --branch main # Get connection URL
```
Files in this package (2)
- SKILL.md 3 KB
- agents/openai.yaml 1 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · LineLuLan/line-harness | 100 | MIT |
| jaakla/open-gis | 100 | MIT |
| ericrisco/rsc-harness | 100 | MIT |
| TerminalSkills/skills | 100 | Apache-2.0 |
| jmanuelrosa/agent-catalog | 100 | MIT |
| G1Joshi/Agent-Skills | 100 | MIT |
| neondatabase/agent-skills | 95 | Apache-2.0 |
| neondatabase/agent-skills | 95 | Apache-2.0 |
| AbdulbosidCoder/ai-team | 95 | MIT |
Database snapshot: 13.11.2026 · package version b09fae61e472 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90neon-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. - 90neon-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... - 100neon-drizzle-stinger
Neon Postgres and Drizzle ORM on SvelteKit/Vercel: connections, schema, migrations, branching, query patterns, pgvector, RLS, and migrating off Supabase. Use for any Neon or Drizzle task. - 90neon-postgres
Neon facts for this project's database (dev and live branches, pooling, cold starts, restore). Use for questions about Neon itself. - 100neon-postgres
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… - 100neon-postgres
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…