Skills neon
install
source · Clone the upstream repo
git clone https://github.com/TerminalSkills/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/TerminalSkills/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/neon" ~/.claude/skills/terminalskills-skills-neon && rm -rf "$T"
manifest:
skills/neon/SKILL.mdsource content
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 (
suffix) for serverless functions and the direct connection string for long-running Node.js servers.-pooler - When creating development workflows, use database branching (
) to give each feature or PR its own isolated database that inherits schema from the parent branch.neon branches create - When deploying to edge runtimes (Cloudflare Workers, Vercel Edge), use
which communicates over HTTP instead of TCP sockets.@neondatabase/serverless - When integrating with ORMs, use
for Prisma or@prisma/adapter-neon
for Drizzle, and reserve raw SQL for complex queries and migrations.drizzle-orm/neon-serverless - When enabling AI features, install the
extension at project creation for vector embeddings and ANN search.pgvector - When configuring scaling, set
to 300s for development and 0 (never suspend) for production, and configure compute autoscaling between 0.25 and 8 CU.autosuspend_delay - 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:
- Create a Neon project and obtain the pooled connection string
- Install
and@neondatabase/serverlessdrizzle-orm - Configure Drizzle with the Neon serverless adapter
- 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:
- Configure Neon-Vercel integration for automatic branch creation
- Set up CI script using
neonctl branches create --name pr-$PR_NUMBER - Pass branch connection string as environment variable to preview deployment
- 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 (
suffix) for serverless functions to avoid exhausting connection limits.-pooler - Use
for edge runtimes; use standard@neondatabase/serverless
for long-running Node.js servers.pg - Create database branches for each feature or PR; never develop against the main branch.
- Enable
extension at project creation if vector search will be needed.pgvector - Set
to 300s for dev and 0 for production.autosuspend_delay - 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.