01
It starts by itself
data access code changes. Runs in GitHub Actions or Claude Code routine.
- ↻ data access code changes
pull request touches DbContext, repositories or queries
Catch slow EF Core queries early.
Install the Optimizing EF Core Queries skill and make it a habit: follow https://gethabit.dev/skills/dotnet/optimizing-ef-core-queries.md
5K installs6K starsMIT licenceSource on GitHub ↗

Optimizing EF Core Queries
by dotnet · 5K installs
The skill
The optimizing ef core queries skill reviews and fixes Entity Framework Core data access: N+1 queries, premature materialization, index-hostile predicates, tracking, Includes, paging, bulk writes and DbContext overlap.
Only when you ask.
The habit
Catch slow EF Core queries early.
↻ Runs by itselfdata access code changes
When does it start? How does it check its work? What does it remember?
Stops after one pull request per run.
Your agent finds the DbContext, DbSets, repositories and model-building code.
It follows each query to execution and checks Queryable versus Enumerable.
It counts round-trips and SaveChanges calls on the calling path.
It checks predicates, projections, bounds, ordering, Includes, tracking and parameterization.
It lists prioritized findings with impact and a safe fix, and notes what was not validated.
For index fixes it adds a migration and asks you before any database update.
It writes only in its own folder and asks you before anything goes out.
Read both lists. If the left one sounds like you, the Optimizing EF Core Queries skill helps.
No. It adds a migration and waits for your approval before updating the database.
No. For Dapper or raw ADO.NET it answers SQL questions without EF Core APIs.
Copy the prompt at the top into your agent. It installs the skill from dotnet/skills and sets up the habit. Or run npx skills add dotnet/skills --skill optimizing-ef-core-queries.
Yes. It is published under MIT. Habit is free too.
Install the Optimizing EF Core Queries skill and make it a habit: follow https://gethabit.dev/skills/dotnet/optimizing-ef-core-queries.md
All dotnet skills →More code skills →
Works in
Made by dotnet, published under MIT. Habit links to the original and never changes it. Is this your skill?