data-model-extractor

Extract database schemas and generate Mermaid ER diagrams from ORM models.

Updated May 6, 2026
One-click install
npx skills add https://github.com/crgarcia12/compy --skill data-model-extractor-crgarcia12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-model-extractor
Source: https://github.com/crgarcia12/compy/tree/main/.github/skills/data-model-extractor
Command: npx skills add https://github.com/crgarcia12/compy --skill data-model-extractor-crgarcia12

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the challenge of manually extracting and visualizing database schemas from code, providing an automated solution for documenting data models and relationships.

Core Features & Use Cases

  • Schema Extraction: Automatically extracts database schemas from ORM models, migration files, and schema definitions.
  • ER Diagram Generation: Produces Mermaid Entity-Relationship Diagrams to visualize the data layer structure.
  • Use Case: Ideal for developers and data architects who need to quickly document and understand the data models within a codebase.

Quick Start

Run the data-model-extractor skill on your project's source code to generate an ER diagram and a detailed data model documentation.

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 ER diagram from ORM models and migration files?

To generate an ER diagram from ORM models, this Skill parses your migration files and schema definitions to automatically extract the database schema and produce a visual Mermaid Entity-Relationship diagram.

What is the best way to document a database schema directly from source code?

Documenting a database schema from source code is best handled by automatically parsing ORM models and migration history to output both a detailed data model documentation and a visual ER diagram.

Can I extract database schemas from codebases using various ORM technologies?

Yes, you can extract database schemas from codebases using various ORM technologies, as the tool parses ORM model files and schema configurations regardless of the specific database implementation.

Does schema extraction work with both ORM model files and migration history?

Schema extraction works by parsing both ORM model files and migration history, analyzing schema configurations to construct a complete and accurate visual representation of the data layer.

What format does the generated ER diagram use for visualizing the data layer?

The generated ER diagram uses Mermaid format to visualize the data layer structure, providing a text-based representation of database schemas and entity relationships extracted from your code.

Are there limitations when parsing schema definitions from various ORM technologies?

Limitations when parsing schema definitions from various ORM technologies depend on how explicitly the ORM models and migration files are configured, requiring complete schema configurations to accurately produce the visual representation.