
Neon Drizzle
Stand up Drizzle ORM against a provisioned Neon Postgres database with schemas, migrations, and imports that match your tsconfig path aliases.
Overview
Neon Drizzle is an agent skill for the Build phase that provisions Neon and configures Drizzle ORM with schemas and migrations ready to query.
Install
npx skills add https://github.com/neondatabase/ai-rules --skill neon-drizzleWhat is this skill?
- End-to-end flow: install dependencies, provision Neon credentials, configure connections, generate schemas, run migratio
- Self-contained guides including new-project.md with numbered phases for greenfield setups
- Import rules that honor tsconfig path aliases or default to relative imports when aliases are absent
- Covers new projects, existing apps, schema edits, and migration troubleshooting
- Allowed agent tools: bash, write, and read_file for executable setup steps
- Allowed tools list: bash, write, read_file
- Guide catalog includes new-project.md as a full numbered-phase walkthrough
Adoption & trust: 588 installs on skills.sh; 86 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have an app repo but no reliable Drizzle plus Neon setup, migrations, or import-safe TypeScript wiring.
Who is it for?
Indie developers starting or extending a TypeScript backend on Neon with Drizzle-guided setup and migration fixes.
Skip if: Projects already fully migrated on another ORM where you only need one-off SQL tweaks without changing tooling.
When should I use this skill?
Creating new projects with Drizzle, adding ORM to existing applications, or modifying database schemas on Neon.
What do I get? / Deliverables
You get working connection config, schema files, and applied migrations so application code can query Neon immediately.
- Drizzle config and Neon connection setup
- Schema definitions and executed migration history
- Application-ready query layer with correct import style
Recommended Skills
Journey fit
Database ORM setup and migrations are core backend build work before you can ship features that persist data. Neon plus Drizzle is server-side data access and schema lifecycle, which belongs under backend rather than frontend or agent-tooling.
How it compares
Opinionated Neon+Drizzle bootstrap skill—not a MongoDB stream pipeline reference or a generic SQL tutor.
Common Questions / FAQ
Who is neon-drizzle for?
Solo builders using Claude Code, Cursor, or Codex who want Neon Postgres wired through Drizzle with migrations in their existing or new TypeScript project.
When should I use neon-drizzle?
During Build backend work when creating a new stack, adding an ORM to an app, defining schemas, or troubleshooting failed Drizzle migrations on Neon.
Is neon-drizzle safe to install?
Check the Security Audits panel on this Prism page before allowing bash and filesystem access that can install packages and write credentials locally.
SKILL.md
READMESKILL.md - Neon Drizzle
# Neon Drizzle Integration Comprehensive Drizzle ORM setup for Neon databases with guided workflows. ## When to Use This Skill - Setting up Drizzle in a new project (Next.js, Vite, Express, etc.) - Integrating Drizzle into an existing application - Creating or modifying database schemas - Troubleshooting migration issues ## 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 ## Available Guides Each guide is a complete, self-contained walkthrough with numbered phases: - **`guides/new-project.md`** - Full setup from scratch (see: Table of Contents) - **`guides/existing-project.md`** - Add Drizzle to running apps (see: Table of Contents) - **`guides/schema-only.md`** - Schema creation and modification (see: Table of Contents) - **`guides/troubleshooting.md`** - Debug common issues (organized by error type) I'll automatically detect your context (package manager, framework, deployment target) and select the appropriate guide based on your request. ## Quick Examples Tell me what you're building - I'll handle the rest: - "Setup Drizzle for my Next.js blog on Vercel" → Auto-detects Vercel + Next.js → HTTP adapter - "Add Drizzle to my Express API" → Auto-detects Node.js server → WebSocket adapter - "Create a users table with auth fields" → Loads schema guide → Generates schema ## Reference Documentation For deeper technical details (loaded on-demand): - `references/adapters.md` - HTTP vs WebSocket decision guide - `references/migrations.md` - Migration patterns and troubleshooting - `references/query-patterns.md` - Example queries and best practices ## Templates & Scripts - `templates/schema-example.ts` - Multi-table schema with relations - `templates/drizzle-config.ts` - Configuration examples - `scripts/generate-schema.ts` - Automated migration generation - `scripts/run-migration.ts` - Programmatic migration runner ## Related Skills - **neon-auth** - Add authentication - **neon-js** - Full SDK with auth + PostgREST-style data API - **neon-serverless** - Connection setup without ORM - **neon-toolkit** - Ephemeral databases for testing - **add-neon-docs** - Add Neon best practices to your project (run after setup) --- ## Workflow I will: 1. Detect your project context automatically 2. Select and load the appropriate guide 3. Follow the guide's phases sequentially 4. Track progress using the guide's workflow checklist 5. Load reference files only when needed 6. Offer to add Neon best practices to your project docs Ready to get started? Just describe what you're building! # Adapter Reference Guide Complete guide for choosing between HTTP and WebSocket adapters. ## Table of Contents - [Quick Decision Matrix](#quick-decision-matrix) - [HTTP Adapter](#http-adapter-neondatabaseserverless-with-neon-http) - [WebSocket Adapter](#websocket-adapter-neondatabaseserverless-with-neon-serverless) - [Framework-Specific Recommendations](#framework-specific-recommendations) - [Mixed Environments](#mixed-environments) - [Feature Comparison Table](#feature-comparison-table) - [Performance Considerations](#per