Topics
- efcore
- entity-framework-core
- d2
- database-diagram
- erd
- csharp
- dbcontext
- schema-visualization
- migrations
What it does
Generates D2 entity-relationship diagrams from Entity Framework Core models, reading DbContext classes, Fluent API configurations, and migrations to produce renderable `.d2` files. Handles primary keys, foreign keys, owned types, many-to-many relationships, indexes, and constraints with customizable display options for columns, types, and grouping modes.
Generated from the current SKILL.md.
Frequently asked
Does this skill generate actual database diagrams or just D2 source code?
It generates D2 source code. You then render it to SVG or PNG using the d2 CLI (e.g. `d2 --layout=elk schema.d2 schema.svg`).
Does this work with all Entity Framework Core versions?
The skill reads DbContext, DbSet, Fluent API, data annotations, and migrations to infer the model. It should work with any EF Core version that supports these constructs, but the skill does not specify a minimum version.
Can it diagram multiple DbContext classes in one file?
Yes. The skill auto-detects all DbContext classes by default, but you can also choose to diagram a specific DbContext or all of them together.
Does this skill visualize runtime data or only the schema?
Schema only. It does not execute code, debug, or inspect runtime state. It extracts the static model from EF Core mappings and migrations.
What happens to many-to-many relationships in the diagram?
By default, explicit join tables are shown because EF Core creates real database tables for them. You can choose compact or hidden display if preferred.
Generated from the current SKILL.md. These answers refresh after source changes.