neon-drizzle

Automates Drizzle ORM integration with Neon Postgres, including migrations and type-safe schemas.

86|12|Updated Mar 4, 2025
One-click install
npx skills add https://github.com/neondatabase-labs/ai-rules --skill neon-drizzle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neon-drizzle
Source: https://github.com/neondatabase-labs/ai-rules/tree/main/neon-plugin/skills/neon-drizzle
Command: npx skills add https://github.com/neondatabase-labs/ai-rules --skill neon-drizzle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires drizzle-orm, @neondatabase/serverless, drizzle-kit, dotenv, ws, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Setting up and managing Drizzle ORM with Neon Postgres, especially for migrations and schema changes, can be intricate. This Skill streamlines the entire process, from initial project setup to complex schema modifications, ensuring your database interactions are type-safe and efficient without manual configuration headaches.

Core Features & Use Cases

  • Guided Setup: Provides step-by-step guides for new projects, existing project integration, and schema-only workflows.
  • Automated Migrations: Generates and applies database migrations from schema changes.
  • Connection Adapters: Configures Drizzle with the correct Neon adapter (HTTP for edge, WebSocket for Node.js).
  • Use Case: Start a new Next.js project with Drizzle ORM and Neon, letting the AI handle dependency installation, configuration, schema generation, and migration scripts, so you can focus on building your application logic.

Quick Start

Example: Generate Drizzle migrations

npx drizzle-kit generate

Example: Apply pending migrations

export DATABASE_URL="your_neon_url" &&
npx drizzle-kit migrate

Frequently Asked Questions about neon-drizzle

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

FAQPage Schema
How do I set up Drizzle ORM with a Neon database?

Drizzle ORM setup with Neon involves provisioning a Neon Postgres database, installing dependencies like drizzle-orm and @neondatabase/serverless, configuring your connection string, and generating a schema. This Skill automates those steps end-to-end, including dependency installation and adapter selection based on your runtime environment.

Can I use Drizzle ORM migrations with Neon in a Next.js project?

Yes. Drizzle migrations work with Neon in Next.js by generating migration files from schema changes and applying them via drizzle-kit commands. This Skill handles the full workflow—schema generation, migration creation, and execution—across Next.js, Vite, Express, and Node.js servers.

What's the difference between HTTP and WebSocket adapters for Neon with Drizzle?

HTTP adapters suit edge environments and serverless functions; WebSocket adapters work for Node.js servers requiring persistent connections. This Skill configures the correct adapter automatically based on your project type, ensuring optimal performance and compatibility.

How do I generate and apply database migrations with Drizzle and Neon?

Generate migrations by running `npx drizzle-kit generate` after schema changes, then apply them with `npx drizzle-kit migrate` against your Neon database URL. This Skill automates both steps and ensures your schema changes propagate reliably across environments.

Can I integrate Drizzle ORM into an existing application using Neon?

Yes. This Skill supports integration into existing apps by setting up Drizzle dependencies, provisioning Neon credentials, configuring the connection, and generating type-safe schemas without disrupting your current codebase.

Do I need prior database experience to use Drizzle ORM with Neon?

No. This Skill provides guided setup and automates configuration, schema generation, and migrations, letting you work with type-safe ORM patterns without manual SQL or database provisioning knowledge.