agentleFS
elidadutra187elidadutra187/claude-skills/skills/ef-core/SKILL.md

ef-core

Skill0 starsChanged 4 days agoMITView on GitHub

Use when working with Entity Framework Core in .NET applications, needing guidance on data context design, entity design, performance optimization, migrations, querying patterns, change tracking, security, or testing strategies.

7 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use de-sloppify, instinct-system and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ResgridSkill

    de-sloppify

    Systematic code cleanup pipeline for .NET projects. Runs 7 ordered steps: formatting, unused usings, analyzer warnings, dead code removal, TODO resolution, sealed class audit, and CancellationToken propagation. Each step is verified independently with tests between phases. Load this skill when: "clean up", "de-sloppify", "tidy up", "remove dead code", "code cleanup", "housekeeping", "tech debt", "fix warnings", "seal classes", "add CancellationToken", "unused usings", "format code".

    Also in 3 projects that use this

  • ResgridSkill

    instinct-system

    Confidence-scored instinct system for learning project-specific patterns through an observe-hypothesize-confirm cycle. Instincts start as low-confidence hypotheses and graduate to permanent rules in MEMORY.md once confirmed. Stored per-project in .Codex/instincts.md. Load this skill when you notice a recurring pattern, want to track a project convention, encounter "learn this", "I think they always", "notice a pattern", "instinct", "hypothesis", "confidence", or when starting a session (to load existing instincts).

    Also in 3 projects that use this

  • MovGP0Skill

    modern-csharp

    Modern C# style guidance for Bendex and MicroSea code changes, including primary constructors, expression-bodied members, var usage, target-typed new, lambdas, and pattern matching.

    Also in 3 projects that use this

  • sirdavidhuangSkill

    opentelemetry

    Implement OpenTelemetry (OTEL) observability - Collector configuration, Kubernetes deployment, traces/metrics/logs pipelines, instrumentation, and troubleshooting. Use when working with OTEL Collector, telemetry pipelines, observability infrastructure, or Kubernetes monitoring.

    Also in 3 projects that use this

  • MicrosoftSkill

    resilience

    Apply resilience patterns (retry, backoff, circuit breaking) when writing or reviewing code that makes outbound HTTP/REST calls, database operations, or any I/O that can experience transient failures. Use this skill when: (1) writing new code that calls external services or APIs, (2) reviewing code that uses fetch, HTTP clients, or service-to-service calls, (3) adding queue consumers or workers that interact with remote systems, (4) debugging intermittent failures in production.

    Also in 3 projects that use this

  • vmoranvSkill

    configuration

    Configuration reference: every environment variable, profile, and threshold for jshookmcp

    Also in 3 projects that use this

  • +2 more from Resgrid

The file

Show its rules and text

We split this skill into the rules it gives an agent

30 rules. 0 are common, 30 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 30

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep DbContext classes focused and cohesive

    line 13
  2. Distinctive:

    Use constructor injection for configuration options

    line 14
  3. Distinctive:

    Consider using DbContextFactory pattern for console apps or tests

    line 17
  4. Distinctive:

    Use meaningful primary keys (consider natural vs surrogate keys)

    line 21
  5. Distinctive:

    Use data annotations or fluent API for constraints and validations

    line 23
  6. Distinctive:

    Consider using owned entity types for value objects

    line 25
  7. Distinctive:

    Use AsNoTracking() for read-only queries

    line 29
  8. Distinctive:

    Use Include() to eager load related entities when needed

    line 31
  9. Distinctive:

    Consider projection (Select) to retrieve only required fields

    line 32
  10. Distinctive:

    Use compiled queries for frequently executed queries

    line 33
  11. Distinctive:

    Avoid N+1 query problems by properly including related data

    line 34
  12. Distinctive:

    Create small, focused migrations

    line 38
  13. Distinctive:

    Verify migration SQL scripts before applying to production

    line 40
  14. Distinctive:

    Consider using migration bundles for deployment

    line 41
  15. Distinctive:

    Add data seeding through migrations when appropriate

    line 42
  16. Distinctive:

    Use IQueryable judiciously and understand when queries execute

    line 46
  17. Distinctive:

    Prefer strongly-typed LINQ queries over raw SQL

    line 47
  18. Distinctive:

    Use appropriate query operators (Where, OrderBy, GroupBy)

    line 48
  19. Distinctive:

    Consider database functions for complex operations

    line 49
  20. Distinctive:

    Use appropriate change tracking strategies

    line 54
  21. Distinctive:

    Consider using transactions for multiple operations

    line 57
  22. Distinctive:

    Use appropriate DbContext lifetimes (scoped for web apps)

    line 58
  23. Distinctive:

    Avoid SQL injection by using parameterized queries

    line 62
  24. Distinctive:

    Consider data encryption for sensitive information

    line 65
  25. Distinctive:

    Use migrations to manage database user permissions

    line 66
  26. Distinctive:

    Use in-memory database provider for unit tests

    line 70
  27. Distinctive:

    Create separate testing contexts with SQLite for integration tests

    line 71
  28. Distinctive:

    Test migrations in isolated environments

    line 73
  29. Distinctive:

    Consider snapshot testing for model changes

    line 74
  30. Distinctive:

    When reviewing my EF Core code, identify issues and suggest improvements that follow these best practices.

    line 76

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

Testing

  • Use in-memory database provider for unit tests
  • Create separate testing contexts with SQLite for integration tests
  • Mock DbContext and DbSet for pure unit tests
  • Test migrations in isolated environments
  • Consider snapshot testing for model changes

When reviewing my EF Core code, identify issues and suggest improvements that follow these best practices.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.