ef-core

ef-core is a skill for Claude Code from codewithmukesh/dotnet-claude-kit. It costs 113 tokens per session (2,047 once invoked), scanned A, original, MIT.

A set of patterns for using Entity Framework Core, a .NET library that lets code work with databases, in .NET 10 applications.

In plain words
What is it for?
Use it when configuring database access, writing queries, creating migrations, adding database interceptors, or improving query performance.
Why use it?
It helps avoid inefficient database queries, poorly organized database code, and unsafe handling of schema changes, which define how a database is structured.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dotnet-claude-kit plugin — 51 skills, 11 agents, 2 hooks, 1 MCP server shipped together

not rated 805repo +8 2d ago A scan Socket: passSnyk: passSkillSpector: pass 113 tokens original MIT

Good fit Use it when configuring database access, writing queries, creating migrations, adding database interceptors, or improving query performance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/codewithmukesh/dotnet-claude-kit/ef-core
Install

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.

Any agent
npx skills add codewithmukesh/dotnet-claude-kit --skill ef-core
Clone the repo
git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit

Made for: Claude Code.

Or install dotnet-claude-kit, the plugin that ships this one along with the rest of its 51 skills, 11 agents, 2 hooks, 1 MCP server.

Wrote 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.

agentmods badge for ef-core

README.md
[![agentmods](https://agentmods.dev/badge/skills/codewithmukesh/dotnet-claude-kit/ef-core/github.svg)](https://agentmods.dev/skills/codewithmukesh/dotnet-claude-kit/ef-core)
Your own site
<a href="https://agentmods.dev/skills/codewithmukesh/dotnet-claude-kit/ef-core"><img src="https://agentmods.dev/badge/skills/codewithmukesh/dotnet-claude-kit/ef-core/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.

agentmods 80×15 button for ef-core

Your own site · 80×15
<a href="https://agentmods.dev/skills/codewithmukesh/dotnet-claude-kit/ef-core"><img src="https://agentmods.dev/badge/skills/codewithmukesh/dotnet-claude-kit/ef-core.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,047 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 14 Sept 2026
  • Snyk pass 14 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00113 $0.02047
Opus 5.5 $0.00045 $0.00819
Sonnet 5.5 $0.00023 $0.00409
Haiku 4.5 $0.00011 $0.00205

Measured 2mo ago against content hash 38d4c1671dc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ef-core 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 2mo 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.

skills/ef-core/SKILL.md · 310 lines

How it starts

The opening of the file, as written. The whole thing — 310 lines — stays where its author put it; the contents beside it link to each section on GitHub.

EF Core (.NET 10)

Core Principles

  1. EF Core is the default ORM — Use it unless you have a specific reason not to (extreme perf, legacy DB without FK constraints). See ADR-003.
  2. DbContext is a unit of work — Don't wrap it in another UoW abstraction. EF Core already implements Unit of Work and Repository patterns internally.
  3. Queries should be projections — Use .Select() to project into DTOs instead of loading full entities. This avoids over-fetching and N+1 issues.
  4. Migrations are code — Treat them like any other source code. Review them, test them, never auto-apply in production.

Patterns

DbContext Configuration

Use IEntityTypeConfiguration<T> to keep entity configs separate and discoverable.

// Persistence/AppDbContext.cs
public class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options)
{
    public DbSet<Order> Orders => Set<Order>();
    public DbSet<Product> Products => Set<Product>();

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
    }
}

// Persistence/Configurations/OrderConfiguration.cs
public class OrderConfiguration : IEntityTypeConfiguration<Order>
{
    public void Configure(EntityTypeBuilder<Order> builder)
    {
        builder.HasKey(o => o.Id);

        builder.Property(o => o.Total)
            .HasPrecision(18, 2);

        builder.HasMany(o => o.Items)
            .WithOne()
            .HasForeignKey(i => i.OrderId)
            .OnDelete(DeleteBehavior.Cascade);

        builder.HasIndex(o => o.CustomerId);
        builder.HasIndex(o => o.CreatedAt);
    }
}

Registration

// Program.cs
builder.Services.AddDbContext<AppDbContext>(options =>
    options.UseNpgsql(builder.Configuration.GetConnectionString("Default")));

Query Projections (Avoid Over-Fetching)

// GOOD — project to DTO, only loads needed columns
public async Task<OrderResponse?> GetOrderAsync(Guid id, CancellationToken ct)
{
    return await db.Orders
        .Where(o => o.Id == id)
        .Select(o => new OrderResponse(
            o.Id,
            o.Total,
            o.CreatedAt,
            o.Items.Select(i => new OrderItemResponse(i.ProductName, i.Quantity, i.Price)).ToList()))
        .FirstOrDefaultAsync(ct);
}

Read the full file on GitHub · 310 lines

Changes

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.

  1. 2mo ago First seen · 310 lines · 113 tokens per session scan A 38d4c1671dc3

Subscribe to this mod's changes

ef-core is a skill published in the GitHub repository codewithmukesh/dotnet-claude-kit (805 stars, last pushed 2d ago), licensed MIT. It adds 113 tokens to every session and 2,047 once invoked, about $0.0005 per session on Opus 5.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-08-30.

Related

ef-core compared with skills from other repositories

ef-core next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ef-corecodewithmukesh/dotnet-claude-kitSkill8052d agoMITA113Claude Code
optimizing-ef-core-queriesdotnet/skillsSkill5.8kyesterdayMITA116Claude Code
azure-resource-manager-postgresql-dotnetmicrosoft/skillsSkill3.2kyesterdayMITA97Claude Code
efcore-patternsAaronontheweb/dotnet-skillsSkill1.3k9d agoMITA35Claude Code
entity-framework-coremanagedcode/dotnet-skillsSkill508yesterdayMITA110Claude Code, Codex
entity-framework6managedcode/dotnet-skillsSkill508yesterdayMITA114Claude Code, Codex
neo4j-driver-dotnet-skillneo4j-contrib/neo4j-skillsSkill1204d agoMITA187Claude Code