kb-db

Official

Design portable Drizzle + Postgres patterns

AuthorTimeKast
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It prevents slow, incorrect, and non-portable database implementations by providing a repeatable Drizzle ORM + Postgres blueprint for schemas, queries, mutations, transactions, indexes, pagination, and performance checks.

Core Features & Use Cases

  • Portable schema conventions: enforce a canonical Drizzle shape with $inferSelect/$inferInsert, snake_case DB columns, camelCase TS properties, and domain-based schema files.
  • Safe data modeling patterns: relations, enums, audit columns, soft delete rules, and dual-ID modeling with concurrency-safe human_id generation.
  • Query and mutation best practices: parameterized queries, correct upserts, consistent transaction usage, and N+1 avoidance via joins/relations.
  • Indexing and performance workflow: choose correct Postgres index types, order composite index columns by query shape, and require EXPLAIN ANALYZE before optimizing.

Quick Start

Use kb-db to implement or review a Drizzle ORM schema and queries for a Postgres-backed feature, ensuring timezone-aware timestamps, safe soft-delete reads, correct relations, and performance-validated indexing.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: kb-db
Download link: https://github.com/TimeKast/AgendaInteligente/archive/main.zip#kb-db

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.