drizzle-orm

Define TypeScript database schemas, write type-safe queries, and manage migrations.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/dotlab-hq/medisync --skill drizzle-orm-dotlab-hq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-orm
Source: https://github.com/dotlab-hq/medisync/tree/main/.agents/skills/drizzle-orm
Command: npx skills add https://github.com/dotlab-hq/medisync --skill drizzle-orm-dotlab-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies database interactions in TypeScript applications by providing a type-safe way to define schemas, write queries, and manage migrations, eliminating runtime errors and improving developer productivity.

Core Features & Use Cases

  • Type-Safe Schema Definition: Define your database schema directly in TypeScript, ensuring type consistency between your code and database.
  • Powerful Querying: Write SQL-like queries with full type checking and autocompletion. Supports complex operations like joins, subqueries, and transactions.
  • Automated Migrations: Generate and apply database schema migrations using Drizzle Kit.
  • Use Case: When building a new feature that requires storing user preferences, you can define the user_preferences table in Drizzle's schema, write type-safe insert and select queries, and generate the corresponding SQL migration to apply to your database.

Quick Start

Use the drizzle-orm skill to define a new 'users' table with 'id', 'email', and 'name' columns.

Frequently Asked Questions about drizzle-orm

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

FAQPage Schema
How do I define a type-safe database schema in TypeScript?

Type-safe schema definition involves declaring database tables and columns directly in TypeScript, ensuring compile-time consistency between your code and database to eliminate runtime type errors.

Can I use this ORM with PostgreSQL, MySQL, and SQLite?

This ORM supports PostgreSQL, MySQL, and SQLite databases, enabling you to build type-safe data layers with compile-time safety and zero runtime overhead across these platforms.

How do I generate and apply database migrations in TypeScript?

You generate and apply database schema migrations using Drizzle Kit, which automates creating and executing SQL migrations to update your database structure after schema changes.

What is the best way to write type-safe SQL queries with joins and subqueries?

Writing type-safe SQL queries is best done using a TypeScript ORM that provides SQL-like query building with full type checking, supporting complex operations like joins, subqueries, and transactions.

Does a type-safe ORM add runtime overhead to TypeScript applications?

This type-safe ORM operates with zero runtime overhead, providing compile-time safety during development without adding performance costs to your TypeScript application at runtime.

When should I use a TypeScript ORM instead of raw SQL queries?

You should use a TypeScript ORM when you need type-safe schema definitions, automated migrations, and query autocompletion to improve productivity and eliminate runtime errors in your data layer.