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.
npx agentmods add skills/zdanovichnick/dotnet-pilot/ef-core-patternsnpx skills add zdanovichnick/dotnet-pilot --skill ef-core-patternsgit clone --depth 1 https://github.com/zdanovichnick/dotnet-pilotWrote 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.
[](https://agentmods.dev/skills/zdanovichnick/dotnet-pilot/ef-core-patterns)<a href="https://agentmods.dev/skills/zdanovichnick/dotnet-pilot/ef-core-patterns"><img src="https://agentmods.dev/badge/skills/zdanovichnick/dotnet-pilot/ef-core-patterns.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00024 | $0.00543 |
| Opus 5 | $0.00012 | $0.00271 |
| Sonnet 5 | $0.00005 | $0.00109 |
| Haiku 4.5 | $0.00002 | $0.00054 |
Grade A, and why
ef-core-patterns 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.
How it starts
The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
EF Core Patterns
Reference material for EF Core development. Used by dnp-ef-migration-planner and dnp-planner.
Migration Safety
Safe Operations
- Adding a new table
- Adding a nullable column
- Adding a column with a default value
- Adding an index
- Renaming (with
migrationBuilder.RenameColumn— preserves data)
Dangerous Operations (require confirmation)
- Dropping a column (data loss)
- Changing column type (potential data truncation)
- Adding NOT NULL column without default (fails on existing rows)
- Dropping a table (data loss)
- Removing an index (performance impact)
Migration Best Practices
- One migration per logical change
- Never edit generated migration files manually
- Always test with
--dry-runbefore applying - Keep migrations small and reversible
- Use
migrationBuilder.Sql()for data migrations, not EF operations
Configuration Patterns
Fluent API (preferred)
public class UserConfiguration : IEntityTypeConfiguration<User>
{
public void Configure(EntityTypeBuilder<User> builder)
{
builder.HasKey(u => u.Id);
builder.Property(u => u.Email).HasMaxLength(256).IsRequired();
builder.HasIndex(u => u.Email).IsUnique();
builder.HasMany(u => u.Orders).WithOne(o => o.User).HasForeignKey(o => o.UserId);
}
}
DbContext Registration
// In OnModelCreating:
modelBuilder.ApplyConfigurationsFromAssembly(typeof(ApplicationDbContext).Assembly);
Query Optimization
Do
- Use
AsNoTracking()for read-only queries - Use projections (
Select) to fetch only needed columns - Use
IncludewithThenIncludefor eager loading (avoid N+1) - Use split queries for many includes:
.AsSplitQuery() - Use
ExecuteUpdateAsync/ExecuteDeleteAsyncfor bulk operations (EF 7+)
Don't
- Don't call
ToList()before filtering (materializes entire table) - Don't use
Count()when you needAny() - Don't load navigation properties you don't need
- Don't use
FromSqlRawwith string interpolation (SQL injection risk) - Don't forget
CancellationTokenon async queries
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.
- 5d ago First seen · 74 lines · 24 tokens per session scan A 0ab7f2c851e7
ef-core-patterns is a skill published in the GitHub repository zdanovichnick/dotnet-pilot (4 stars, last pushed 9d ago), licensed MIT. It adds 24 tokens to every session and 543 once invoked, about $0.0001 per session on Opus 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-08-31.
Other skills, from other repositories
azure-resource-manager-postgresql-dotnet
Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…
entity-design
Design EF Core entities with navigation properties, value objects, Fluent API configuration, and audit fields. Use when creating new database entities, adding relationships, configuring owned types, designing a domain model for Entity Framework Core, or setting up table-per-hierarchy inheritance.
create-migration
Create and manage Entity Framework Core database migrations including schema changes, seed data, and rollback strategies. Use when adding or modifying EF Core entities, setting up a new DbContext, applying data seeding, running dotnet ef commands, or troubleshooting migration conflicts.
add-migration
Use when an EF Core model change needs a migration, or when a migration has to be reviewed as SQL before it is committed.
update-dependencies
Use when the task in front of you is to move dependency pins — packages in either stack, Rust crates, tools, SDKs, GitHub Action references, or container images — or to find out which of them are behind and whether any changed licence.
creating-oracle-to-postgres-master-migration-plan
Discovers all projects in a .NET solution, classifies each for Oracle-to-PostgreSQL migration eligibility, and produces a persistent master migration plan. Use when starting a multi-project Oracle-to-PostgreSQL migration, creating a migration inventory, or assessing which .NET projects contain Oracle dependencies.