/arbiter-skills:arbiter-commandquery-effrom arbiter-skills
Wires Arbiter.CommandQuery with Entity Framework Core, registering add-entity-queries/commands, defining DbContext-backed handlers, and implementing audited/soft-delete/tenant entities.
Ships in arbiter-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.
None: SKILL.md is the whole skill.
EF Core implementations of the generic Arbiter.CommandQuery handlers. Provides ready-made handlers for EntityIdentifierQuery, EntityPagedQuery, and the create/update/patch/delete commands against a DbContext.
dotnet add package Arbiter.CommandQuery.EntityFramework
Pairs with Arbiter.CommandQuery (base) and Arbiter.Mapping (read/update model mapping).
using Arbiter.CommandQuery;
using Arbiter.CommandQuery.EntityFramework;
// EF Core DbContext
services.AddDbContext<TrackerContext>(o => o.UseSqlServer(connectionString));
// CQRS + mapping
services.AddCommandQuery();
services.AddSingleton<IMapper, ServiceProviderMapper>();
services.AddSingleton<IMapper<Product, ProductReadModel>, ProductToReadModelMapper>();
services.AddSingleton<IMapper<ProductCreateModel, Product>, ProductCreateModelToProductMapper>();
services.AddSingleton<IMapper<ProductUpdateModel, Product>, ProductUpdateModelToProductMapper>();
// Per-entity registration
services.AddEntityQueries <TrackerContext, Product, int, ProductReadModel>();
services.AddEntityCommands<TrackerContext, Product, int, ProductReadModel, ProductCreateModel, ProductUpdateModel>();
AddEntityQueries registers identifier, identifiers, and paged-query handlers.
AddEntityCommands registers create, update, patch, and delete handlers.
public class Product : IHaveIdentifier<int>,
ITrackCreated, ITrackUpdated, // audit fields
ITrackDeleted // soft delete
{
public int Id { get; set; }
public string Name { get; set; } = "";
public decimal Price { get; set; }
public DateTimeOffset Created { get; set; }
public string? CreatedBy { get; set; }
public DateTimeOffset Updated { get; set; }
public string? UpdatedBy { get; set; }
public bool IsDeleted { get; set; }
}
Implementing IHaveIdentifier<TKey> is required. The other marker interfaces opt the entity into audit and soft-delete behaviors automatically — paged queries filter out soft-deleted rows; commands stamp audit fields from the ClaimsPrincipal.
Use these if you don't want every CRUD operation, or you want a custom handler for one:
// Queries
services.AddEntityIdentifierQuery <int, ProductReadModel, MyHandler>();
services.AddEntityIdentifiersQuery<int, ProductReadModel, MyHandler>();
services.AddEntityPagedQuery <ProductReadModel, MyHandler>();
// Commands (DbContext-backed)
services.AddEntityCreateCommand<TrackerContext, Product, int, ProductReadModel, ProductCreateModel>();
services.AddEntityUpdateCommand<TrackerContext, Product, int, ProductReadModel, ProductUpdateModel>();
services.AddEntityPatchCommand <TrackerContext, Product, int, ProductReadModel>();
services.AddEntityDeleteCommand<TrackerContext, Product, int, ProductReadModel>();
// Commands (custom handler)
services.AddEntityCreateCommand<int, ProductReadModel, ProductCreateModel, MyCreateHandler>();
AddQueryPipeline() registers EF-specific pipeline pieces (call once; included automatically by the helpers above).
// Entity implements IHaveKey + IHaveIdentifier<TKey>
services.AddEntityKeyQuery<TrackerContext, Product, ProductReadModel>();
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cqrs, entity-framework-core, dotnet, audit, soft-delete, tenant
14 skills in this plugin
/arbiter-commandqueryUse when working with Arbiter's CQRS base layer — EntityQuery, EntityFilter, FilterOperators, SortDirections, EntityPagedQuery, EntityIdentifierQuery, EntityCreateCommand / EntityUpdateCommand / EntityPatchCommand / EntityDeleteCommand, or pipeline behaviors like validation, hybrid cache, audit, tenant, soft-delete. Trigger on AddCommandQuery, AddCommandValidation, AddEntityHybridCache./arbiter-commandquery-mongoUse when wiring Arbiter.CommandQuery with MongoDB — AddMongoRepository plus AddEntityQueries / AddEntityCommands for an IMongoEntityRepository<TEntity>. Trigger on IMongoRepository, IMongoEntityRepository, MongoDB document handlers./arbiter-npx claudepluginhub loresoft/arbiter --plugin arbiter-skillsOther plugins' skills for the same job