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, original, 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 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.00010 $0.00499
Opus 5.5 $0.00004 $0.00200
Sonnet 5.5 $0.00002 $0.00100
Haiku 4.5 $0.00001 $0.00050

Measured 2mo ago against content hash bd7f6824d9b7, 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • ef-core — 100% identical, 1 lines differ
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. 2mo 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 (4 stars, last pushed 3d ago), licensed MIT. It adds 10 tokens to every session and 499 once invoked, about $0.0000 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-09-03.

Related

ef-core compared with skills from other repositories

ef-core next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ef-coreOKHP3/skillzSkill43d agoMITA10Claude Code, Codex
neo-dotnet-ef-coreBenknightdark/neo-skillsSkill714d agoMITA46Claude Code, Codex
optimizing-ef-core-queriesdotnet/skillsSkill6.4ktodayMITA116Claude Code
scenario-unity-architecturescenario-labs/skillsSkill4.3kyesterdayMITA133Claude Code
efcore-patternsAaronontheweb/dotnet-skillsSkill1.3ktodayMITA35Claude Code
entity-framework-coremanagedcode/dotnet-skillsSkill52716d agoMITA110Claude Code, Codex
413-frameworks-quarkus-db-migrations-flywayjabrena/plinthSkill470todayApache-2.0A136Claude Code, Codex