neondatabase avatar

Neon Serverless

This sets up Neon's serverless driver for environments where traditional Postgres clients choke, like Vercel Edge Functions or AWS Lambda. You get two connection modes: HTTP for true edge/serverless (the recommended default) and WebSocket pooling for longer-lived Node.js processes. The skill checks your tsconfig for path aliases before generating imports, which is a nice touch that saves you from fixing them manually. It includes working API route examples and a connection validator script. If you're building on Next.js or deploying to the edge and need Postgres access, this handles the setup without the usual serverless database headaches.

skills.sh installs
285
GitHub stars
86
last updated
Jun 3, 2026

Install

$ npx -y skills add neondatabase/ai-rules --skill neon-serverless --agent claude-code

Installs into .claude/skills of the current project.

Files

Neon Serverless Skill

Configures the Neon Serverless Driver for optimal performance in serverless and edge computing environments.

When to Use

  • Setting up connections for edge functions (Vercel Edge, Cloudflare Workers)
  • Configuring serverless APIs (AWS Lambda, Google Cloud Functions)
  • Optimizing for low-latency database access
  • Implementing connection pooling for high-throughput apps

Not recommended for: Complex multi-statement transactions (use WebSocket Pool), persistent servers (use native PostgreSQL drivers), or offline-first applications.

Code Generation Rules

When generating TypeScript/JavaScript code:

  • BEFORE generating import statements, check tsconfig.json for path aliases (compilerOptions.paths)
  • If path aliases exist (e.g., "@/": ["./src/"]), use them (e.g., import { x } from '@/lib/utils')
  • If NO path aliases exist or unsure, ALWAYS use relative imports (e.g., import { x } from '../../../lib/utils')
  • Verify imports match the project's configuration
  • Default to relative imports - they always work regardless of configuration

Reference Documentation

Sponsors

Details

Repository
github.com/neondatabase/ai-rules
Categories
AI & Agent Building, Cloud & Infrastructure, Databases
First seen
Jun 3, 2026

More from neondatabase/ai-rules

All 3
1thedivergentai avatargodot-genre-roguelikethedivergentai/gd-agentic-skillsExpert blueprint for roguelikes including procedural generation (Walker method, BSP rooms), permadeath with meta-progression (unlock persistence), run state vs 285skills.sh installs
2jwynia avatarmedia-meta-analysisjwynia/agent-skillsSynthesize multiple media analyses into cross-source patterns and insights. Use when you need to cross-reference analyses, find patterns across sources, or perf284skills.sh installs
3tuist avatarcompare-cache-runstuist/agent-skillsCompares two `tuist cache` runs to identify cache hit rate changes and root-cause analysis of cache invalidation. Can be invoked with cache run IDs, dashboard U284skills.sh installs
4gohypergiant avataraccelint-react-testinggohypergiant/agent-skillsUse when writing, reviewing, or refactoring React component tests with Testing Library. Load when you see render(), screen, fireEvent, userEvent, waitFor, or *.282skills.sh installs
5meleantonio avatarbeamer-presentationmeleantonio/awesome-econ-ai-stuffCreate academic presentations in Beamer with professional themes282skills.sh installs
6sergiodxa avatarruby-on-rails-best-practicessergiodxa/agent-skillsRuby on Rails architecture and coding patterns from Basecamp. Use when writing, reviewing, or refactoring Rails code to follow proven conventions for models, co282skills.sh installs