moai-domain-db-docs

Parse database migrations and update schema, ERD, and migration documentation.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/gkswls5006-web/last-todo --skill moai-domain-db-docs-gkswls5006-web
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-domain-db-docs
Source: https://github.com/gkswls5006-web/last-todo/tree/main/.claude/skills/moai-domain-db-docs
Command: npx skills add https://github.com/gkswls5006-web/last-todo --skill moai-domain-db-docs-gkswls5006-web

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps database documentation in sync with migrations across schema.md, erd.mmd, and migrations.md, reducing drift and manual update overhead.

Core Features & Use Cases

  • Migration parsing: Parses Prisma, Alembic, Rails, and raw SQL migrations to extract table definitions and metadata.
  • Documentation synchronization: Updates .moai/project/db/schema.md, erd.mmd, and migrations.md while preserving user-edited descriptions and existing markers.
  • Drift detection & refresh: Verifies drift and supports full refresh via /moai db refresh or /moai db verify workflows.

Quick Start

Trigger this action after applying migrations to automatically update schema.md, erd.mmd, and migrations.md from the new migration content.

Frequently Asked Questions about moai-domain-db-docs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep database schema documentation in sync with migrations?

To keep database schema documentation in sync with migrations, you can parse migration files to automatically update schema.md, erd.mmd, and migrations.md, reducing manual overhead and preventing documentation drift.

Does automated db documentation work with Prisma, Alembic, and Rails migrations?

Yes, automated db documentation works with Prisma, Alembic, Rails, and raw SQL migrations. It parses these files to extract table definitions and metadata for updating your documentation artifacts.

How do I generate an ERD from existing database migrations?

You can generate an ERD from database migrations by parsing the migration files to automatically regenerate the erd.mmd file, ensuring your entity relationship diagrams reflect the latest schema changes.

How do I detect schema drift between my database and documentation?

To detect schema drift, you can run a verification workflow that compares your database migration files against existing schema.md and erd.mmd artifacts, reporting inconsistencies and supporting a full refresh.

Will updating schema.md overwrite my manually edited table descriptions?

No, updating schema.md will not overwrite manually edited descriptions. The synchronization process preserves user-edited sections and existing markers while appending new migration data and checksums.

When should I trigger a database documentation refresh?

You should trigger a database documentation refresh immediately after applying migrations. This ensures schema.md, erd.mmd, and migrations.md are updated from the new migration content and remain accurately synced.