Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add OKHP3/skillz --skill efcore-d2-db-diagramgit clone --depth 1 https://github.com/OKHP3/skillzWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/okhp3/skillz/efcore-d2-db-diagram)<a href="https://agentmods.dev/skills/okhp3/skillz/efcore-d2-db-diagram"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/efcore-d2-db-diagram/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/okhp3/skillz/efcore-d2-db-diagram"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/efcore-d2-db-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00108 | $0.02159 |
| Opus 5 | $0.00054 | $0.01079 |
| Sonnet 5 | $0.00022 | $0.00432 |
| Haiku 4.5 | $0.00011 | $0.00216 |
Grade A, and why
efcore-d2-db-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 274 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
.d2file renderable to SVG/PNG with thed2CLI. - 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:
- Database tables and relationships.
- Primary keys, foreign keys, required/optional columns.
- Owned types and value objects.
- Many-to-many relationships and join tables.
- Indexes, unique constraints and table names.
- 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
.d2files to SVG/PNG.d2 input.d2 output.svgd2 --layout=elk input.d2 output.svg
- d2 fmt: format D2 files.
d2 fmt input.d2
- No MCP server is required. The skill generates D2 source code as text.
Recommended Workflow
- Read the EF Core project structure.
- Locate all
DbContextclasses. - Locate all
DbSet<T>declarations. - Locate entity classes, owned types, enum types and value objects.
- Read
OnModelCreatingand allIEntityTypeConfiguration<T>classes. - Read migrations when available to confirm table names, join tables, indexes and delete behaviors.
- Build a normalized database model before writing D2.
- Ask the mandatory diagram questionnaire before generation.
- Generate the
.d2file using the database model, not raw class nesting. - Validate D2 syntax with
d2 fmtbefore delivery. - Render with
d2 --layout=elk schema.d2 schema.svgwhen possible. - If regenerating, re-read EF Core mappings and migrations first.
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 274 lines · 108 tokens per session scan A e0689c25df30
efcore-d2-db-diagram is a skill published in the GitHub repository OKHP3/skillz (3 stars, last pushed yesterday), licensed MIT. It adds 108 tokens to every session and 2,159 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
neo-dotnet-ef-core
Use this skill when the task involves Entity Framework Core models, DbContext, migrations, LINQ queries, change tracking, database providers, performance tuning, or data access review in .NET projects.
optimizing-ef-core-queries
Optimize and improve the performance of slow Entity Framework Core (EF Core) queries: make them generate less SQL, make fewer database round-trips, and return results faster. Use whenever an EF Core or DbContext query or data-access path is slow or should be made faster — whether or not EF Core owns the database…
csharp-developer
Use when building C# applications with .NET 8+, ASP.NET Core APIs, or Blazor web apps. Builds REST APIs using minimal or controller-based routing, configures database access with Entity Framework Core, implements async patterns and cancellation, structures applications with CQRS via MediatR, and scaffolds Blazor…
dotnet-core-expert
Use when building .NET 8 applications with minimal APIs, clean architecture, or cloud-native microservices. Invoke for Entity Framework Core, CQRS with MediatR, JWT authentication, AOT compilation.
entity-framework-core
Design, tune, or review EF Core data access with proper modeling, migrations, query translation, performance, and lifetime management for modern .NET applications. USE FOR: DbContext, migrations, model configuration, EF queries, tracking, loading, performance, transactions, and EF6 migration decisions. DO NOT USE FOR…
efcore-patterns
Entity Framework Core best practices including NoTracking by default, query splitting for navigation collections, migration management, dedicated migration services, and common pitfalls to avoid.