kb-db
OfficialDesign portable Drizzle + Postgres patterns
Software Engineering#query optimization#schema design#drizzle orm#transactions#soft delete#postgres#index tuning
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_caseDB columns,camelCaseTS 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_idgeneration. - 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 ANALYZEbefore 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 requiredComponents
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.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.