neon-drizzle

Automate Neon database provisioning and Drizzle ORM setup with migrations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Setting up an ORM with a new database, managing schemas, and handling migrations can be complex and error-prone. This Skill streamlines the entire Drizzle ORM integration with Neon, providing guided workflows for new and existing projects, saving developers significant setup time.

Core Features & Use Cases

  • Full Drizzle Setup: Installs Drizzle ORM, configures connections, and sets up schema generation and migration scripts.
  • Guided Workflows: Offers step-by-step guides for new projects, integrating into existing applications, and schema-only development.
  • Adapter Selection: Automatically detects your environment (e.g., Next.js, Node.js) to choose the optimal HTTP or WebSocket database adapter.
  • Use Case: Start a new Next.js project and instantly have a fully configured Drizzle ORM connected to a Neon database, ready for schema definition and type-safe data querying.

Quick Start

Use the neon-drizzle skill to set up Drizzle ORM with Neon for my Next.js blog.

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 for my Next.js project?

Drizzle ORM with Neon automates provisioning and wiring by installing dependencies, configuring credentials, generating schemas, and setting up migrations. The Skill detects your environment and selects the optimal adapter—HTTP for edge/serverless or WebSocket for Node.js—so you get a fully connected, type-safe database ready for queries.

Can I use Drizzle ORM migrations with Neon in an existing application?

Yes, the Skill provides guided workflows for integrating into existing applications. It handles credential provisioning, environment configuration, schema generation, and migration setup without requiring a fresh project start.

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

The Skill automatically selects the adapter based on your deployment context. HTTP adapters suit edge or serverless environments, while WebSocket adapters optimize for Node.js applications, ensuring optimal performance for your runtime.

Do I need to manually configure environment variables for Drizzle and Neon?

The Skill handles environment configuration and explicit dotenv loading for drizzle.config.ts, including credential provisioning. You receive environment-aware setup that respects your deployment context.

How does Drizzle ORM provide type safety compared to writing raw SQL?

Drizzle ORM generates TypeScript types from your schema definition, enabling compile-time type checking for queries and mutations. This prevents runtime errors and provides IDE autocomplete for database operations.

Can I evolve my database schema with Drizzle migrations after initial setup?

Yes, the Skill covers schema evolution through its migration system. After initial setup, you can modify your schema definition and generate migrations to apply changes to your Neon database safely.