/arbiter-skills:arbiter-commandquery-mongofrom arbiter-skills
Wires Arbiter.CommandQuery with MongoDB by registering AddMongoRepository and per-entity AddEntityQueries/AddEntityCommands for IMongoEntityRepository<TEntity>.
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.
MongoDB implementations of the generic Arbiter.CommandQuery handlers. Uses IMongoRepository<TEntity, TKey> (typically resolved as IMongoEntityRepository<TEntity>) as the data gateway.
dotnet add package Arbiter.CommandQuery.MongoDB
Pairs with Arbiter.CommandQuery (base) and Arbiter.Mapping.
using Arbiter.CommandQuery;
using Arbiter.CommandQuery.MongoDB;
// MongoDB repository services (connection-string name)
services.AddMongoRepository("Tracker");
// 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 (TRepository is the concrete repo interface)
services.AddEntityQueries <IMongoEntityRepository<Product>, Product, string, ProductReadModel>();
services.AddEntityCommands<IMongoEntityRepository<Product>, Product, string, ProductReadModel, ProductCreateModel, ProductUpdateModel>();
public class Product : IHaveIdentifier<string>,
ITrackCreated, ITrackUpdated
{
public string Id { get; set; } = "";
public string Name { get; set; } = "";
public DateTimeOffset Created { get; set; }
public string? CreatedBy { get; set; }
public DateTimeOffset Updated { get; set; }
public string? UpdatedBy { get; set; }
}
Mongo entities typically use string keys. Marker interfaces (ITrackCreated, ITrackUpdated, ITrackDeleted, IHaveTenant<TKey>) opt into the standard behaviors just like the EF flavor — see arbiter-commandquery.
services.AddEntityIdentifierQuery <string, ProductReadModel, MyHandler>();
services.AddEntityPagedQuery <ProductReadModel, MyHandler>();
services.AddEntityCreateCommand<IMongoEntityRepository<Product>, Product, string, ProductReadModel, ProductCreateModel>();
services.AddEntityUpdateCommand<IMongoEntityRepository<Product>, Product, string, ProductReadModel, ProductUpdateModel>();
services.AddEntityPatchCommand <IMongoEntityRepository<Product>, Product, string, ProductReadModel>();
services.AddEntityDeleteCommand<IMongoEntityRepository<Product>, Product, string, ProductReadModel>();
Key-based (natural-key) lookup:
services.AddEntityKeyQuery<IMongoEntityRepository<Product>, Product, string, ProductReadModel>();
Same as the EF flavor — the handlers conform to the shared Arbiter.CommandQuery request types, so callers don't change:
var product = await mediator.Send(
new EntityIdentifierQuery<string, ProductReadModel>(principal, id), ct);
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub loresoft/arbiter --plugin arbiter-skills14 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-efUse when wiring Arbiter.CommandQuery with Entity Framework Core — registering AddEntityQueries / AddEntityCommands / AddQueryPipeline for an entity, defining DbContext-backed handlers, or implementing audited / soft-delete / tenant entities for EF Core./arbiter-communicationUse when sending templated email or SMS via Arbiter.Communication — AddEmailServices / AddSmsServices, IEmailDeliveryService / ISmsDeliveryService, template resolvers, or wiring a delivery provider like Azure Communication Services, Microsoft Graph, SendGrid, Twilio, or SMTP./arbiter-dispatcherUse when wiring the Blazor IDispatcher abstraction from Arbiter.Dispatcher — MessagePackDispatcher / JsonDispatcher for WebAssembly, ServerDispatcher for Server Interactive, AddDispatcherService + MapDispatcherService on the host, or component state helpers ModelStateManager / ModelStateLoader / ModelStateEditor. Trigger on Blazor Auto render mode setup./arbiter-endpointsUse when exposing Arbiter commands and queries as REST via Minimal APIs — AddEndpointRoutes, MapEndpointRoutes, EntityCommandEndpointBase, EntityQueryEndpointBase, IEndpointRoute. Trigger on Minimal API endpoint registration for CRUD entities./arbiter-mappingUse when defining or registering Arbiter.Mapping source-generated mappers — [GenerateMapper] attribute, partial class deriving from MapperProfile<TSource, TDestination>, ConfigureMapping with MappingBuilder, IMapper / IMapper<TSrc,TDst>, ProjectTo for IQueryable, ServiceProviderMapper registration.Other plugins' skills for the same job