What problem does it solve? Database documentation drifts out of sync with actual migrations as schemas evolve. This Skill parses migration files (Prisma, Alembic, Rails, raw SQL) and keeps schema.md, erd.mmd, and migrations.md continuously updated, with drift detection to catch discrepancies. ## Core Features & Use Cases - Proposal-Based Sync: Consumes a parsed migration proposal and updates schema.md in place, regenerates the Mermaid erDiagram, and appends checksummed entries to migrations.md. - Drift Verification: The /moai db verify mode compares tables found in migration files against documented tables and reports a unified diff of any drift. - Full Rebuild: The /moai db refresh mode rescans all migration files and rebuilds all three documentation files from scratch after user confirmation. - Use Case: After applying a new Alembic migration, the PostToolUse hook proposes a schema update; approving it updates the schema registry, ERD diagram, and migration log automatically. ## Quick Start Ask the assistant to run /moai db verify to check whether the schema documentation matches the current migration files.