From arbiter-skills
Wires Arbiter.CommandQuery with MongoDB by registering AddMongoRepository and per-entity AddEntityQueries/AddEntityCommands for IMongoEntityRepository<TEntity>.
How this skill is triggered — by the user, by Claude, or both
Slash command
/arbiter-skills:arbiter-commandquery-mongoThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
MongoDB implementations of the generic `Arbiter.CommandQuery` handlers. Uses `IMongoRepository<TEntity, TKey>` (typically resolved as `IMongoEntityRepository<TEntity>`) as the data gateway.
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);
npx claudepluginhub loresoft/arbiter --plugin arbiter-skillsWires Arbiter.CommandQuery with Entity Framework Core, registering add-entity-queries/commands, defining DbContext-backed handlers, and implementing audited/soft-delete/tenant entities.
Guides ABP Framework v10.x MongoDB integration: MongoDbContext, collection mapping, indexes, transactions, and repository patterns for .NET projects.
Quick reference for .NET 8+ ASP.NET Core Web APIs: controller-based and minimal APIs, Marten Postgres setup, Wolverine message bus. For backend .NET pattern lookups.