acquire-codebase-knowl…
Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document…
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,
$ npx -y skills add github/awesome-copilot --skill efcore-d2-db-diagram --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/efcore-d2-db-diagramContext preview
The summary Claude sees to decide when to auto-load this skill.
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,
name: efcore-d2-db-diagram description: "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."
Use this skill when the user wants to generate a database / ERD diagram from an Entity Framework Core codebase.
Typical requests:
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.
1. Read the EF Core project structure. 2. Locate all `DbContext` classes. 3. Locate all `DbSet<T>` declarations. 4. Locate entity classes, owned types, enum types and value objects. 5. Read `OnModelCreating` and all `IEntityTypeConfiguration<T>` classes. 6. Read migrations when available to confirm table names, join tables, indexes and delete behaviors. 7. Build a normalized database model before writing D2. 8. Ask the mandatory diagram questionnaire before generation. 9. Generate the `.d2` file using the database model, not raw class nesting. 10. Validate D2 syntax with `d2 fmt` before delivery. 11. Render with `d2 --layout=elk schema.d2 schema.svg` when possible. 12. If regenerating, re-read EF Core mappings and migrations first.
Ask these questions for every new diagram and every regeneration unless the user already answered them in the same request.
1. `Which DbContext should be diagrammed? (auto-detect/all/specific name)` 2. `Display columns? (all/key-only/none)` 3. `Display column types? (Yes/No)` 4. `Display nullable/required markers? (Yes/No)` 5. `Display indexes and unique constraints? (Yes/No)` 6. `Display enum values? (Yes/No)` 7. `Display owned types? (inline/separate/hide)` 8. `Display many-to-many join tables? (explicit/compact/hide)` 9. `Display audit/technical tables? (Yes/No)` 10. `Display migration-only tables not present as entities? (Yes/No)` 11. `Which grouping mode? (bounded-context/schema/namespace/flat)` 12. `Which layout engine? (elk/dagre/tala)` 13. `Which output format? (d2/svg/png)`
Default values, when the user asks for a quick generation:
Load these on demand when needed:
| Reference | When to load | |---|---| | `references/efcore-model-extraction.md` | Rules for reading DbContext, DbSet, Fluent API, configurations and migrations | | `references/d2-erd-style.md` | D2 syntax and visual conventions for ERD diagrams | | `references/relationship-rules.md` | How to infer one-to-one, one-to-many, many-to-many and owned relationships | | `references/grouping-modes.md` | Rules for bounded-context, schema, namespace and flat grouping | | `references/quality-gate.md` | Final checklist before delivering the generated diagram |
Use this priority order when sources disagree:
1. Latest applied migration / migration snapshot. 2. Fluent API configuration in `OnModelCreating` or `IEntityTypeConfiguration<T>`. 3. Data annotations. 4. EF Core conventions. 5. Raw C# class shape.
Detect and represent:
Represent each persisted table as a D2 node with `shape: sql_table` when possible.
Use this content convention:
Clients: {
shape: sql_table
constraint: primary_key
Id: uuid {constraint: primary_key}
Name: text
SA community-created collection of custom agents, instructions, skills, hooks, workflows, and plugins to supercharge your GitHub Copilot experience.
Repo: github/awesome-copilot
Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document…
Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html. Wraps `npx github:microsoft/agentrc…
Generate tailored AI agent instruction files via AgentRC instructions command. Produces .github/copilot-instructions.md (default, recommended for Copilot in VS…
Help the user pick, write, or apply an AgentRC policy. Policies customise readiness scoring by disabling irrelevant checks, overriding impact/level, setting…
Use this skill when the user shares ad campaign performance data and asks what to cut, scale, or test. Trigger for prompts like "analyze my ad campaigns",…
Add educational comments to the file specified, or prompt asking for file to comment if one is not provided.