Skip to content
Skillv1.0.0

neon

Assists with building applications using Neon serverless PostgreSQL. Use when setting up serverless databases, creating branches for development workflows, integrating with edge runtimes, or configuri

by terminalskills(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from terminalskills/skills (skills/neon/SKILL.md). Install upstream with npx skills add terminalskills/skills --skill neon. Copyright stays with the author (Apache-2.0).

Neon

Overview

Neon provides serverless PostgreSQL with scale-to-zero compute, database branching, and an HTTP-based driver for edge runtimes. It offers full PostgreSQL compatibility including extensions like pgvector, with features like copy-on-write branching for development workflows and automatic preview deployment databases.

Instructions

  • When setting up connections, use the pooled connection string (-pooler suffix) for serverless functions and the direct connection string for long-running Node.js servers.
  • When creating development workflows, use database branching (neon branches create) to give each feature or PR its own isolated database that inherits schema from the parent branch.
  • When deploying to edge runtimes (Cloudflare Workers, Vercel Edge), use @neondatabase/serverless which communicates over HTTP instead of TCP sockets.
  • When integrating with ORMs, use @prisma/adapter-neon for Prisma or drizzle-orm/neon-serverless for Drizzle, and reserve raw SQL for complex queries and migrations.
  • When enabling AI features, install the pgvector extension at project creation for vector embeddings and ANN search.
  • When configuring scaling, set autosuspend_delay to 300s for development and 0 (never suspend) for production, and configure compute autoscaling between 0.25 and 8 CU.
  • When running migrations, apply them on the main branch so feature branches inherit schema changes automatically.

Examples

Example 1: Set up Neon with Drizzle ORM for a Next.js app

User request: "Connect my Next.js project to Neon using Drizzle ORM"

Actions:

  1. Create a Neon project and obtain the pooled connection string
  2. Install @neondatabase/serverless and drizzle-orm
  3. Configure Drizzle with the Neon serverless adapter
  4. Define schema and run initial migration on the main branch

Output: A type-safe database layer using Drizzle with Neon that works in both server components and edge functions.

Example 2: Set up branch-per-PR workflow

User request: "Automatically create a database branch for each pull request"

Actions:

  1. Configure Neon-Vercel integration for automatic branch creation
  2. Set up CI script using neonctl branches create --name pr-$PR_NUMBER
  3. Pass branch connection string as environment variable to preview deployment
  4. Add cleanup step to delete branch when PR is closed

Output: An isolated database branch for each PR with automatic lifecycle management.

Guidelines

  • Always use the pooled connection string (-pooler suffix) for serverless functions to avoid exhausting connection limits.
  • Use @neondatabase/serverless for edge runtimes; use standard pg for long-running Node.js servers.
  • Create database branches for each feature or PR; never develop against the main branch.
  • Enable pgvector extension at project creation if vector search will be needed.
  • Set autosuspend_delay to 300s for dev and 0 for production.
  • Use Drizzle or Prisma with the Neon adapter; use raw SQL only for complex queries and migrations.
  • Run migrations on the main branch; feature branches inherit schema automatically.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/terminalskills-skills-neon/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

terminalskills-skills-neon.ocm.jsonjson
{
  "ocm": "1",
  "id": "terminalskills-skills-neon",
  "kind": "skill",
  "name": "neon",
  "description": "Assists with building applications using Neon serverless PostgreSQL. Use when setting up serverless databases, creating branches for development workflows, integrating with edge runtimes, or configuring Prisma/Drizzle with Neon. Trigger words: neon, serverless postgres, database branching, neon serverless driver, pgvector, neon database.",
  "publisher": "terminalskills",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "neon",
      "postgresql",
      "serverless",
      "database",
      "branching",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Assists with building applications using Neon serverless PostgreSQL. Use when setting up serverless databases, creating branches for development workflows, integrating with edge runtimes, or configuring Prisma/Drizzle with Neon. Trigger words: neon, serverless postgres, database branching, neon serverless driver, pgvector, neon database."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/terminalskills/skills",
      "path": "skills/neon/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/terminalskills/skills/blob/HEAD/skills/neon/SKILL.md",
      "key": "terminalskills/skills/skills/neon/SKILL.md"
    },
    "compatibility": "Works with any PostgreSQL client; edge driver for serverless runtimes",
    "license": "Apache-2.0"
  },
  "instructions": "# Neon\n\n## Overview\n\nNeon provides serverless PostgreSQL with scale-to-zero compute, database branching, and an HTTP-based driver for edge runtimes. It offers full PostgreSQL compatibility including extensions like pgvector, with features like copy-on-write branching for development workflows and automatic preview deployment databases.\n\n## Instructions\n\n- When setting up connections, use the pooled connection string (`-pooler` suffix) for serverless functions and the direct connection string for long-running Node.js servers.\n- When creating development workflows, use database branching (`neon ",
  "cost": {
    "context_tokens": 784
  }
}

Fetch it by URL: GET /api/v1/registry/terminalskills-skills-neon/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.