drizzle-orm

Define SQL schemas and query databases with TypeScript type safety.

14|5|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/oakoss/agent-skills --skill drizzle-orm-oakoss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-orm
Source: https://github.com/oakoss/agent-skills/tree/main/skills/drizzle-orm
Command: npx skills add https://github.com/oakoss/agent-skills --skill drizzle-orm-oakoss

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, reducing runtime errors and improving developer productivity.

Core Features & Use Cases

  • Type-Safe Schema Definition: Define your database schema once in TypeScript, and Drizzle ensures type safety across your application.
  • SQL-like Query Builder: Write expressive and performant queries using a familiar JavaScript/TypeScript API.
  • Automated Migrations: Generate and apply database schema changes with drizzle-kit.
  • Relational Queries: Easily fetch related data with nested queries, similar to an ORM's capabilities.
  • Use Case: When building a new feature that requires creating, reading, updating, and deleting user data, use Drizzle ORM to define the user schema and interact with the database reliably.

Quick Start

Use the drizzle-orm skill to define a new PostgreSQL table named 'users' with 'id' 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 write type-safe SQL queries in a TypeScript application?

Type-safe SQL queries in TypeScript are written by defining your database schema once and using a SQL-like query builder, ensuring type safety across your application to reduce runtime errors.

What is the best way to manage database migrations for a TypeScript app?

Database migrations for a TypeScript app are managed by generating and applying schema changes using the drizzle-kit CLI, automating the migration process for robust database management.

Can I fetch related data with nested queries like a traditional ORM in TypeScript?

Relational queries fetch related data with nested queries similar to a traditional ORM, allowing you to easily retrieve complex related structures directly within your TypeScript application.

Does this type-safe ORM support PostgreSQL, MySQL, and SQLite?

This type-safe ORM supports interacting with SQL databases including PostgreSQL, MySQL, and SQLite using TypeScript to facilitate schema definition, mutations, and query building.

How do I define advanced database features like views and check constraints in TypeScript?

Advanced database features like generated columns, views, and check constraints are defined in TypeScript to provide robust database management and ensure schema type safety.

Why use a SQL-like query builder instead of a traditional ORM for database interactions?

A SQL-like query builder is used instead of a traditional ORM to write expressive and performant queries using a familiar TypeScript API while maintaining strict type safety for database schemas.