What problem does it solve? Translating a validated domain model into a correct, performant database schema is error-prone: value objects get wrongly split into tables, foreign keys lack indexes, and enums lose type safety. This Skill provides a structured process and enforced patterns for designing Drizzle ORM schemas that mirror the domain model without copying it 1:1. ## Core Features & Use Cases - Domain-to-Schema Mapping: Converts entities and value objects into Drizzle table definitions using pgSchema namespaces per bounded context, with mandatory BaseEntity fields (id, createdAt, updatedAt, version). - Value Object Persistence Strategies: Flattens structured VOs into prefixed columns, stores simple VOs as single columns, and uses a custom typed jsonb wrapper only for VO arrays. - Relationship & Index Design: Defines 1:1, 1:N, and N:M relationships with FK indexes, composite unique constraints, and Drizzle relations declarations. - Use Case: After validating a new Patient aggregate with an Address value object and a list of phone numbers, use this Skill to produce the patients table with flattened address columns, a typed JSONB phones column, and indexed foreign keys before running /migrate. ## Quick Start Ask the agent to design the database schema for a new bounded context entity using the db-modelling skill, then verify the output against the registry.yaml patterns before running /migrate.