Neon Database

Implement serverless PostgreSQL with Neon and Kysely for Cloudflare Workers.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/captjay98/livestockai --skill neon-database
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Neon Database
Source: https://github.com/captjay98/livestockai/tree/main/.kiro/skills/neon-database
Command: npx skills add https://github.com/captjay98/livestockai --skill neon-database

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Neon Database enables a serverless PostgreSQL pattern for LivestockAI, providing scalable data persistence without managing database servers.

Core Features & Use Cases

  • Serverless PostgreSQL integration with Neon
  • Type-safe queries via Kysely
  • getDb() pattern for Cloudflare Workers and singleton connections across runtimes
  • Guidance for seeds, migrations, and schema exposure

Quick Start

Run the Neon-based serverless database pattern in your Cloudflare Worker project by integrating getDb() and wiring Neon connection strings with environment bindings.

Frequently Asked Questions about Neon Database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a serverless PostgreSQL database to Cloudflare Workers?▼

You can connect serverless PostgreSQL to Cloudflare Workers by using the getDb() pattern with Neon, wiring connection strings via environment bindings to maintain a singleton DB instance across serverless runtimes.

Can I use Kysely for type-safe queries with Neon PostgreSQL?▼

Yes, Kysely integrates with Neon PostgreSQL to provide type-safe queries, enforcing schema types during database operations within your serverless environment.

What is the best way to run database migrations and seeds for a serverless PostgreSQL setup?▼

Run database migrations and seeds for serverless PostgreSQL using CLI scripts, establishing a documented schema and migration workflow that prepares the database before runtime access.

Does Neon serverless PostgreSQL require environment bindings for Cloudflare Workers?▼

Yes, Neon serverless PostgreSQL requires environment bindings for Cloudflare Workers to securely manage connection strings and enforce environment variable handling during database access.

Why use a singleton DB instance in a serverless PostgreSQL architecture?▼

Use a singleton DB instance in serverless PostgreSQL architecture to optimize connection pooling across runtime invocations, ensuring a consistent database connection without establishing new clients.