db-handler

Manage Drizzle ORM database schemas, migrations, and data modeling for PostgreSQL.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/alisonbessa/bluemoon --skill db-handler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-handler
Source: https://github.com/alisonbessa/bluemoon/tree/main/.claude/skills/db-handler
Command: npx skills add https://github.com/alisonbessa/bluemoon --skill db-handler

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizes and standardizes database schema design for Drizzle ORM projects, reducing manual errors during table creation, migrations, and data modeling.

Core Features & Use Cases

  • Standardized pgTable definitions and column patterns (IDs, timestamps, JSONB with Zod).
  • Enforced relations, foreign keys, and indexing guidance to optimize queries.
  • Guidance for safe migrations and single-source-of-truth schema changes without generating migrations manually.

Quick Start

Create your first table by drafting a pgTable in src/db/schema/{domain}.ts and push changes using drizzle-kit.

Frequently Asked Questions about db-handler

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

FAQPage Schema
How do I create standardized PostgreSQL table schemas with Drizzle ORM?

Standardized PostgreSQL table schemas in Drizzle ORM are created by drafting pgTable definitions in your project's schema directory, enforcing strict patterns for IDs, timestamps, and JSONB with Zod validations.

What is the best way to manage database migrations without generating them manually?

Database migrations are managed safely by establishing a single-source-of-truth schema file and deploying changes via drizzle-kit, which handles the migration generation and execution without manual SQL scripting.

How do you enforce relations and foreign keys in Drizzle ORM?

Relations and foreign keys in Drizzle ORM are enforced by defining explicit relational mappings and indexing guidelines within your pgTable definitions to optimize queries and maintain data integrity.

Can I validate JSONB columns using Zod in a Drizzle ORM schema?

JSONB columns in a Drizzle ORM schema can be validated using Zod, enforcing strict data structures for complex nested objects directly at the database layer.

Does db-handler support TypeScript for database schema design?

Database schema design with db-handler is built for TypeScript, providing type-safe column definitions, relations, and migration management for PostgreSQL-backed projects using Drizzle ORM.

When should I use drizzle-kit for schema changes in PostgreSQL?

Drizzle-kit should be used for schema changes when you need to push standardized table modifications, update columns, or enforce relations safely without writing manual migration scripts.