$npx skillfedfor your agent

drizzle-orm

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.

Drizzle ORM teaches type-safe TypeScript database development with SQL-like syntax and schema-as-code patterns.

AI-generated summary based on this skill's SKILL.md

202 30 Apache-2.0updated by Mindrally

Decision gist · record as of 2026-06-09

Drizzle ORM teaches type-safe TypeScript database development with SQL-like syntax and schema-as-code patterns. 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.

manual: git clone https://github.com/Mindrally/skills → cp -r skills/drizzle-orm ~/.claude/skills/drizzle-orm
drizzle-orm/SKILL.md · version 6a242aa4

Use it when

  • Drizzle ORM schema definition uses TypeScript to declare tables with columns, types, and constraints.
  • Drizzle ORM migrations track schema changes over time, allowing you to version control your database structure.

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

Mindrally/skills/drizzle-orm

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 use it?

Drizzle ORM is a lightweight, type-safe TypeScript ORM that treats SQL as a first-class citizen. It provides schema definition, database connections across PostgreSQL, SQLite, and Turso, relational queries, and performance patterns like proper indexing and pagination. Drizzle emphasizes developer experience by keeping you close to SQL while adding type safety and preventing common errors.

How do I define a schema and set up type-safe database queries with Drizzle?

Drizzle ORM schema definition uses TypeScript to declare tables with columns, types, and constraints. Once your schema is defined, Drizzle automatically infers types for your queries, ensuring type safety at compile time. You can then write queries using Drizzle's query builder, which provides autocomplete and type checking for all operations—select, insert, update, and delete—without sacrificing SQL expressiveness.

What are Drizzle ORM migrations and how do I manage them?

Drizzle ORM migrations track schema changes over time, allowing you to version control your database structure. Drizzle generates migration files automatically when you modify your schema, and you can apply or roll back migrations programmatically. This ensures your database stays in sync with your application code across development, staging, and production environments.

How can I avoid N+1 queries and optimize Drizzle ORM performance?

Drizzle ORM best practices for performance include using relational queries with proper joins to fetch related data in a single query, avoiding N+1 problems. Add database indexes on frequently queried columns, use pagination to limit result sets, and leverage Drizzle's query builder to construct efficient SQL. Monitor query execution and use Drizzle's type inference to catch inefficiencies early.

Can I use Drizzle ORM with PostgreSQL, SQLite, and serverless platforms?

Drizzle ORM supports multiple databases including PostgreSQL, SQLite, and Turso (SQLite edge database). It works seamlessly with serverless platforms by providing lightweight drivers that don't require persistent connections. This makes Drizzle ideal for edge computing and serverless functions where connection pooling and lightweight footprint matter.

What makes Drizzle ORM different from other TypeScript ORMs?

Drizzle ORM is a lightweight TypeScript ORM that prioritizes SQL-like syntax and type safety without heavy abstractions. Unlike heavier ORMs, Drizzle keeps you close to SQL while providing full type inference, making it easier to write performant queries. Its minimal footprint and support for multiple databases, including edge platforms like Turso, make it ideal for modern full-stack applications.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Drizzle ORM Development Guidelines

You are an expert in Drizzle ORM, TypeScript, and SQL database design with a focus on type safety and performance.

Core Principles

  • Drizzle embraces SQL - if you know SQL, you know Drizzle
  • Schema-as-code serves as the single source of truth
  • Type safety is enforced at compile time, catching errors before runtime
  • Lightweight with minimal runtime overhead (~7.4kb min+gzip)
  • Serverless-ready: works with Node.js, Bun, Deno, Cloudflare Workers

Schema Design

Basic Table Definition

```typescript import { pgTable, serial, text, varchar, timestamp, boolean, integer } from "drizzle-orm/pg-core";

export const users = pgTable("users", { id: serial("id").primaryKey(), email: varchar("email", { length: 255 }).notNull().unique(), name: text("name"), isActive: boolean("is_active").default(true), createdAt: timestamp("created_at").defaultNow(), updatedAt: timestamp("updated_at").defaultNow(), });

export const posts = pgTable("posts", { id: serial("id").primaryKey(), title:

(truncated - see the full file via the links below)

File tree — 1 file
drizzle-orm/SKILL.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 Drizzle ORM fundamentals and schema design patterns”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

drizzle
by bobmatnyc · bobmatnyc/claude-mpm-skills

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.

MITupdated Jul 2026
★ 62repo stars
Drizzle Orm
by oakoss · oakoss/agent-skills

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.

no license declared → metadata onlyupdated Mar 2026
★ 13repo stars
drizzle-sqlite-scaffold
by pproenca · pproenca/dot-skills

Drizzle SQLite Scaffold automates project initialization and table scaffolding for Drizzle + SQLite, emitting driver-specific config, singleton client, schema files with inferred types, and CRUD repository modules. Supports better-sqlite3, libsql/Turso, and bun:sqlite with built-in conventions for pragmas, relations, timestamps, and soft deletes.

MITupdated Jul 2026
★ 182repo stars
drizzle-orm-patterns
by giuseppe-trisciuoglio · giuseppe-trisciuoglio/developer-kit

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.

MITupdated Jun 2026
★ 311repo stars
drizzle-migrations
by curiositech · curiositech/some_claude_skills

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.

MITfor claude-codeupdated Jul 2026
★ 164repo stars
Drizzle Orm
by pedronauck · pedronauck/skills

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.

no license declared → metadata onlyupdated Jul 2026
★ 541repo stars

More skills postgres-drizzle (MIT) · drizzle-orm-d1 (MIT) · drizzle-best-practices (MIT) · Turso (unlicensed) · Drizzle Postgres (unlicensed) · mypy (MIT) · crm-cli (MIT)

Tags
type-safe-ormsql-first-designschema-as-codequery-builderdatabase-migrationsrelational-queriesserverless-databasetypescript-ormlightweight-framework