/arbiter-skills:arbiter-mappingfrom arbiter-skills
Defines and registers Arbiter.Mapping source-generated mappers using [GenerateMapper], partial classes, and DI. Supports IQueryable projection and AOT-friendly mapping.
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.
Roslyn incremental source generator that emits object-to-object mapping code at build time. Zero reflection, AOT-friendly, supports records, init-only properties, primary constructors, and IQueryable projection.
dotnet add package Arbiter.Mapping
The generator (Arbiter.Mapping.Generators) is referenced transitively. Mapping classes must be partial so the generator can emit the implementation.
using Arbiter.Mapping;
[GenerateMapper]
public partial class UserToUserDtoMapper : MapperProfile<User, UserDto>
{
protected override void ConfigureMapping(MappingBuilder<User, UserDto> mapping)
{
mapping.Property(d => d.FullName) .From(s => s.FirstName + " " + s.LastName);
mapping.Property(d => d.Age) .From(s => DateTime.Now.Year - s.BirthDate.Year);
mapping.Property(d => d.DepartmentName) .From(s => s.Department!.Name);
mapping.Property(d => d.AddressCount) .From(s => s.Addresses.Count());
// Properties with matching names + compatible types are mapped automatically.
}
}
If no overrides are needed, leave ConfigureMapping empty (or omit it) — the generator still emits the auto-property mapping.
Register each closed mapper plus the generic dispatcher:
services.AddSingleton<IMapper<User, UserDto>, UserToUserDtoMapper>();
services.AddSingleton<IMapper, ServiceProviderMapper>();
ServiceProviderMapper implements the non-generic IMapper and looks up the right IMapper<TSrc, TDst> on demand.
public class UserService
{
private readonly IMapper<User, UserDto> _mapper;
public UserService(IMapper<User, UserDto> mapper) => _mapper = mapper;
public UserDto ToDto(User user) => _mapper.Map(user);
}
// Or via the generic IMapper:
UserDto dto = mapper.Map<User, UserDto>(user);
IQueryable<User> users = db.Users.Where(u => u.IsActive);
// Translates property selection into the underlying query (EF Core, etc.)
IQueryable<UserDto> dtos = users.ProjectTo<User, UserDto>(mapper);
var list = await dtos.ToListAsync(ct);
Supported out of the box — name the parameter or init property to match the source property, or add a mapping.Property(...).From(...) override.
public record UserDto(int Id, string FullName, int Age);
[GenerateMapper]
public partial class UserToUserDtoMapper : MapperProfile<User, UserDto>
{
protected override void ConfigureMapping(MappingBuilder<User, UserDto> m)
{
m.Property(d => d.FullName).From(s => s.FirstName + " " + s.LastName);
m.Property(d => d.Age).From(s => DateTime.Now.Year - s.BirthDate.Year);
}
}
partial and derive from MapperProfile<TSrc, TDst>.partial class DtoToUserMapper : MapperProfile<UserDto, User> if you need the reverse.ServiceProviderMapper is the single non-generic entry point.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-commandquery-mongoUse when wiring Arbiter.CommandQuery with MongoDB — AddMongoRepository plus AddEntityQueries / AddEntityCommands for an IMongoEntityRepository<TEntity>. Trigger on IMongoRepository, IMongoEntityRepository, MongoDB document handlers./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.Other plugins' skills for the same job