Agent skill · Microsoft (.NET)
Optimize EF Core Queries skill for Claude Code, Codex and Cursor
Officialname: optimizing-ef-core-queries★ 5.7k (repo)pushed 2026-10-24MITSKILL.md on GitHubchecked 2026-11-07
What it does, in the publisher's words
Review and optimize application data access that uses Entity Framework Core (EF Core). Use for EF Core performance and correctness reviews of services, repositories, imports, and background jobs: slow or memory-heavy queries, excessive round-trips, hidden SaveChanges, premature materialization, dynamic query construction, result-graph tracking, bulk writes, DbContext lifetime or overlapping operations, search...
The description field of the SKILL.md. The agent reads only this at startup and decides from it when to load the full skill.
Install Optimize EF Core Queries
The skills CLI copies the skill into the folder of each agent you pick (Claude Code, Codex, Cursor, Copilot, Gemini CLI, OpenCode, Windsurf...). Add -g for all projects. Needs Node.js 22.20+. docs
npx skills add dotnet/skills --skill optimizing-ef-core-queries
This repo is a plugin marketplace. Inside Claude Code, add it and install the plugin that holds the skill (dotnet, dotnet-advanced, dotnet-data, dotnet-diag...), or copy only this skill into ~/.claude/skills. docs
/plugin marketplace add dotnet/skills /plugin install <plugin>@dotnet-agent-skills # or only this skill: npx skills add dotnet/skills --skill optimizing-ef-core-queries -a claude-code
Download the skill folder, zip it, then Customize > Skills > + > Create skill > Upload a skill. Code execution must be on (Settings > Capabilities). docs
git clone --depth 1 https://github.com/dotnet/skills.git /tmp/optimizing-ef-core-queries-src cp -r /tmp/optimizing-ef-core-queries-src/plugins/dotnet-data/skills/optimizing-ef-core-queries ./optimizing-ef-core-queries zip -r optimizing-ef-core-queries.zip optimizing-ef-core-queries
Codex reads skills from .agents/skills in the repo or ~/.agents/skills. Type $ in Codex to use one. docs
npx skills add dotnet/skills --skill optimizing-ef-core-queries -a codex
gh skill (GitHub CLI 2.90+, preview) installs it for Copilot in VS Code, the CLI and the cloud agent. Copilot also reads .github/skills and ~/.copilot/skills. docs
gh skill install dotnet/skills optimizing-ef-core-queries
Cursor reads .cursor/skills, .agents/skills and ~/.cursor/skills (and .claude/skills). It does not install loose skills from a GitHub URL, so copy it in. docs
npx skills add dotnet/skills --skill optimizing-ef-core-queries -a cursor
Installs from the GitHub repo; --path picks this skill out of the repo. Default scope is user (all projects). docs
gemini skills install https://github.com/dotnet/skills.git --path plugins/dotnet-data/skills/optimizing-ef-core-queries
OpenCode reads .opencode/skills, ~/.config/opencode/skills and the Claude and .agents folders. docs
npx skills add dotnet/skills --skill optimizing-ef-core-queries -a opencode
Windsurf (now Devin Desktop) reads .devin/skills, .windsurf/skills and ~/.codeium/windsurf/skills. docs
npx skills add dotnet/skills --skill optimizing-ef-core-queries -a windsurf
Works with
Claude Code, Claude.ai and Claude Desktop, Codex, GitHub Copilot, Cursor, Gemini CLI, OpenCode, Windsurf and other agents that read the open Agent Skills format.
What's in the SKILL.md
- When to Use
- When Not to Use
- Source review workflow
- Gate source-only findings on evidence
- Capture SQL and query counts
- Fixes
- Trace materialization and result bounds
- Keep predicates compatible with indexes
- Compile hot, frequently-executed queries
- Control SQL parameterization and database plan reuse
- Stabilize dynamically constructed query shapes
- Choose tracking for the actual result graph
- Remove N+1 and avoid lazy loading
- Separate join multiplication from wide-row duplication
- Filter and paginate; prefer keyset over offset
- Add missing indexes
- Trace persistence through repositories
- Bound change detection in growing imports
- Set-based bulk updates and deletes
- Keep DbContext operations non-overlapping
- Common Pitfalls
- References
Facts
- Skill name
- optimizing-ef-core-queries
- Publisher
- Microsoft (.NET) (official)
- Repo
- dotnet/skills
- License
- MIT
- SKILL.md size
- 3,012 words, 276 lines
- Repo stars
- 5.7k (as of 2026-10-24)
- SKILL.md checked
- 2026-11-07
More skills from dotnet/skills
- Analyze .NET Performance: Scans .NET code for common performance anti-patterns in async, memory, LINQ and I/O.
Related backend & databases skills
- Durable Objects · Cloudflare
- Supabase · Supabase
- Postgres Best Practices (Supabase) · Supabase
- Firebase Basics · Firebase (Google)
- Cloud Firestore · Firebase (Google)
- Sanity Best Practices · Sanity
- MongoDB Schema Design · MongoDB
- Neon Postgres · Neon
FAQ
What does the optimizing-ef-core-queries skill do?+
Reviews Entity Framework Core data access for slow, memory-heavy or incorrect queries. In its own SKILL.md, Microsoft (.NET) describes it as: "Review and optimize application data access that uses Entity Framework Core (EF Core). Use for EF Core performance and correctness reviews of services, repositories, imports, and background jobs: slow or memory-heavy queries, excessive round-trips, hidden SaveChanges, premature materialization,..."
How do I install the optimizing-ef-core-queries skill?+
Run npx skills add dotnet/skills --skill optimizing-ef-core-queries and pick your agents, or use the tab for your agent above. In Claude Code the skill ends up in ~/.claude/skills/optimizing-ef-core-queries/SKILL.md; in Codex and Cursor in .agents/skills/optimizing-ef-core-queries/.
Does Optimize EF Core Queries work in Codex, Cursor and Copilot, or only Claude?+
It's a standard SKILL.md, so any agent that reads the Agent Skills format can use it: Claude Code, the Claude apps, Codex, GitHub Copilot, Cursor, Gemini CLI, OpenCode, Windsurf and more.
Who maintains Optimize EF Core Queries?+
Microsoft (.NET), the company or project behind it, in the dotnet/skills repo on GitHub, last pushed 2026-10-24. License: MIT.
Read a skill's SKILL.md and scripts before you install it: skills aren't verified by any agent vendor. Claude skills marketplace · How to install skills · MCP servers