AI Agent Hub
Back to skills
Multi-Entity Relationship ER Diagram Tool icon

Multi-Entity Relationship ER Diagram Tool

Development Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Install @user_3d4d85ac/entity-relationship-diagram-tool by following the guide at https://skillhub.cn/install/skillhub.md

About this skill

Problem

When modeling databases, backend schemas, or requirements, teams often need to turn multiple entities and relations into an ER diagram quickly. Manual layouts can produce overlapping boxes, crossing lines, or cardinality labels that cover edges, and cyclic graphs can make simple hierarchical layouts hard to read. This is especially true when producing a diagram that can be reviewed, saved, and adjusted later.

How it works

The skill centers on turning entities and relations into a PNG ER diagram:
- It accepts relations in the form entity1:cardinality--verb--cardinality:entity2.
- It prefers scripts/er_design.py; acyclic graphs use BFS layering, while cyclic graphs switch to Fruchterman-Reingold force-directed layout.
- Before saving, it validates no line crossings, no shape overlap, and cardinality circles staying at least 0.5 away from shape edges.
- If validation fails or the script is missing, it falls back to an alternative layout while keeping the black-and-white style.

Boundaries

It is suited for multi-entity relationship diagrams, not for single-entity attribute diagrams, primary key underlines, colored styles, or editing existing images. For manual adjustments, it can first generate a grid overlay version so positions can be described by coordinates, then remove the grid after the final version is accepted.

Use Cases

  • Before database design review, generate a readable ER diagram from entities like user, order, and product.
  • While modeling backend services, produce a black-and-white ER diagram with cardinality labels to confirm relation direction.
  • Insert a multi-entity relationship sketch into a requirements doc to explain m:n links among cart, order, and user.
  • When a cyclic relation diagram overlaps, regenerate a PNG with no crossing lines or shape overlap.

Best For

  • Backend engineers designing databases: need a quick multi-entity ER diagram before schema review.
  • Product engineers analyzing requirements: need to diagram business entities and m:n relations in docs.
  • Developers maintaining technical documentation: need clean black-and-white ER sketches that can be adjusted later.
  • Modeling owners fixing cyclic layouts: need regenerated PNGs without crossings or overlaps.