tech-drizzle

Enforce Drizzle ORM schema, query, and migration best practices in TypeScript projects.

16|15|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/ravnhq/ai-toolkit --skill tech-drizzle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tech-drizzle
Source: https://github.com/ravnhq/ai-toolkit/tree/main/skills/tech-drizzle
Command: npx skills add https://github.com/ravnhq/ai-toolkit --skill tech-drizzle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drizzle ORM usage often suffers from inconsistent patterns across schemas, exports, and migrations. This Skill provides a cohesive set of guidelines and examples to standardize Drizzle-based development.

Core Features & Use Cases

  • Relational query patterns using db.query and the with clause to avoid N+1 queries
  • Schema export order, per-file organization, and type inference to prevent circular imports
  • Migration workflows including push, generate, and review to keep migrations clean
  • Alignment with Drizzle documentation and community best practices

Quick Start

Inspect the rules directory (rules/) to apply Drizzle best practices, then refactor schemas to follow per-file exports, correct ordering, and strict typing.

Frequently Asked Questions about tech-drizzle

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

FAQPage Schema
How do I structure Drizzle ORM schemas to prevent circular imports in TypeScript?

To prevent circular imports in Drizzle ORM, enforce per-file schema declarations and maintain a consistent export order. This standardizes type inference and keeps your TypeScript project structure cohesive.

What is the best way to handle Drizzle ORM migrations and schema generation?

The best way to handle Drizzle ORM migrations is using a workflow of push, generate, and review. This keeps your schema migrations clean and aligned with documented community best practices.

How do I avoid N+1 queries when using Drizzle ORM relational queries?

To avoid N+1 queries in Drizzle ORM, use db.query with the with clause for relational queries. This pattern ensures efficient data fetching and aligns with recommended relational query practices.

Does Drizzle ORM work with strict TypeScript typing for relational schema definitions?

Yes, Drizzle ORM works with strict TypeScript typing. Applying per-file schema exports and correct ordering achieves accurate type inference across your relational database schema definitions.

Why does my Drizzle ORM schema suffer from inconsistent export patterns?

Drizzle ORM schemas suffer from inconsistent export patterns without standardized guidelines. Applying cohesive rules for schema export order and per-file organization standardizes development and resolves these issues.