drizzle-query

Provide type-safe Drizzle ORM query patterns for complex database operations.

Updated Jan 23, 2026
One-click install
npx skills add https://github.com/songyinggoh/renovation-agent-monorepo --skill drizzle-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-query
Source: https://github.com/songyinggoh/renovation-agent-monorepo/tree/main/.claude/skills/drizzle-query
Command: npx skills add https://github.com/songyinggoh/renovation-agent-monorepo --skill drizzle-query

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies writing complex, type-safe database queries using Drizzle ORM, ensuring data integrity and reducing common errors in backend development.

Core Features & Use Cases

  • Complex Joins: Easily query across multiple related tables.
  • JSONB Operations: Read, write, and merge data within JSONB columns.
  • Idempotent Inserts: Handle potential duplicate data with upserts.
  • Transactions: Ensure atomicity for multi-step database operations.
  • Pagination: Implement efficient offset or cursor-based pagination.
  • Use Case: When building a feature that requires fetching a user's profile along with their recent orders and associated product details, this Skill provides the patterns to construct a single, efficient, and type-safe query.

Quick Start

Use the drizzle-query skill to fetch all assets for a room including their processed variants.

Frequently Asked Questions about drizzle-query

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

FAQPage Schema
How do I write type-safe Drizzle ORM queries for multi-table joins in TypeScript?

Type-safe Drizzle ORM queries for multi-table joins require importing exact schema definitions and leveraging TypeScript inference. This skill provides patterns to construct complex joins across related tables while maintaining strict data integrity and reducing backend errors.

What is the best way to handle JSONB read and write operations using Drizzle ORM?

Handling JSONB read and write operations using Drizzle ORM involves specific query patterns to read, write, and merge data within JSONB columns. This skill provides type-safe patterns for these operations to ensure data integrity in complex backend workflows.

How do I implement idempotent inserts with upserts in Drizzle ORM?

Idempotent inserts with upserts in Drizzle ORM handle potential duplicate data by updating existing rows on conflict. This skill provides the exact query patterns needed to perform safe upserts and maintain database consistency without manual checks.

Can I use Drizzle ORM for complex transactions and pagination in a TypeScript backend?

Yes, Drizzle ORM supports complex transactions for atomic multi-step operations and both offset and cursor-based pagination. This skill provides the type-safe patterns needed to implement these advanced database operations within a TypeScript backend monorepo.

When should I use advanced Drizzle query patterns instead of simple selects?

Advanced Drizzle query patterns are needed for any non-trivial database operation beyond simple selects or inserts, such as multi-table joins, JSONB merging, or complex upserts. Use these patterns to ensure type safety when fetching nested relational data.