generate-db-design

Render Mermaid ERD diagrams from a ProjectModel JSON into database design documents.

3|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/mor-duongmh/morkit-plugin --skill generate-db-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-db-design
Source: https://github.com/mor-duongmh/morkit-plugin/tree/main/plugins/morkit/skills/generate-db-design
Command: npx skills add https://github.com/mor-duongmh/morkit-plugin --skill generate-db-design

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill automates the creation and maintenance of database design documentation by rendering Mermaid ERD diagrams from a ProjectModel and applying delta updates to existing docs, keeping design artifacts in sync with the codebase.

Core Features & Use Cases

  • Init mode renders database-design.md from a ProjectModel JSON.
  • Update mode applies a Delta to the existing docs, filtering to DB scope.
  • Sync workflow proposes changes by scanning ORM models, then apply-sync to commit selected updates.
  • Generates a Mermaid ERD block and anchors for per-table documentation.

Quick Start

Run render_db_design.py with a ProjectModel JSON to generate the database-design.md file.

Frequently Asked Questions about generate-db-design

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

FAQPage Schema
How do I generate Mermaid ERD diagrams from my database model?

To generate Mermaid ERD diagrams, run the render_db_design.py script with a ProjectModel JSON input to automatically create a database-design.md file containing the entity relationship diagram.

How does delta-based patching update existing database design documentation?

Delta-based patching updates existing database design documentation by applying a Delta to the current docs in update mode, filtering the changes specifically to the database scope to keep design artifacts in sync.

Can I sync database design docs automatically by scanning ORM models?

Yes, you can sync database design docs by initiating a sync workflow that scans ORM models to propose changes, then executing apply-sync to commit the selected updates into the documentation.

What is needed to automate database design document creation from a ProjectModel?

Automating database design document creation requires a ProjectModel JSON file, Mermaid rendering capabilities, and Python scripts in the scripts directory to process the delta-based patch workflow.

Does this approach work for maintaining documentation in ORM-driven codebases?

Yes, this approach works for ORM-driven codebases by automating the initialization, updating, and syncing of database design documentation to keep artifacts aligned with the underlying models.