drizzle
Drizzle is a TypeScript-first ORM built for compile-time type safety and edge-runtime performance. Define schemas with SQL-like syntax, execute queries with full type inference, and manage one-to-many and many-to-many relations without runtime dependencies.
Drizzle ORM enables type-safe database queries in TypeScript with zero runtime overhead and SQL-like syntax.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-18
Drizzle ORM enables type-safe database queries in TypeScript with zero runtime overhead and SQL-like syntax. Drizzle is a TypeScript-first ORM built for compile-time type safety and edge-runtime performance. Define schemas with SQL-like syntax, execute queries with full type inference, and manage one-to-many and many-to-many relations without runtime dependencies.
Use it when
- Drizzle vs Prisma: Drizzle is designed for zero runtime overhead and edge-runtime compatibility.
- Drizzle schema definition uses SQL-like syntax to declare tables and columns with full type inference.
Verify before relying
Read SKILL.md below before installing (6 files). Open directory: indexed for reading, not audited.
Install
bobmatnyc/claude-mpm-skills/drizzle · repository language: Python
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What is Drizzle ORM and how do I set it up for TypeScript?
Drizzle is a TypeScript-first ORM built for compile-time type safety and edge-runtime performance. To set up Drizzle, install the package via npm, configure your database connection (PostgreSQL, MySQL, SQLite, etc.), define your schema using Drizzle's SQL-like syntax, and start executing type-safe queries. Drizzle provides zero runtime overhead, meaning your compiled code runs efficiently without extra dependencies.
How does Drizzle compare to Prisma in terms of performance?
Drizzle vs Prisma: Drizzle is designed for zero runtime overhead and edge-runtime compatibility, making it lighter and faster for serverless environments. Prisma offers a more abstracted API but adds runtime dependencies. Drizzle excels in compile-time type safety and query performance, while Prisma provides a more opinionated developer experience. Choose Drizzle for performance-critical applications and edge deployments.
How do I define database schemas and relations using Drizzle?
Drizzle schema definition uses SQL-like syntax to declare tables and columns with full type inference. Define one-to-many and many-to-many relations using Drizzle's relation helpers. Your schema is type-safe at compile time, so TypeScript catches errors before runtime. Use Drizzle Kit CLI to generate and manage migrations automatically from your schema definitions.
What is a zero runtime overhead ORM and why does Drizzle offer it?
A zero runtime overhead ORM compiles to efficient SQL without adding extra dependencies or runtime layers. Drizzle achieves this through compile-time type safety and direct SQL generation. This approach makes Drizzle ideal for edge runtimes, serverless functions, and performance-sensitive applications where every millisecond matters.
How do I optimize database queries and handle transactions in Drizzle?
Drizzle supports query optimization through type-safe query builders and transaction handling. Write efficient queries using Drizzle's fluent API, leverage type inference to catch mistakes early, and wrap multiple operations in transactions for data consistency. Drizzle's compile-time optimizations ensure your queries run fast without runtime overhead.
Can I use Drizzle with Next.js and serverless environments?
Yes, Drizzle integrates seamlessly with Next.js and serverless platforms. Its edge-runtime compatibility and zero runtime overhead make it perfect for Next.js API routes and edge functions. Drizzle works with PostgreSQL, MySQL, and SQLite, supporting both traditional and serverless database setups.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Drizzle ORM
Modern TypeScript-first ORM with zero dependencies, compile-time type safety, and SQL-like syntax. Optimized for edge runtimes and serverless environments.
Quick Start
Installation
# Core ORM
npm install drizzle-orm
# Database driver (choose one)
npm install pg # PostgreSQL
npm install mysql2 # MySQL
npm install better-sqlite3 # SQLite
# Drizzle Kit (migrations)
npm install -D drizzle-kit
Basic Setup
```typescript // db/schema.ts import { pgTable, serial, text, timestamp } from 'drizzle-orm/pg-core';
export const users = pgTable('users', { id:
(truncated - see the full file via the links below)
File tree — 6 files
toolchains/typescript/data/drizzle/SKILL.md
toolchains/typescript/data/drizzle/metadata.json
toolchains/typescript/data/drizzle/references/advanced-schemas.md
toolchains/typescript/data/drizzle/references/performance.md
toolchains/typescript/data/drizzle/references/query-patterns.md
toolchains/typescript/data/drizzle/references/vs-prisma.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Learn how to set up and use Drizzle ORM for type-safe database queries”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Drizzle ORM is a lightweight, type-safe TypeScript ORM that treats SQL as a first-class citizen. This skill covers schema definition, database connections across PostgreSQL, SQLite, and Turso, relational queries, and performance patterns like proper indexing and pagination.
Master Drizzle ORM development with patterns for schema definition, relations, and type-safe queries across five database dialects. Learn CRUD operations, transactions, migrations, and best practices for building robust database applications.
Drizzle ORM is a lightweight TypeScript ORM that delivers compile-time type safety while mapping directly to SQL across PostgreSQL, MySQL, and SQLite. It combines a SQL-like query builder with a relational queries API, serverless compatibility, and zero dependencies for full control over your database layer.
This skill guides you through Drizzle ORM's migration workflow for SQLite databases, covering schema definition, column types, and common changes like adding tables or indexes. Learn production-ready strategies for generating migrations, applying them in code, and managing relations between tables.
This skill covers Drizzle ORM fundamentals for building type-safe database layers, including schema organization, prepared statements, and transaction patterns. Learn performance-first practices like indexing strategies, N+1 prevention, and safe migration workflows using package scripts. Covers common pitfalls and validation steps to ensure robust database code.
Build type-safe database applications pairing PostgreSQL with Drizzle ORM. This skill covers schema design, relational queries, migrations via drizzle-kit, connection pooling, and common performance pitfalls like N+1 queries and missing indexes. Includes decision trees for modeling relationships and diagnosing slow queries.
More skills drizzle-orm-d1 (MIT) · Drizzle Postgres (unlicensed) · drizzle-sqlite-scaffold (MIT) · mypy (MIT) · Drizzle (Apache-2.0) · database-design (MIT)