ef-core

ef-core is a skill for Claude Code, Codex from OKHP3/skillz. It costs 10 tokens per session (499 once invoked), scanned A, a copy of ef-core, MIT.

A reference for following best practices with Entity Framework Core, a .NET library for working with databases from C# applications.

In plain words
What is it for?
Use it to review DbContext design, entity relationships, query performance, pagination, related data loading, projections, migrations, and N+1 queries.
Why use it?
It helps avoid common data-access problems involving database design, slow queries, migrations, and unnecessarily large result sets.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to review DbContext design, entity relationships, query performance, pagination, related data loading, projections, migrations, and N+1 queries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/okhp3/skillz/ef-core
View source ↗ OKHP3/skillz
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 OKHP3/skillz --skill ef-core
Clone the repo
git clone --depth 1 https://github.com/OKHP3/skillz

Made for: Claude Code, Codex.

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/okhp3/skillz/ef-core/github.svg)](https://agentmods.dev/skills/okhp3/skillz/ef-core)
Your own site
<a href="https://agentmods.dev/skills/okhp3/skillz/ef-core"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/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/okhp3/skillz/ef-core"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/ef-core.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 499 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.
Origin 100% copy Near-identical to another mod 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.00010 $0.00499
Opus 5 $0.00005 $0.00249
Sonnet 5 $0.00002 $0.00100
Haiku 4.5 $0.00001 $0.00050

Measured 5d ago against content hash bd7f6824d9b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 5d 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.

Origin

This is a copy

100% identical to ef-core — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

community/ef-core/SKILL.md · 76 lines

How it starts

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

Entity Framework Core Best Practices

Your goal is to help me follow best practices when working with Entity Framework Core.

Data Context Design

  • Keep DbContext classes focused and cohesive
  • Use constructor injection for configuration options
  • Override OnModelCreating for fluent API configuration
  • Separate entity configurations using IEntityTypeConfiguration
  • Consider using DbContextFactory pattern for console apps or tests

Entity Design

  • Use meaningful primary keys (consider natural vs surrogate keys)
  • Implement proper relationships (one-to-one, one-to-many, many-to-many)
  • Use data annotations or fluent API for constraints and validations
  • Implement appropriate navigational properties
  • Consider using owned entity types for value objects

Performance

  • Use AsNoTracking() for read-only queries
  • Implement pagination for large result sets with Skip() and Take()
  • Use Include() to eager load related entities when needed
  • Consider projection (Select) to retrieve only required fields
  • Use compiled queries for frequently executed queries
  • Avoid N+1 query problems by properly including related data

Migrations

  • Create small, focused migrations
  • Name migrations descriptively
  • Verify migration SQL scripts before applying to production
  • Consider using migration bundles for deployment
  • Add data seeding through migrations when appropriate

Querying

  • Use IQueryable judiciously and understand when queries execute
  • Prefer strongly-typed LINQ queries over raw SQL
  • Use appropriate query operators (Where, OrderBy, GroupBy)
  • Consider database functions for complex operations
  • Implement specifications pattern for reusable queries

Change Tracking & Saving

  • Use appropriate change tracking strategies
  • Batch your SaveChanges() calls
  • Implement concurrency control for multi-user scenarios
  • Consider using transactions for multiple operations
  • Use appropriate DbContext lifetimes (scoped for web apps)

Security

  • Avoid SQL injection by using parameterized queries
  • Implement appropriate data access permissions
  • Be careful with raw SQL queries
  • Consider data encryption for sensitive information
  • Use migrations to manage database user permissions

Read the full file on GitHub · 76 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. 5d ago First seen · 76 lines · 10 tokens per session scan A bd7f6824d9b7

Subscribe to this mod's changes

ef-core is a skill published in the GitHub repository OKHP3/skillz (3 stars, last pushed yesterday), licensed MIT. It adds 10 tokens to every session and 499 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to ef-core, differing in 0 lines, and is treated as a copy.

Related

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.

Benknightdark/neo-skills · 46 tokens

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…

dotnet/skills · 86 tokens

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…

Jeffallan/claude-skills · 102 tokens

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.

Jeffallan/claude-skills · 47 tokens

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…

managedcode/dotnet-skills · 110 tokens

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.

Aaronontheweb/dotnet-skills · 35 tokens