/arbiter-skills:arbiter-mediationfrom arbiter-skills
Wires and extends Arbiter.Mediation: defines IRequest/IRequestHandler, INotification/INotificationHandler, IPipelineBehavior, and calls services.AddMediator(). Use for mediator pattern, request/response, notifications/events, or pipeline middleware.
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.
Lightweight mediator: requests with typed responses, notifications, and pipeline behaviors. No reflection at the hot path, AOT-friendly.
dotnet add package Arbiter.Mediation
using Arbiter.Mediation;
// Singleton mediator by default; pass ServiceLifetime to change
services.AddMediator();
// Handlers and behaviors are registered separately
services.AddTransient<IRequestHandler<Ping, Pong>, PingHandler>();
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>));
AddMediator(ServiceLifetime serviceLifetime = ServiceLifetime.Singleton).
public class Ping : IRequest<Pong>
{
public string? Message { get; set; }
}
public class Pong
{
public string? Message { get; set; }
}
public class PingHandler : IRequestHandler<Ping, Pong>
{
public async ValueTask<Pong?> Handle(Ping request, CancellationToken cancellationToken = default)
{
await Task.Delay(10, cancellationToken);
return new Pong { Message = $"{request.Message} Pong" };
}
}
// Send
var pong = await mediator.Send(new Ping { Message = "Hello" }, cancellationToken);
public class UserCreated : INotification
{
public int UserId { get; init; }
}
public class SendWelcomeEmail : INotificationHandler<UserCreated>
{
public ValueTask Handle(UserCreated notification, CancellationToken cancellationToken)
{
// ...
return ValueTask.CompletedTask;
}
}
services.AddTransient<INotificationHandler<UserCreated>, SendWelcomeEmail>();
await mediator.Publish(new UserCreated { UserId = 42 }, cancellationToken);
public class LoggingBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
where TRequest : IRequest<TResponse>
{
private readonly ILogger<LoggingBehavior<TRequest, TResponse>> _logger;
public LoggingBehavior(ILogger<LoggingBehavior<TRequest, TResponse>> logger) => _logger = logger;
public async ValueTask<TResponse?> Handle(
TRequest request,
RequestHandlerDelegate<TResponse> next,
CancellationToken cancellationToken = default)
{
_logger.LogInformation("Handling {Request}", typeof(TRequest).Name);
var response = await next(cancellationToken);
_logger.LogInformation("Handled {Request}", typeof(TRequest).Name);
return response;
}
}
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>));
ValueTask<TResponse?> (nullable). Send returns TResponse?.arbiter-commandquery.arbiter-opentelemetry — sources are MediatorTelemetry.SourceName / MediatorTelemetry.MeterName.src/Arbiter.Mediation/What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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-Other plugins' skills for the same job