Agent skill · Databases

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.

GitHub68,948★ · +463/wk · 2 repos on radarProfile →
copilotMIT
Install
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.

Facts
Files in the skill folder: 6
SKILL.md size: 9 KB
Bundled scripts: none
Path: skills/efcore-d2-db-diagram/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 37,432 · +281 this week
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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` - **

What's inside
Steps it walks through
  1. When to Use
  2. Goal
  3. Tools
  4. Recommended Workflow
  5. Mandatory Questions Before Diagram Generation
  6. Reference Documents
  7. EF Core Extraction Rules
  8. Source Priority
  9. Required EF Core Concepts to Detect
  10. Diagram Rendering Rules
  11. Tables
  12. Relationships
  13. Owned Types
  14. Many-to-Many
Ships with 5 files
  • references/d2-erd-style.md
  • references/efcore-model-extraction.md
  • references/grouping-modes.md
  • references/quality-gate.md
  • references/relationship-rules.md
More from awesome-copilot
All skills →
About this skill
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.

Keep going