data-model-extractor

Extract database entities, relationships, and constraints from ORM models into Mermaid ERDs.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/EmeaAppGbb/spec2cloud-microhack-greenfield --skill data-model-extractor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-model-extractor
Source: https://github.com/EmeaAppGbb/spec2cloud-microhack-greenfield/tree/main/.github/skills/data-model-extractor
Command: npx skills add https://github.com/EmeaAppGbb/spec2cloud-microhack-greenfield --skill data-model-extractor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill extracts database schemas and data models from source code, producing clear Entity-Relationship Diagrams (ERDs) and providing detailed documentation of entities, fields, relationships, and constraints.

Core Features & Use Cases

  • Extract Entity Definitions: Identifies and details entities, fields, types, and constraints from various ORM models and database schemas.
  • Visualize Database Relationships: Generates ERD diagrams to visualize entity relationships, simplifying data model understanding.
  • Use Case: For a developer who needs to understand or review a complex database schema with multiple entities and relationships, this Skill automatically extracts and visualizes the data model in an easily digestible form.

Quick Start

Generate an ERD for the data model of your application by running the 'data-model-extractor' command and passing it your source tree and ORM settings.

Frequently Asked Questions about data-model-extractor

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

FAQPage Schema
How do I generate an ERD from ORM models and database migrations?

To generate an ERD from ORM models, you can automatically extract database schema information, identify entities and constraints, and output a Mermaid format diagram for visualization. This process requires passing your source tree and ORM settings to the extractor.

Can I extract database schemas from Prisma and TypeORM source code?

Yes, you can extract database schemas from Prisma and TypeORM source code. The analysis identifies entities, fields, relationships, and constraints stored within ORM models and migration tools to produce detailed data documentation.

What is the best way to visualize database relationships for documentation?

The best way to visualize database relationships for documentation is generating an Entity-Relationship Diagram in Mermaid format. This provides an easily digestible visual representation of entities, fields, and constraints extracted directly from your schema source code.

How do I document database entities and fields from an existing codebase?

You can document database entities and fields from an existing codebase by analyzing ORM models and migrations. This automatically extracts a comprehensive catalog of schema elements, detailing types, constraints, and relationships for your data model.

Do I need to manually define my database schema to create an ERD?

No, you do not need to manually define your database schema to create an ERD. The extraction process automatically analyzes schema information stored within your code, identifying entities and relationships without requiring manual schema definition.