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:
Create a Neon project and obtain the pooled connection string
Install @neondatabase/serverless and drizzle-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 (-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.
1---2name: neon3description: Neon4---5# Neon67## Overview89Neon 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.1011## Instructions1213- 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.14- 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.15- When deploying to edge runtimes (Cloudflare Workers, Vercel Edge), use `@neondatabase/serverless` which communicates over HTTP instead of TCP sockets.16- 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.17- When enabling AI features, install the `pgvector` extension at project creation for vector embeddings and ANN search.18- 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.19- When running migrations, apply them on the main branch so feature branches inherit schema changes automatically.2021## Examples2223### Example 1: Set up Neon with Drizzle ORM for a Next.js app2425**User request:** "Connect my Next.js project to Neon using Drizzle ORM"2627**Actions:**281. Create a Neon project and obtain the pooled connection string292. Install `@neondatabase/serverless` and `drizzle-orm`303. Configure Drizzle with the Neon serverless adapter314. Define schema and run initial migration on the main branch3233**Output:** A type-safe database layer using Drizzle with Neon that works in both server components and edge functions.3435### Example 2: Set up branch-per-PR workflow3637**User request:** "Automatically create a database branch for each pull request"3839**Actions:**401. Configure Neon-Vercel integration for automatic branch creation412. Set up CI script using `neonctl branches create --name pr-$PR_NUMBER`423. Pass branch connection string as environment variable to preview deployment434. Add cleanup step to delete branch when PR is closed4445**Output:** An isolated database branch for each PR with automatic lifecycle management.4647## Guidelines4849- Always use the pooled connection string (`-pooler` suffix) for serverless functions to avoid exhausting connection limits.50- Use `@neondatabase/serverless` for edge runtimes; use standard `pg` for long-running Node.js servers.51- Create database branches for each feature or PR; never develop against the main branch.52- Enable `pgvector` extension at project creation if vector search will be needed.53- Set `autosuspend_delay` to 300s for dev and 0 for production.54- Use Drizzle or Prisma with the Neon adapter; use raw SQL only for complex queries and migrations.55- Run migrations on the main branch; feature branches inherit schema automatically.
Run npx skillmds@latest add comeonoliver/neon in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Neon It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
ComeOnOliver (@comeonoliver) published this skill. Their other Agent Skills are listed on their SkillMD profile.