drizzle-queries

Generate type-safe Postgres CRUD queries with Drizzle ORM.

20|3|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/andrelandgraf/fullstackrecipes --skill drizzle-queries-andrelandgraf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-queries
Source: https://github.com/andrelandgraf/fullstackrecipes/tree/main/templates/fullstackrecipe/.agents/skills/drizzle-queries
Command: npx skills add https://github.com/andrelandgraf/fullstackrecipes --skill drizzle-queries-andrelandgraf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and maintaining type-safe Postgres queries with Drizzle ORM across selects, inserts, updates, deletes, and relational data.

Core Features & Use Cases

  • Type-safe CRUD operations with Drizzle ORM against a Postgres database
  • Relational queries with nested includes using db.query
  • Example-driven guidance for selecting, inserting, updating, deleting, and adding tables

Quick Start

Generate a type-safe query for fetching a user by id using drizzle-orm.

Frequently Asked Questions about drizzle-queries

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

FAQPage Schema
How do I write type-safe Postgres queries with Drizzle ORM for CRUD operations?

Type-safe Postgres queries with Drizzle ORM are generated by enforcing compile-time safety via Drizzle schemas, providing structured examples for selecting, inserting, updating, and deleting user data across Next.js apps and backend services.

How do I perform relational queries with nested includes using Drizzle ORM?

Relational queries with nested includes using Drizzle ORM are executed through the db.query API, allowing you to fetch related models and nested data structures while maintaining full type safety across your Postgres database operations.

Can I use Drizzle ORM type-safe queries in a Next.js backend service?

Yes, Drizzle ORM type-safe queries apply across Next.js apps and backend services, enforcing compile-time safety via Drizzle schemas when handling user data and related models in Postgres databases.

What is the best way to fetch a user by id using Drizzle ORM in TypeScript?

Fetching a user by id using Drizzle ORM in TypeScript is handled through type-safe select queries that enforce compile-time safety via Drizzle schemas, ensuring your Postgres query matches your defined schema exactly.

Does Drizzle ORM enforce compile-time safety for Postgres insert and update operations?

Yes, Drizzle ORM enforces compile-time safety for Postgres insert and update operations by validating data against Drizzle schemas, providing type-safe examples for modifying user data and related models without runtime errors.