/dknet-skills:dknet-packagesfrom dknet-skills
Routes .NET 10 DDD/Onion Architecture needs to the correct DKNet NuGet package. Covers package selection, Program.cs wiring order, DI conventions, and removed/renamed APIs. Use when starting a DKNet project or migrating off deprecated packages.
Ships in dknet-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
DKNet is 29 independent .NET 10 packages (28 published to NuGet, 1 source-only) for DDD + Onion Architecture — there is no AddDKNet() and no aggregator. This skill routes a need to the right package and the sibling skill that teaches it, and gives the setup order, DI conventions, and removed/renamed APIs that span every package. It does not teach any package's API in depth — read the owning skill (last column below) before writing code against it. Full detail lives in references/package-catalog.md, references/removed-and-renamed.md, and references/namespace-imports.md.
Every ring of the onion is a separate package; every dependency points inward, toward DKNet.EfCore.Abstractions or a foundation package. No cycle exists.
| Ring | Packages |
|---|---|
| Domain (core) | DKNet.EfCore.Abstractions |
| Application | DKNet.SlimBus.Extensions, DKNet.Svc.* |
| Infrastructure | DKNet.EfCore.Extensions, .Specifications, .Hooks, .Events, .AuditLogs, .DataAuthorization, .Relational.Helpers |
| Presentation | DKNet.AspCore.* |
DKNet.AspCore.Extensions is not application-ring-only: it carries a direct dependency on DKNet.EfCore.Specifications (infrastructure ring) for its MapGetById/MapGetList/MapDeleteById endpoint helpers. DKNet.EfCore.Encryption and the two Roslyn generators (DKNet.EfCore.DtoGenerator, DKNet.SlimBus.Generators) sit outside the rings entirely — no runtime ProjectReference to any other DKNet package. The "Depends on" column below is the real dependency graph, verified against every package's project file.
| Package | Install | What it gives you | Depends on | Reference |
|---|---|---|---|---|
DKNet.Fw.Extensions | dotnet add package DKNet.Fw.Extensions | Reflection, type, string, enum helpers; assembly scanning | — | dknet-core-utilities |
DKNet.RandomCreator | dotnet add package DKNet.RandomCreator | Cryptographically secure random strings/tokens | — | dknet-core-utilities |
DKNet.EfCore.Abstractions | dotnet add package DKNet.EfCore.Abstractions | Entity base classes, domain-event queue, attributes | — | dknet-efcore-domain-model |
DKNet.EfCore.Extensions | dotnet add package DKNet.EfCore.Extensions | Config discovery, global filters, seeding, GUID v7, sequences | Fw.Extensions, EfCore.Abstractions | dknet-efcore-domain-model |
DKNet.EfCore.Relational.Helpers | dotnet add package DKNet.EfCore.Relational.Helpers | Table create/exists/connection/name across providers | EfCore.Extensions | dknet-efcore-domain-model |
DKNet.EfCore.Specifications | dotnet add package DKNet.EfCore.Specifications | Query/persist via IRepositorySpec; dynamic predicates | EfCore.Extensions | dknet-efcore-specifications |
DKNet.EfCore.Hooks | dotnet add package DKNet.EfCore.Hooks | Before/after-SaveChanges interceptor pipeline | Fw.Extensions, EfCore.Extensions | dknet-efcore-save-pipeline |
DKNet.EfCore.Events | dotnet add package DKNet.EfCore.Events | Dispatches queued domain events after commit | EfCore.Abstractions, EfCore.Hooks | dknet-efcore-save-pipeline |
DKNet.EfCore.AuditLogs | dotnet add package DKNet.EfCore.AuditLogs | Field-level change history, redaction | EfCore.Abstractions, EfCore.Hooks | dknet-efcore-save-pipeline |
DKNet.EfCore.DataAuthorization | dotnet add package DKNet.EfCore.DataAuthorization | Row-level ownership filter + owner stamping | EfCore.Extensions, EfCore.Hooks, EfCore.AuditLogs | dknet-efcore-data-security |
DKNet.EfCore.Encryption | dotnet add package DKNet.EfCore.Encryption | Transparent column encryption (ValueConverter) | — | dknet-efcore-data-security |
DKNet.EfCore.DtoGenerator | dotnet add package DKNet.EfCore.DtoGenerator | Roslyn generator: DTOs from [GenerateDto] | — | dknet-codegen |
DKNet.SlimBus.Extensions | dotnet add package DKNet.SlimBus.Extensions | CQRS on SlimMessageBus; auto-save; events onto the bus | EfCore.Events | dknet-slimbus-cqrs |
DKNet.SlimBus.Generators | dotnet add package DKNet.SlimBus.Generators | Roslyn generator: CRUD slice from [CrudAction] | — | dknet-codegen |
DKNet.AspCore.Extensions | dotnet add package DKNet.AspCore.Extensions | Endpoint groups, .Response(), contextual request binding | SlimBus.Extensions, EfCore.Specifications | dknet-aspcore-api |
DKNet.AspCore.Tasks | dotnet add package DKNet.AspCore.Tasks | Runs an IBackgroundTask once at start-up | — | dknet-aspcore-api |
DKNet.AspCore.Idempotency | dotnet add package DKNet.AspCore.Idempotency | Retry-safe endpoints; process-local store built in | Fw.Extensions | dknet-idempotency |
DKNet.AspCore.Idempotency.Relational | dotnet add package DKNet.AspCore.Idempotency.Relational | Shared EF Core base the two relational stores derive from | AspCore.Idempotency | dknet-idempotency |
DKNet.AspCore.Idempotency.MsSqlStore | dotnet add package DKNet.AspCore.Idempotency.MsSqlStore | SQL Server idempotency key store | AspCore.Idempotency, .Relational | dknet-idempotency |
DKNet.AspCore.Idempotency.NpgsqlStore | dotnet add package DKNet.AspCore.Idempotency.NpgsqlStore | PostgreSQL idempotency key store | AspCore.Idempotency, .Relational | dknet-idempotency |
DKNet.AspCore.Idempotency.RedisStore | dotnet add package DKNet.AspCore.Idempotency.RedisStore | Redis idempotency key store (SET NX, native TTL) | AspCore.Idempotency | dknet-idempotency |
DKNet.Svc.BlobStorage.Abstractions | dotnet add package DKNet.Svc.BlobStorage.Abstractions | Provider-agnostic IBlobService contract | — | dknet-blob-storage |
DKNet.Svc.BlobStorage.AwsS3 | dotnet add package DKNet.Svc.BlobStorage.AwsS3 | AWS S3 (and S3-compatible) adapter | Svc.BlobStorage.Abstractions | dknet-blob-storage |
DKNet.Svc.BlobStorage.AzureStorage | dotnet add package DKNet.Svc.BlobStorage.AzureStorage | Azure Blob Storage adapter | Svc.BlobStorage.Abstractions | dknet-blob-storage |
DKNet.Svc.BlobStorage.Local | dotnet add package DKNet.Svc.BlobStorage.Local | Local-filesystem adapter, path-traversal safe | Svc.BlobStorage.Abstractions | dknet-blob-storage |
DKNet.Svc.Encryption | dotnet add package DKNet.Svc.Encryption | Explicit AES-GCM/RSA, HMAC/SHA, Base64 | — | dknet-services |
DKNet.Svc.PdfGenerators | dotnet add package DKNet.Svc.PdfGenerators | Markdown/HTML to PDF via headless Chromium | — | dknet-services |
DKNet.Svc.Transformation | dotnet add package DKNet.Svc.Transformation | Bracketed-token substitution in template strings | — | dknet-services |
Aspire.Hosting.ServiceBus | ProjectReference (source-only, not on NuGet) | Azure Service Bus emulator for a local Aspire AppHost | — | dknet-slimbus-cqrs |
The smallest DDD-shaped API: entities, EF Core wiring, and one query through IRepositorySpec. Every other example in this skill reuses the types declared here.
dotnet add package DKNet.EfCore.Abstractions # entity base classes, domain-event queue
dotnet add package DKNet.EfCore.Extensions # config discovery, global filters, GUID v7
dotnet add package DKNet.EfCore.Specifications # query/persist via IRepositorySpec
dotnet add package DKNet.SlimBus.Extensions # CQRS handlers with automatic SaveChanges
using DKNet.AspCore.Extensions;
using DKNet.EfCore.Abstractions.Entities;
using DKNet.EfCore.Abstractions.Events;
using DKNet.EfCore.Specifications.Definitions;
using Microsoft.EntityFrameworkCore;
public class Product : AuditedEntity
{
private Product() { } // EF Core
public static Product Create(string name, decimal price, string createdBy)
{
var product = new Product { Name = name, Price = price, IsActive = true };
product.SetCreatedBy(createdBy);
return product;
}
public string Name { get; private set; } = string.Empty;
public decimal Price { get; private set; }
public bool IsActive { get; private set; }
public void Deactivate(string updatedBy)
{
IsActive = false;
SetUpdatedBy(updatedBy);
}
}
public sealed class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options)
{
public DbSet<Product> Products => Set<Product>();
}
public sealed class ActiveProductsSpec : Specification<Product>
{
public ActiveProductsSpec()
{
WithFilter(p => p.IsActive);
AddOrderBy(p => p.Name);
}
}
public sealed class ProductByIdSpec : Specification<Product>
{
public ProductByIdSpec(Guid id) => WithFilter(p => p.Id == id);
}
public sealed class ConsoleEventPublisher : DefaultEventPublisher
{
public override Task PublishAsync(object eventObj, CancellationToken cancellationToken = default)
{
Console.WriteLine(eventObj);
return Task.CompletedTask;
}
}
public sealed class ProductsEndpoints : IEndpointConfig
{
public string GroupEndpoint => "/products";
public void Map(RouteGroupBuilder group) =>
group.MapGet("/", () => Results.Ok(Array.Empty<string>()));
}
Wire the DbContext and the specification repository — UseAutoConfigModel goes inside the options callback, never in OnModelCreating:
using DKNet.EfCore.Hooks;
using DKNet.EfCore.Specifications;
using Microsoft.EntityFrameworkCore;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContextWithHook<AppDbContext>(options => options
.UseSqlServer(builder.Configuration.GetConnectionString("Default")!)
.UseAutoConfigModel<AppDbContext>());
builder.Services.AddSpecRepo<AppDbContext>();
var app = builder.Build();
app.Run();
Query through the specification — one non-generic IRepositorySpec serves every entity type:
using DKNet.EfCore.Specifications.Extensions;
using DKNet.EfCore.Specifications.Repositories;
public sealed class Catalogue(IRepositorySpec repo)
{
public Task<List<Product>> ActiveAsync(CancellationToken cancellationToken = default) =>
repo.ToListAsync(new ActiveProductsSpec(), cancellationToken);
}
There is no AddDKNet() and no aggregator. Install and register only the packages a given DbContext, API, or worker actually needs — nothing requires a companion "core" package.
Route by problem, then read the owning skill. Pick the package from the table above, then read its skill before writing code — this skill does not teach package internals.
Wire a new API in this order: DbContext(+Hook) -> Specifications -> optional cross-cutting hooks (events/audit/ownership, order-independent among themselves) -> SlimBus -> SlimMessageBus transport -> idempotency store -> endpoints. A step used out of order either no-ops silently (a hook registered before the DbContext step) or throws at first request (.RequiredIdempotentKey() with no store registered).
Use AddDbContextWithHook<TDbContext>() whenever anything hooks SaveChanges — domain events, audit logs, or ownership stamping. Plain AddDbContext<TDbContext> registers no interceptor, and those features attach but never fire, with no compile or runtime error.
UseAutoConfigModel<TContext>() is a DbContextOptionsBuilder<TContext> extension, not a ModelBuilder one. It belongs inside the AddDbContext(WithHook) options callback; using it in OnModelCreating fails to compile.
Every package's DI call fits one of four shapes — invent none of your own:
| Shape | Example |
|---|---|
| Bound from config | AddAzureStorageAdapter, AddS3BlobService, AddLocalDirectoryBlobService — the only three that read IConfiguration |
Delegate (Action<TOptions>) | AddIdempotentKey, AddTransformerService, the Action<AzureStorageOptions> overload of AddAzureStorageAdapter |
| Required argument | AddAesGcmEncryption(base64Key), AddRsaEncryption(privateKeyBase64), AddIdempotencyWithMsSqlStore(connectionString) |
| Type parameter (resolved from DI) | AddEfCoreEncryption<TKeyServiceImplementation>, AddDataOwnerProvider<TDbContext,TProvider>, AddEventPublisher<TDbContext,TImpl>, AddIdempotentKey<TStore> |
DKNet.EfCore.Repos and DKNet.EfCore.Repos.Abstractions do not exist. dotnet add package will not find them. Use DKNet.EfCore.Specifications and AddSpecRepo<TDbContext>().
No AggregateRoot type ships. An aggregate root is just an Entity<TKey> / Entity / AuditedEntity<TKey> / AuditedEntity you choose to treat as a consistency boundary.
AddDataOwnerProvider<TDbContext,TProvider>() affects every DbContext in the process, not only TDbContext — its filter lives in a static, process-wide model-builder list. A second context with IOwnedBy entities must also implement IDataOwnerDbContext, or it throws at model-build time.
DKNet ships no validation pipeline and no SlimMessageBus transport provider. Bring your own IRequestHandlerInterceptor<TRequest,TResponse> for validation, and pick a transport (Memory, Azure Service Bus, ...) yourself — AddSlimMessageBus(...) is plain SlimMessageBus API, not a DKNet call.
When: starting a project that needs persistence, CQRS, and at least one retry-safe endpoint.
using DKNet.AspCore.Extensions.Endpoints;
using DKNet.AspCore.Idempotency;
using DKNet.AspCore.Idempotency.RedisStore;
using DKNet.EfCore.Hooks;
using DKNet.EfCore.Specifications;
using Microsoft.EntityFrameworkCore;
using SlimMessageBus.Host;
using SlimMessageBus.Host.Memory;
using SlimMessageBus.Host.Serialization.SystemTextJson;
var builder = WebApplication.CreateBuilder(args);
// 1. DbContext + hook interceptor + model build
builder.Services.AddDbContextWithHook<AppDbContext>(options => options
.UseSqlServer(builder.Configuration.GetConnectionString("Default")!)
.UseAutoConfigModel<AppDbContext>());
// 2. Querying/persistence through one non-generic IRepositorySpec
builder.Services.AddSpecRepo<AppDbContext>();
// 3 (skipped here, optional, order-independent once after step 1): AddEfCoreAuditLogs /
// AddCurrentUserProvider (dknet-efcore-save-pipeline), AddDataOwnerProvider (dknet-efcore-data-security).
// 4. CQRS auto-save + domain events forwarded onto the bus
builder.Services.AddSlimBusEventPublisher<AppDbContext>();
builder.Services.AddSlimBusEfCoreInterceptor<AppDbContext>();
// 5. SlimMessageBus itself - plain SlimMessageBus API, DKNet ships no transport provider
builder.Services.AddSlimMessageBus(mbb => mbb
.AddJsonSerializer()
.AddServicesFromAssembly(typeof(AppDbContext).Assembly)
.AddChildBus("Memory", mem => mem.WithProviderMemory().AutoDeclareFrom(typeof(AppDbContext).Assembly)));
// 6. Idempotency, registered before any route uses it
builder.Services.AddIdempotencyWithRedisStore(builder.Configuration.GetConnectionString("Redis")!);
var app = builder.Build();
// 7. Endpoints - convention-discovered groups, then a route guarded against duplicate submission
app.UseEndpointConfigs(o => o.EnableVersioning = false);
app.MapPost("/products", () => Results.Accepted()).RequiredIdempotentKey();
app.Run();
Notes:
UseEndpointConfigs throws at startup if EnableVersioning (default true) is left on without AddApiVersioning() having been called — disable it or call AddApiVersioning() first.AddDbContext vs AddDbContextWithHookWhen: a DbContext has no domain events, audit trail, or ownership filter.
using DKNet.EfCore.Specifications;
using Microsoft.EntityFrameworkCore;
var builder = WebApplication.CreateBuilder(args);
// No hooks needed - AddDbContext is enough. Its callback hands you a plain DbContextOptionsBuilder,
// not the generic DbContextOptionsBuilder<AppDbContext>, so UseAutoConfigModel needs its
// Assembly[] overload here instead of the <TContext> one AddDbContextWithHook's callback allows.
builder.Services.AddDbContext<AppDbContext>(options => options
.UseSqlServer(builder.Configuration.GetConnectionString("Default")!)
.UseAutoConfigModel(new[] { typeof(AppDbContext).Assembly }));
builder.Services.AddSpecRepo<AppDbContext>();
var app = builder.Build();
app.Run();
Notes:
SaveChanges hooked (events, audit, ownership), switch to AddDbContextWithHook<TDbContext>'s single-parameter overload (options => ...) and drop back to UseAutoConfigModel<AppDbContext>() — nothing else in this snippet changes.AddDbContextWithHook's other overload (Action<IServiceProvider, DbContextOptionsBuilder>, for reading a scoped service while configuring) hands you the same plain DbContextOptionsBuilder and hits the same UseAutoConfigModel(Assembly[]) requirement.When: a DbContext is already wired and now needs domain events (or audit/ownership - same shape).
using DKNet.EfCore.Hooks;
using DKNet.EfCore.Specifications;
using Microsoft.EntityFrameworkCore;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContextWithHook<AppDbContext>(options => options
.UseSqlServer(builder.Configuration.GetConnectionString("Default")!)
.UseAutoConfigModel<AppDbContext>());
builder.Services.AddSpecRepo<AppDbContext>();
// Added later - AddEventPublisher only needs the hook runner AddDbContextWithHook already
// registered above; its position relative to AddSpecRepo does not matter.
builder.Services.AddEventPublisher<AppDbContext, ConsoleEventPublisher>();
var app = builder.Build();
app.Run();
Notes:
AddEventPublisher<TDbContext,TImplementation>() lives in the ambient Microsoft.Extensions.DependencyInjection namespace — no using DKNet.EfCore.Events; needed.AddSlimBusEventPublisher, EventException, [RaisesEvent]) is dknet-efcore-save-pipeline's job, not this skill's.DKNet.EfCore.ReposWhen: existing code calls IRepository<T>/IWriteRepository<T>/IReadRepository<T> — all removed.
using DKNet.EfCore.Specifications.Extensions;
using DKNet.EfCore.Specifications.Repositories;
public sealed class ProductWriter(IRepositorySpec repo)
{
public async Task DeactivateAsync(Guid id, string updatedBy, CancellationToken cancellationToken = default)
{
var product = await repo.FirstAsync(new ProductByIdSpec(id), cancellationToken);
product.Deactivate(updatedBy);
await repo.UpdateAsync(product, cancellationToken);
await repo.SaveChangesAsync(cancellationToken);
}
}
Notes:
IRepositorySpec replaces a repository per entity; ISpecification<TEntity> (here ProductByIdSpec) replaces the ad hoc filter expressions the old repositories took directly.DeleteRange<TEntity> is now BulkDeleteAsync<TEntity>(predicate, ct) — a server-side ExecuteDeleteAsync, not a load-then-remove. See references/removed-and-renamed.md for the rest of the old-API-to-new-API mapping.When: a write endpoint must be safe for a client to retry.
using DKNet.AspCore.Idempotency;
using DKNet.AspCore.Idempotency.NpgsqlStore;
var builder = WebApplication.CreateBuilder(args);
if (builder.Environment.IsDevelopment())
builder.Services.AddIdempotentKey(); // process-local store: dev/test only, lost on restart
else
builder.Services.AddIdempotencyWithNpgsqlStore(builder.Configuration.GetConnectionString("Idempotency")!);
var app = builder.Build();
app.MapPost("/api/orders", () => Results.Accepted()).RequiredIdempotentKey();
app.Run();
Notes:
NpgsqlStore for MsSqlStore/RedisStore per deployment target — the call shape (AddIdempotencyWith{Store}(connectionString, config?)) is the same across all three.AddDbContextWithHook registers one hook runner per DbContext type; every AddHook/AddEfCoreAuditLogs/AddDataOwnerProvider/AddEventPublisher call attaches to that runner. AddIdempotentKey/AddIdempotencyWith*Store register IdempotencyOptions with ValidateOnStart(), so a bad option value fails startup, not the first request. UseEndpointConfigs discovers every IEndpointConfig in the scanned assemblies and fails fast if EnableVersioning is on without AddApiVersioning() — before mapping anything.EfAutoSavePostInterceptor calls SaveChangesAsync once the handler returns a non-failed result -> hooks run around that save (audit capture before, everything else after) -> queued domain events publish only once the save has actually committed. A failed save publishes nothing; a publisher that throws is logged and swallowed - the row still commits, the event is lost.AddDbContextWithHook is not automatic. Plain AddDbContext skips the hook interceptor entirely — events/audit/ownership hooks attach but never fire, with no compile or runtime error.UseAutoConfigModel<TContext>() only resolves when the options callback's parameter is already typed DbContextOptionsBuilder<TContext>. Plain AddDbContext<TContext>(options => ...) and AddDbContextWithHook's Action<IServiceProvider, DbContextOptionsBuilder> overload both hand you the non-generic DbContextOptionsBuilder instead — a real CS1929 if you call the <TContext> overload there. Use AddDbContextWithHook's single-parameter Action<DbContextOptionsBuilder<TDbContext>> overload, or fall back to UseAutoConfigModel(new[] { typeof(TContext).Assembly }).AddDataOwnerProvider's filter is process-static, not per-context. It lives in a static model-builder list, so every DbContext calling UseAutoConfigModel() gets it, not only the one named in the call.DbContext in scope of the filter that does not implement IDataOwnerDbContext throws at model-build time — that is intentional, not a bug to route around.AddEvent(instance) needs no IMapper; AddEvent<TEvent>()/[RaisesEvent] do, and skipping that registration throws EventException at save (loud). A publisher that itself throws is logged and swallowed instead (silent either way, the event is lost).Expiration, a ScopeHmacSecret) are silently dropped, not merged.AddIdempotentKey() store is memory-only, per process. Fine for dev/test; on multiple instances each gets its own ledger, so the same key is processed once per instance, not once total.AddCurrentUserProvider vs AddDataOwnerProvider decide what CreatedBy/UpdatedBy mean. Skip AddCurrentUserProvider and those fields silently repurpose to the tenant ownership key instead of naming a person.AddPdfGenerator takes a plain PdfGeneratorOptions? object, not an Action<TOptions> delegate — the one package that breaks the four-shapes pattern in Rule 6.netstandard2.0, not net10.0 — that lets the compiler load them; it does not change what your app targets.AddEventPublisher, AddSlimBusEventPublisher, AddSlimBusEfCoreInterceptor, and AddBackgroundJob live in the ambient Microsoft.Extensions.DependencyInjection namespace — no extra using needed, unlike most other DKNet setup calls. See references/namespace-imports.md.UseEndpointConfigs() throws at startup if versioning is on without AddApiVersioning(). Pass configureOptions: o => o.EnableVersioning = false if you are not ready to version endpoints yet.services.AddDKNet() — does not exist. Nothing aggregates the packages; register each one you need.AggregateRoot — does not exist in any DKNet namespace. Use Entity<TKey>, Entity, AuditedEntity<TKey>, or AuditedEntity.DKNet.EfCore.Repos, DKNet.EfCore.Repos.Abstractions — removed, never published; dotnet add package 404s. Use DKNet.EfCore.Specifications.IRepository<T>, IReadRepository<T>, IWriteRepository<T>, IRepositoryFactory, Repository<T> — removed with the packages above. Use IRepositorySpec/IRepositorySpecFactory.DKNet.EfCore.DtoEntities — never a published package name; the current internal test fixture is EfCore.DtoGenerator.TestEntities, not something an application references.IAesEncryption, AesEncryption, AddAesEncryption(...) — deleted, no compatibility shim. Use AddAesGcmEncryption(base64Key).AddIdempotencyWithRedisStore/...MsSqlStore/...NpgsqlStore are not in the base DKNet.AspCore.Idempotency namespace — each lives in its own store's namespace.EncryptionKeyProvider abstract class — gone; implement IEncryptionKeyProvider directly.ToProblemDetails(...) public overloads — gone; call .Response()/.Response<T>().The rest of the removed/renamed surface (typo'd names, changed parameter types, dropped interfaces) is in references/removed-and-renamed.md — check it before assuming an unfamiliar call is new rather than deleted.
// no-compile
public sealed class ProductRepository : IRepository<Product> // IRepository<T> was removed
{
}
dknet-packages — this skill: package router and setup order. Start here.dknet-efcore-domain-model — entities and EF Core model wiring (DKNet.EfCore.Abstractions, DKNet.EfCore.Extensions, DKNet.EfCore.Relational.Helpers).dknet-efcore-specifications — IRepositorySpec and dynamic predicates (DKNet.EfCore.Specifications).dknet-efcore-save-pipeline — SaveChanges hooks, domain events, audit logs (DKNet.EfCore.Hooks, DKNet.EfCore.Events, DKNet.EfCore.AuditLogs).dknet-efcore-data-security — row-level data authorization and column encryption (DKNet.EfCore.DataAuthorization, DKNet.EfCore.Encryption).dknet-codegen — source generators for DTOs and CRUD vertical slices (DKNet.EfCore.DtoGenerator, DKNet.SlimBus.Generators).dknet-slimbus-cqrs — CQRS with SlimMessageBus (DKNet.SlimBus.Extensions, Aspire.Hosting.ServiceBus).dknet-aspcore-api — minimal-API endpoint conventions and start-up tasks (DKNet.AspCore.Extensions, DKNet.AspCore.Tasks).dknet-idempotency — idempotent endpoints and key stores (DKNet.AspCore.Idempotency and its .Relational/.MsSqlStore/.NpgsqlStore/.RedisStore packages).dknet-blob-storage — blob storage abstraction and adapters (DKNet.Svc.BlobStorage.Abstractions, .AwsS3, .AzureStorage, .Local).dknet-services — application services: encryption, PDF, templates (DKNet.Svc.Encryption, DKNet.Svc.PdfGenerators, DKNet.Svc.Transformation).dknet-core-utilities — foundation helpers and secure random strings (DKNet.Fw.Extensions, DKNet.RandomCreator).dknet-testing — testing code built on DKNet, and testing inside the DKNet repo.references/package-catalog.md — all 29 packages: id, install command, one-line purpose, entry point, owning skill.references/removed-and-renamed.md — every removed/renamed API across the suite, with its replacement and source-verification status.references/namespace-imports.md — the full method/type -> namespace table, including which setup calls are ambient to Microsoft.Extensions.DependencyInjection and need no extra using.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dknet, nuget-packages, onion-architecture, ddd, dotnet-setup
npx claudepluginhub baoduy/dknet --plugin dknet-skills13 skills in this plugin
/dknet-aspcore-apiCovers DKNet.AspCore.Extensions and DKNet.AspCore.Tasks. Use when writing an IEndpointConfig group, calling UseEndpointConfigs for minimal-API endpoint discovery and DKNet API versioning, mapping verbs with MapGet/MapPost/MapPut/MapPatch/MapDelete/MapPutById/MapActionById/MapParameterlessActionById, building a generic list endpoint with MapGetList/MapGetById/MapDeleteById plus PagedResponse and ListFilter, converting a FluentResults Result to ProblemDetails via .Response()/.Response<T>() or AddErrorResponses, scoping authorization per verb with [EndpointGroupScope], populating [FromClaim]/[FromRequestHeader] members via AddContextualRequestPopulation, or registering IBackgroundTask with AddBackgroundJob/AddBackgroundJobFrom to run work once at host start-up./dknet-blob-storageCovers DKNet.Svc.BlobStorage.Abstractions, the .NET blob storage abstraction (IBlobService, BlobService, BlobRequest, BlobDetails.BlobData/BlobStreamData/BlobResult/BlobDataResult, BlobServiceOptions), plus its three providers: DKNet.Svc.BlobStorage.Local (AddLocalDirectoryBlobService, path-traversal-safe filesystem storage), DKNet.Svc.BlobStorage.AwsS3 (AddS3BlobService, AWS S3 and S3-compatible endpoints like MinIO and Cloudflare R2), and DKNet.Svc.BlobStorage.AzureStorage (AddAzureStorageAdapter, managed identity, SAS URLs). Use to upload, download, list, or delete files; wire DI/IConfiguration binding; generate a public or SAS URL; stream a large upload without buffering; test with Azurite or MinIO containers; or debug FileLoadException, InvalidOperationException, UnauthorizedAccessException path-traversal, or a GetAsync miss that throws on Local but returns null on S3/Azure./dknet-codegenCovers DKNet.EfCore.DtoGenerator's [GenerateDto(typeof(Entity))] generator (Include/Exclude/IgnoreComplexType, DtoGeneratorExclusions, DtoGeneratorIgnoreComplexType, DKDTOGEN001-005) plus its RaisesEventValidator for [RaisesEvent] (DKRAISEVT001-011); and DKNet.SlimBus.Generators' CrudGenerator, turning [CrudCreate]/[CrudUpdate]/[CrudAction] (DKNet.EfCore.Abstractions.Attributes) into request records, IHandler<,> implementations and Map{Entity}Crud endpoints (DKCRUDGEN001-010). Use when a source generator is not generating, a build reports a duplicate type generated, a generated request/handler/endpoint is missing, EmitCompilerGeneratedFiles is needed for .g.cs output, or before hand-writing what an attribute already emits. Also clarifies [FromClaim] is not a generator — it's runtime model binding in DKNet.AspCore.Extensions.ModelBinding (see dknet-aspcore-api)./dknet-core-utilitiesCovers DKNet.Fw.Extensions and DKNet.RandomCreator, the two dependency-light Core packages DKNet builds on. Fw.Extensions gives GetPropertyValue/SetPropertyValue/TrySetPropertyValue by dotted property path, IsImplementOf for open-generic type checks, TryConvertToEnum, enum [Display] attribute name lookup via GetEnumInfos<T>(), IsRegistered<T>()/IsRegisteredWithImplementation<T>() DI guards on IServiceCollection, and the lazy TypeExtractors assembly scanner to scan assemblies for types, e.g. Extract().Abstract().Publics() or Extract().Classes().NotAbstract().IsInstanceOf<T>(). RandomCreator gives RandomCreators.NewString/NewChars, a CSPRNG-only generator with StringCreatorOptions MinNumbers/MinSpecials exact quotas, to generate a secure password, token, or one-time code. Use when reading or writing object fields by name, checking an open-generic implementation, guarding a duplicate DI registration, converting a loose value to an enum, or generating a secure random string./dknet-efcore-data-securityCovers DKNet.EfCore.DataAuthorization and DKNet.EfCore.Encryption. DataAuthorization gives a multi-tenant row filter over IOwnedBy entities via IDataOwnerProvider and IDataOwnerDbContext.AccessibleKeys, wired with AddDataOwnerProvider<TDbContext,TProvider>; the global query filter fails closed (empty AccessibleKeys denies, not allows) and a SaveChanges hook stamps OwnedBy. Encryption encrypts a column transparently by marking a string property [Encrypted], registering AddEfCoreEncryption<TKeyProvider> plus an IEncryptionKeyProvider, then calling modelBuilder.UseColumnEncryption — a ValueConverter encryption pipeline producing an AES-GCM column with a random IV per write. Use this for tenant isolation EF Core wiring, rows leaking across tenants, an InvalidOperationException from UseColumnEncryption or DataOwnerAuthQuery, or key-rotation and IColumnEncryptionProvider questions./dknet-efcore-domain-modelCovers DKNet.EfCore.Abstractions, DKNet.EfCore.Extensions and DKNet.EfCore.Relational.Helpers: Entity<TKey>/Entity/AuditedEntity base classes, IConcurrencyEntity/ISoftDeletableEntity, GUID v7 keys, and the [RaisesEvent] declaration, [Sequence]/[SqlSequence], [AuditLog]/[SensitiveData] attributes; UseAutoConfigModel, IEntityTypeConfiguration discovery via DefaultEntityTypeConfiguration, global query filter (GlobalQueryFilter), data seeding, SQL sequences (NextSeqValue), SnapshotContext, SaveChangesWithConcurrencyHandlingAsync, role-aware [SensitiveData] JSON, and CreateTableAsync/TableExistsAsync for schema work outside migrations. Use when modeling an entity or aggregate, wiring DbContext model discovery, adding a concurrency token or soft delete, seeding reference data, generating sequence-backed codes, or provisioning a table without a migration.Other plugins' skills for the same job