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 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/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.
<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="Reviewed on agentmods" width="80" 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.00686 |
| Opus 5.5 | $0.00010 | $0.00274 |
| Sonnet 5.5 | $0.00005 | $0.00137 |
| Haiku 4.5 | $0.00002 | $0.00069 |
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 29d 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 — 80 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.
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
- Generate with
dotnet ef migrations add, then review and adjust the generatedUp/Down(a rename scaffolded as drop + add must becomeRenameColumn; data moves go inSql()). Never hand-write a migration from scratch — the model snapshot would drift dotnet ef database updatehas no dry-run: review the SQL withdotnet ef migrations script <from> <to>(--idempotentfor scripts run against unknown state)dotnet ef migrations has-pending-model-changes(EF Core 8+) fails when the model has changed since the last migration — use it as a CI gate- 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+)
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.
- 29d ago Changed · +6 lines 7b6a914ea0fc
- 1mo 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 (5 stars, last pushed 13d ago), licensed MIT. It adds 24 tokens to every session and 686 once invoked, about $0.0001 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-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.
language-csharp
C# and .NET idioms — .NET 8 LTS, C# NRT, records, value semantics, switch expressions, async/await, Task, ValueTask, CancellationToken, ConfigureAwait, IOptions , LINQ, Span , ArrayPool, hot path, allocation profiling, and performance. Auto-load when working with .cs files, .csproj, .sln, Directory.Build.props, or…
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.
add-migration
Create an EF Core migration for a specific microservice. Use after adding or modifying entities, DbSets, or entity configurations -- migration creation is mandatory for any schema change.