Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Database Schema ERD and Data Dictionary Generator

    1

    Generate Mermaid ER diagrams, optional DBML and a data dictionary from migrations, ORM models or read-only introspection, with schema health checks, graded DOCUMENTED, GAPS or DRIFTED.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Database Schema ERD and Data Dictionary Generator

    Database Schema ERD and Data Dictionary Generator

    Example session with this skill installed

    Generate an ERD and a data dictionary for our Postgres database from prisma/schema.prisma and the prisma/migrations folder. Tell me whether the schema file and the migrations still agree, and flag anything unhealthy in the schema.

    • Read your context and instructions
    • Compiled the database schema erd

    Database schema - shop-api @ 9b2f41c (PostgreSQL, sources: migrations, Prisma)

    Verdict: DRIFTED Tables: 14 in 3 domains Purpose coverage: 9/14
    Defaults used: output docs/database/, no DBML Render test: passed 3/3

    Drift

    #KindObjectMigrationsschema.prismaFix
    D1missing-in-migrationsorders.discount_codenot presentschema.prisma:58run prisma migrate dev yourself to create the migration
    D2index-missingproducts.sku unique20260312_sku/migration.sql:4schema.prisma:91 has no @uniqueadd @unique to the model

    npx prisma migrate diff --from-migrations ./prisma/migrations --to-schema ./prisma/schema.prisma --exit-code exited 2 (differences).

    Health findings

    #SevObjectFindingEvidence
    H1HIGHaudit_logno primary key20250901_init/migration.sql:88
    H2MEDIUMorder_items.product_idFK without index20250901_init/migration.sql:61
    H3MEDIUMpayments.order_idFK without index20251020_payments/migration.sql:9
    H4LOWusers.deleted_atsoft delete, but users_email_key is not partial20250901_init/migration.sql:7

    Suggested DDL (not run): CREATE INDEX CONCURRENTLY order_items_product_id_idx ON order_items (product_id);

    Commerce (6 of 14 tables)

    erDiagram
      customers ||--o{ orders : "customer_id"
      orders ||--o{ order_items : "order_id"
      products ||--o{ order_items : "product_id"
      orders ||--o{ payments : "order_id"
      orders |o--o| invoices : "order_id"
      orders {
        bigint id PK
        bigint customer_id FK
        order_status status
        timestamptz created_at
      }
    

    Legend: solid = FK declared; |o--o| = unique, nullable FK (one-to-one).

    Data dictionary (excerpt)

    orders

    Purpose: "Customer orders, one per checkout" (schema.prisma:52, /// comment)

    ColumnTypeNullDefaultKey
    idbigintNOidentityPK
    customer_idbigintNOFK -> customers.id (RESTRICT)
    statusorder_statusNO'pending'

    Next steps

    • Wrote docs/database/README.md, erd-accounts.md, erd-commerce.md, erd-content.md, data-dictionary.md, health.md, drift.md, evidence.md
    • 5 tables need a purpose comment in source
    • CI: rerun the migrate diff check when prisma/** changes
    erd-accounts.md, erd-commerce.md, erd-content.md

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Database docs fall out of date with every migration. An ERD an AI sketches from table names often guesses relationships, cardinality and ON DELETE rules that the schema does not have. This skill builds the ERD and data dictionary from the actual schema source, and every table, column, key and relationship cites a file:line or a catalog query.

    What it does:

    • Finds every schema source: SQL migrations and dumps (PostgreSQL, MySQL, SQLite, SQL Server), and models in Prisma, Drizzle, TypeORM, Sequelize, Django, Rails schema.rb, SQLAlchemy/Alembic and EF Core
    • Optionally introspects a live database, but only through catalog queries in a read-only session, with the connection read from an env var. It never writes and never reads row data
    • Draws Mermaid erDiagrams split by domain (12 entities or fewer each), taking cardinality from nullability and unique constraints rather than column names. DBML for dbdiagram.io is optional
    • Writes a Markdown data dictionary covering types, nullability, defaults, PK/FK/unique, indexes, checks, enums and comments. Table purposes come only from the source and are never made up
    • Flags schema health issues: tables without a PK, *_id columns with no FK, FKs without an index, duplicate indexes, polymorphic and soft-delete patterns, naming problems and candidate orphan tables
    • Checks drift between models, migrations and the live schema using each tool's own diff command where one exists
    • Lays out the files under docs/database/ and returns a DOCUMENTED, GAPS or DRIFTED verdict

    Who it's for: backend developers, data engineers, tech leads and technical writers who need onboarding docs, a pre-migration review or a schema audit.

    Honesty note: the output describes one commit or one catalog snapshot. Suggested DDL is shown and never run. Some ORM drift commands are marked "verify" in the reference because they were not re-checked against official docs.

    The output reflects the schema sources at one commit or one catalog snapshot. Table and column meanings come only from comments and docstrings, so undocumented ones stay blank. Live introspection needs a read-only role that you provide. Mermaid features such as nullable types and ER subgraphs depend on the Mermaid version your host runs. Some ORM drift commands should be checked against your tool version.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 29 days ago

    Requires

    @mermaid-js/mermaid-cli
    Node.js
    @dbml/cli
    prisma

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed29 days ago

    What's inside

    Frequently Asked Questions

    SKILL.md (the workflow, cardinality rules, health-check severities, verdict rules and output template) and references/schema-sources-and-syntax.md (read-only introspection queries for PostgreSQL, MySQL, SQLite and SQL Server, implicit ORM rules and drift commands, Mermaid erDiagram and DBML syntax, the health-check methods and sources). That is the whole package.

    Any agent that reads SKILL.md skills, such as Claude Code, Codex CLI, Cursor, VS Code Copilot and Gemini CLI. The agent needs read access to the repo. Shell access is optional but lets it run grep, mermaid-cli, the DBML CLI and ORM diff commands.

    Unzip the folder into your agent's skills directory (for example .claude/skills/ for Claude Code), then ask it to draw an ERD or document the schema. For live introspection, create a read-only database role and export its connection string as an env var. Never paste the string into chat.

    It documents what the schema sources declare at one commit, or one catalog snapshot. Business meaning that is not in comments or docstrings stays blank. Dynamic models, raw SQL built at runtime and tables created outside migrations can only be found through live introspection. Some ORM drift commands are marked 'verify' in the reference.

    A plain prompt tends to guess relationships from column names. This skill takes cardinality from constraints, cites a source for every element, keeps inferred links separate, runs a fixed set of health checks and a drift check, validates rendering, and returns a repeatable verdict.

    New in Data & Databases