What problem does it solve? Teams writing Drizzle ORM schemas and queries often drift into inconsistent naming, fragile composite primary keys, loose JSONB typing, and the relational db.query API that generates hard-to-debug lateral joins. This Skill codifies the project's schema and query conventions so every table, index, and query follows the same reviewed patterns. ## Core Features & Use Cases - Schema Conventions: Enforces plural snake_case table names, surrogate primary keys with uniqueIndex for business uniqueness, app-generated text IDs, and timestamps helper spreads. - Column Design Rules: Guides foreign keys with cascade deletes, TypeScript $type value types instead of pgEnum, concrete JSONB interfaces, and JSDoc for non-obvious fields. - Query Style Enforcement: Mandates the db.select() builder API with explicit joins and aggregations instead of the relational findMany/with: API, plus rules for raw SQL, recursive CTEs, and upserts. - Use Case: When adding a new many-to-many junction table like agents_knowledge_bases, the Skill directs you to use a surrogate uuid primary key, a uniqueIndex on the pair, cascade foreign keys, and spread timestamps. ## Quick Start Ask the AI to create a new Drizzle pgTable schema for a workspace-scoped settings table following the project's conventions.