
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-codeInstalls 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