drizzle-best-practices

Provide Drizzle ORM PostgreSQL best practices for schema design, queries, and migrations.

20|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/honra-io/drizzle-best-practices --skill drizzle-best-practices-honra-io
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-best-practices
Source: https://github.com/honra-io/drizzle-best-practices/tree/main
Command: npx skills add https://github.com/honra-io/drizzle-best-practices --skill drizzle-best-practices-honra-io

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Drizzle ORM users often struggle to apply consistent practices across Postgres schemas, queries, migrations, and type-safety. This skill consolidates guidance into a modular, engine-aware reference to standardize Drizzle usage and reduce common pitfalls.

Core Features & Use Cases

  • Schema Design guidance for tables, columns, identity columns, JSONB, enums, and indexes.
  • Query Patterns & Relations guidance for select/insert/update/delete, and relational queries via defineRelations.
  • Migrations & Kit Workflows patterns for drizzle-kit generate, push, pull, migrate, and versioned migrations.
  • Type Safety & Validators strategies to infer TypeScript types and derive Zod/Valibot validators from Drizzle schemas.
  • Real-world scenarios covering serverless (Neon, Supabase) and traditional Node.js drivers for Postgres.

Quick Start

Install the skill in your AI agent and begin asking for Drizzle PostgreSQL best practices; load references on demand.

Frequently Asked Questions about drizzle-best-practices

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

FAQPage Schema
How do I structure PostgreSQL schema design with Drizzle ORM?

Drizzle ORM schema design for PostgreSQL involves defining tables, columns, identity columns, JSONB, and enums. This skill provides modular guidance to standardize schema creation and reduce common pitfalls across your database structure.

What is the best way to handle Drizzle migrations and kit workflows?

Drizzle migrations and kit workflows are managed through drizzle-kit commands like generate, push, pull, and migrate. This skill outlines versioned migration patterns to ensure consistent database state transitions across environments.

How do I infer TypeScript types and derive Zod validators from Drizzle schemas?

Type safety in Drizzle schemas allows you to infer TypeScript types and derive Zod or Valibot validators. This skill provides strategies to enforce end-to-end type safety directly from your PostgreSQL database definitions.

Does this Drizzle ORM best practices guide work with serverless PostgreSQL drivers?

Drizzle ORM best practices apply to serverless environments like Neon and Supabase, as well as traditional Node.js drivers. This skill delivers engine-aware guidance for PostgreSQL across different deployment contexts.

How do I configure relational queries using defineRelations in Drizzle?

Relational queries in Drizzle use the defineRelations function to establish connections between tables. This skill covers query patterns for select, insert, update, and delete operations within your PostgreSQL relations.

When do I need to handle RC vs 0.45.x migration guidance for Drizzle?

RC vs 0.45.x migration guidance for Drizzle is needed when upgrading versions to ensure compatibility. This skill includes activation workflows and modular frontmatter to navigate version-specific schema and migration changes.