tool-drizzle-orm

Define typed schemas and run SQL-like queries with Drizzle ORM.

1|Updated Sep 12, 2025
One-click install
npx skills add https://github.com/JimmyTranDev/dotfiles --skill tool-drizzle-orm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tool-drizzle-orm
Source: https://github.com/JimmyTranDev/dotfiles/tree/main/src/opencode/skills/tool-drizzle-orm
Command: npx skills add https://github.com/JimmyTranDev/dotfiles --skill tool-drizzle-orm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drizzle ORM patterns provide a type-safe, author-friendly approach to defining database schemas, performing SQL-like queries, and managing relations across PostgreSQL, MySQL, and SQLite, reducing boilerplate and runtime errors.

Core Features & Use Cases

  • Schema Definition and Typed Tables: define pgTable/mysqlTable/sqliteTable schemas with strong TS types and relations.
  • Relational Queries and Joins: build complex queries with relations v2, joins, and nested selects.
  • Migrations and Migrations Tooling: integrate with drizzle-kit to generate and apply migrations across environments.
  • Use Case: in a TypeScript app, model users and posts with strict types, run typed queries, and migrate schema safely.

Quick Start

Define your first table with pgTable and run a simple query using Drizzle ORM.

Frequently Asked Questions about tool-drizzle-orm

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

FAQPage Schema
How do I define type-safe database schemas in TypeScript using Drizzle ORM?

To define type-safe database schemas in TypeScript with Drizzle ORM, you use the pgTable, mysqlTable, or sqliteTable APIs to construct tables with strict type definitions and establish relations v2, reducing boilerplate and runtime errors.

What is the best way to run relational queries and joins across PostgreSQL and SQLite?

The best way to run relational queries and joins across PostgreSQL, MySQL, and SQLite is using Drizzle ORM patterns, which allow you to build complex queries with relations v2, joins, and nested selects while maintaining strict TypeScript typing.

How do I generate and apply migrations with drizzle-kit in a TypeScript project?

You generate and apply migrations with drizzle-kit by integrating it into your TypeScript project workflow, allowing you to safely generate, manage, and apply schema migrations across development and production environments.

Can I use Drizzle ORM for cross-dialect database support in the same application?

Yes, you can use Drizzle ORM for cross-dialect database support in the same TypeScript application, as it provides unified patterns for schema definition, SQL-like queries, and relational mapping across PostgreSQL, MySQL, and SQLite.

Why use a type-safe ORM for SQL-like queries instead of raw SQL in TypeScript?

You use a type-safe ORM for SQL-like queries to eliminate boilerplate and prevent runtime errors, as Drizzle ORM enforces strict TypeScript schema definitions and relations while building complex queries and joins across multiple SQL dialects.