efcore-d2-db-diagram
Generate D2 database diagrams from Entity Framework Core models. USE FOR: EF Core database diagram, Entity Framework Core ERD, DbContext diagram, C# entity relationship diagram, PostgreSQL schema visualization, generate .d2 file from EF Core entities, Fluent API mapping diagram, migrations-based database diagram, table relationships, owned types, many-to-many join tables, indexes and constraints. DO NOT USE FOR: runtime debugging, database migration execution, schema deployment, SQL performance tuning, or draw.io diagrams.
npx skills add github/awesome-copilot --skill efcore-d2-db-diagram --agent copilot
Same command for any agent — swap --agent for claude-code, codex, cursor.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# EF Core D2 Database Diagram Generator ## When to Use Use this skill when the user wants to generate a database / ERD diagram from an Entity Framework Core codebase. Typical requests: - Generate a D2 database diagram from EF Core entities. - Visualize tables, columns, primary keys, foreign keys and relationships. - Analyze `DbContext`, `DbSet<T>`, `IEntityTypeConfiguration<T>`, Fluent API and migrations. - Produce a `.d2` file renderable to SVG/PNG with the `d2` CLI. - Document the database model of an ASP.NET Core / .NET project. ## Goal Create a readable D2 entity-relationship diagram that reflects the actual EF Core persistence model, not only the raw C# class shape. The diagram must prioritize: 1. Database tables and relationships. 2. Primary keys, foreign keys, required/optional columns. 3. Owned types and value objects. 4. Many-to-many relationships and join tables. 5. Indexes, unique constraints and table names. 6. EF Core conventions only when explicit mapping is absent. Output is `.d2` source code. It can be rendered to SVG or PNG via the `d2` CLI. ## Tools - **d2 CLI**: render `.d2` files to SVG/PNG. - `d2 input.d2 output.svg` - `d2 --layout=elk input.d2 output.svg` - **
- When to Use
- Goal
- Tools
- Recommended Workflow
- Mandatory Questions Before Diagram Generation
- Reference Documents
- EF Core Extraction Rules
- Source Priority
- Required EF Core Concepts to Detect
- Diagram Rendering Rules
- Tables
- Relationships
- Owned Types
- Many-to-Many
What does the efcore-d2-db-diagram skill do?
Generate D2 database diagrams from Entity Framework Core models. USE FOR: EF Core database diagram, Entity Framework Core ERD, DbContext diagram, C# entity relationship diagram, PostgreSQL schema visualization, generate .d2 file from EF Core entities, Fluent API mapping diagram, migrations-based database diagram, table relationships, owned types, many-to-many join tables, indexes and constraints. DO NOT USE FOR: runtime debugging, database migration execution, schema deployment, SQL performance tuning, or draw.io diagrams.
How do I install it?
Run `npx skills add github/awesome-copilot --skill efcore-d2-db-diagram --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From github/awesome-copilot, a repository with 37,432 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.