Skip to content
Skills Library
Programming · Building & coding

neon

/neon

Use when working with Neon serverless Postgres, branching, connection pooling, pgvector, pg_trgm, SQL queries, and edge-friendly database access.

Licence
MIT
Last repository change
11.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.

Licence

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

  1. When to Use
  2. Core Patterns
  3. Key Features
Original SKILL.md headings · 84 lines, 368 words
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

RepositoryScoreLicence
This page · LineLuLan/line-harness100MIT
jaakla/open-gis100MIT
ericrisco/rsc-harness100MIT
TerminalSkills/skills100Apache-2.0
jmanuelrosa/agent-catalog100MIT
G1Joshi/Agent-Skills100MIT
neondatabase/agent-skills95Apache-2.0
neondatabase/agent-skills95Apache-2.0
AbdulbosidCoder/ai-team95MIT

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…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.