reversa-data-master

Extract PostgreSQL schema details into Mermaid ERD and markdown documentation.

Updated May 16, 2026
One-click install
npx skills add https://github.com/ricardops34/rcg-crm --skill reversa-data-master
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reversa-data-master
Source: https://github.com/ricardops34/rcg-crm/tree/main/.agents/skills/reversa-data-master
Command: npx skills add https://github.com/ricardops34/rcg-crm --skill reversa-data-master

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes uncertainty about a legacy PostgreSQL database by producing complete, structured documentation of tables, relationships, constraints, and in-database business rules.

Core Features & Use Cases

  • Database inventory & structure: Identifies tables by domain and details every column (types, defaults, nullability), PKs, FKs, indexes, and constraints.
  • Relationships & ERD generation: Maps cardinalities (including junction and polymorphic relationships, when present) and generates an ERD in Mermaid.
  • Business rules in the database: Documents triggers, stored procedures/functions, views, check constraints, and other rule logic found in DDL/migrations/ORM sources.
  • Use case: When you have DDL/migrations but no reliable documentation, you can generate ERD and data dictionary outputs to unblock ORM models, migrations, and accurate rebuild work.

Quick Start

Use the reversa-data-master skill to document the database into erd and data-dictionary artifacts under the configured output folder.

Frequently Asked Questions about reversa-data-master

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

FAQPage Schema
How do I document a legacy PostgreSQL schema from DDL and migrations?

To document a legacy PostgreSQL schema, you can extract DDL, migrations, and ORM evidence to generate a Mermaid ERD, a complete data dictionary, and relationship maps detailing tables, columns, and constraints.

How do I generate an ERD for a database rebuild from existing migrations?

Generating an ERD for a database rebuild involves reverse engineering schema evidence from migrations and ORM sources to map table cardinalities, including junction and polymorphic relationships, into a visual Mermaid diagram.

Can I extract stored procedures and triggers when reverse engineering a database schema?

Yes, when reverse engineering a database schema, you can extract and document in-database business rules including stored procedures, functions, triggers, views, and check constraints found within DDL and migration files.

What is the best way to create a data dictionary for legacy database tables without live access?

The best way to create a data dictionary for legacy database tables without live access is using read-only analysis sources like DDL scripts and ORM models to detail column types, defaults, nullability, primary keys, and foreign keys.

Does schema reverse engineering work for documenting polymorphic relationships in PostgreSQL?

Yes, schema reverse engineering works for PostgreSQL by analyzing DDL and ORM evidence to identify and document complex cardinalities, accurately mapping polymorphic and junction relationships within the generated relationship map.

Why do I need a data dictionary before writing ORM models for a legacy database rebuild?

You need a data dictionary before writing ORM models because it removes uncertainty by providing accurate table structures, constraints, and business rules, ensuring your migrations and ORM models match the actual legacy database logic.