/abp-sensei:abp-daprfrom ABP Sensei
ABP Framework v10.x Dapr integration for service invocation via C# API client proxies, distributed event bus over pub/sub, and distributed locking, with AbpDaprOptions and API token security.
Ships in ABP Sensei. 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.
ABP Framework v10.x (10.4–10.6) integration with Dapr (Distributed Application Runtime). ABP and Dapr intersect on service-to-service communication, distributed message bus, and distributed locking — ABP provides integration packages exactly at these intersection points. Other Dapr building blocks are used directly via Dapr's own documentation.
| Package | Purpose |
|---|---|
Volo.Abp.Dapr | Main integration package — all others depend on it (AbpDaprModule) |
Volo.Abp.Http.Client.Dapr | Dynamic/static C# API client proxies over Dapr service invocation (AbpHttpClientDaprModule) |
Volo.Abp.EventBus.Dapr | Distributed event bus via Dapr pub/sub — publish only (AbpEventBusDaprModule) |
Volo.Abp.AspNetCore.Mvc.Dapr.EventBus | Subscription endpoints to receive events — publish + subscribe (AbpAspNetCoreMvcDaprEventBusModule) |
Volo.Abp.DistributedLocking.Dapr | ABP distributed locking over Dapr's distributed lock block (AbpDistributedLockingDaprModule) |
Installation (any of them):
abp add-package Volo.Abp.Dapr
Or manually: install the NuGet package + add [DependsOn(typeof(AbpDaprModule))] to your module class.
All settings are optional; you mostly don't need to configure them.
Configure<AbpDaprOptions>(options =>
{
// options.HttpEndpoint — HTTP endpoint used when creating DaprClient
// options.GrpcEndpoint — gRPC endpoint used when creating DaprClient
// options.DaprApiToken — app → Dapr requests (default: DAPR_API_TOKEN env var)
// options.AppApiToken — validates Dapr → app requests (default: APP_API_TOKEN env var)
});
Or via appsettings.json:
"Dapr": {
"HttpEndpoint": "http://localhost:3500/"
}
Creates DaprClient or HttpClient objects using AbpDaprOptions — central configuration. Recommended, but not required (you can use the Dapr API directly).
public class MyService : ITransientDependency
{
private readonly IAbpDaprClientFactory _daprClientFactory;
public MyService(IAbpDaprClientFactory daprClientFactory)
{
_daprClientFactory = daprClientFactory;
}
public async Task DoItAsync()
{
// DaprClient with default options
DaprClient daprClient = await _daprClientFactory.CreateAsync();
// DaprClient with DaprClientBuilder configuration
DaprClient daprClient2 = await _daprClientFactory
.CreateAsync(builder =>
{
builder.UseDaprApiToken("...");
});
// HttpClient targeting a Dapr app-id
HttpClient httpClient = await _daprClientFactory.CreateHttpClientAsync("target-app-id");
}
}
CreateHttpClientAsync also accepts optional daprEndpoint and daprApiToken parameters.
ABP's dynamic and static C# client proxies can route their HTTP calls through Dapr's service invocation building block. Install Volo.Abp.Http.Client.Dapr on the client side — then the only remaining step is remote service configuration.
{
"RemoteServices": {
"Default": {
"BaseUrl": "http://dapr-httpapi/"
}
}
}
dapr-httpapi is the application id of the server application in your Dapr configuration — not a real host name.Default here) must match the name given in AddHttpClientProxies (dynamic) or AddStaticHttpClientProxies (static). Multiple servers → multiple keys under RemoteServices.Two packages implement ABP's distributed event bus with Dapr's publish & subscribe building block:
Volo.Abp.AspNetCore.Mvc.Dapr.EventBus (it already references Volo.Abp.EventBus.Dapr — don't install both).Volo.Abp.EventBus.Dapr; you can publish but cannot receive events via ABP's packages.Configure<AbpDaprEventBusOptions>(options =>
{
options.PubSubName = "pubsub"; // pubsubName for DaprClient.PublishEventAsync; default: "pubsub"
});
ABP automatically exposes:
dapr/subscribe — Dapr calls this to get the subscription list. ABP returns all subscriptions for your distributed event handler classes and controller actions with the Topic attribute.api/abp/dapr/event — unified endpoint receiving all events from Dapr; ABP dispatches to handlers by topic name.ABP calls
MapSubscribeHandlerinternally — do not call it manually. Addapp.UseCloudEvents()middleware if you want CloudEvents standard support.
No application code changes: the standard IDistributedEventBus / IDistributedEventHandler pattern works over Dapr automatically.
// Publish
public class MyService : ITransientDependency
{
private readonly IDistributedEventBus _distributedEventBus;
public MyService(IDistributedEventBus distributedEventBus)
{
_distributedEventBus = distributedEventBus;
}
public async Task DoItAsync()
{
await _distributedEventBus.PublishAsync(new StockCountChangedEto
{
ProductCode = "AT837234",
NewStockCount = 42
});
}
}
// Subscribe — ABP auto-registers this with Dapr via dapr/subscribe
public class MyHandler :
IDistributedEventHandler<StockCountChangedEto>,
ITransientDependency
{
public async Task HandleEventAsync(StockCountChangedEto eventData)
{
var productCode = eventData.ProductCode;
// ...
}
}
You can also publish with DaprClient and subscribe with a Topic-attributed controller. Note: direct Dapr API publishing bypasses ABP's event bus features like the outbox/inbox pattern.
// Publish with DaprClient
await _daprClient.PublishEventAsync(
"pubsub", // pubsub name
"StockChanged", // topic name
new StockCountChangedEto { ProductCode = "AT837234", NewStockCount = 42 }
);
// Subscribe with a controller
public class MyController : AbpController
{
[HttpPost("/stock-changed")]
[Topic("pubsub", "StockChanged")]
public async Task<IActionResult> TestRouteAsync([FromBody] StockCountChangedEto model)
{
HttpContext.ValidateDaprAppApiToken();
// Do something with the event
return Ok();
}
}
Dapr's distributed lock block is in Alpha — ABP recommends the DistributedLock library instead for now.
Install Volo.Abp.DistributedLocking.Dapr, then:
Configure<AbpDistributedLockDaprOptions>(options =>
{
options.StoreName = "mystore"; // required — lock keys are scoped per store
// options.Owner — DaprClient.Lock owner; default: random value
// options.DefaultExpirationTimeout — default: 2 minutes
});
Usage is the standard IAbpDistributedLock.TryAcquireAsync("MyLockName"). Dapr differences: the timeout parameter is ignored (Dapr doesn't support waiting for a lock), and locks auto-expire after DefaultExpirationTimeout.
Dapr uses two tokens to secure app ↔ Dapr communication:
AbpDaprOptions.DaprApiToken) — sent by your app on requests to Dapr. Auto-filled from the DAPR_API_TOKEN environment variable; used by IAbpDaprClientFactory. Read it via IDaprApiTokenProvider.GetDaprApiToken().AbpDaprOptions.AppApiToken) — validates requests coming from Dapr. Auto-filled from the APP_API_TOKEN environment variable. Validate with HttpContext.ValidateDaprAppApiToken() (throws AbpAuthorizationException if the dapr-api-token header is missing/wrong; no-op if not configured) or inject IDaprAppApiTokenValidator in any service.Configure<AbpDaprOptions>(options =>
{
options.AppApiToken = "..."; // or "Dapr": { "AppApiToken": "..." } in appsettings.json
});
Enabling App API token validation is strongly recommended — otherwise any client can call your event subscription endpoint directly and fake an event.
Volo.Abp.AspNetCore.Mvc.Dapr.EventBus (it brings Volo.Abp.EventBus.Dapr transitively)IDistributedEventBus keeps outbox/inbox support; direct DaprClient.PublishEventAsync loses itIAbpDaprClientFactory — central AbpDaprOptions configuration instead of hand-built clientsRemoteServices:BaseUrl = Dapr app-id — service invocation routes through the sidecar, not a host addressValidateDaprAppApiToken() on every Dapr-called endpointMapSubscribeHandler manually — ABP already does itWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub burakdmir/abp-skills --plugin abp-sensei26 skills in this plugin
/abp-aiABP Framework v10.x (10.4–10.6) AI integration: Microsoft.Extensions.AI (IChatClient), Semantic Kernel, Microsoft Agent Framework, AI Workspaces, AI Management module (Pro) with RAG, document indexing/chunking and MCP servers. Use when you need chat clients, AI agents, RAG or AI workspace management in ABP./abp-apiABP Framework v10.x (10.4–10.6) API development: Auto API Controllers, dynamic and static C#/JS client proxies, Swagger, API versioning, Integration Services. Use when you need a REST API, controller, dynamic proxy or client generation in ABP./abp-audit-loggingABP Framework v10.x (10.4–10.6) audit logging: AbpAuditingOptions, entity history, IAuditingStore, audit log storage and filtering. Use when configuring audit trails, audit logs, or entity history in ABP./abp-authorizationABP Framework v10.x (10.4–10.6) authorization: defining permissions (PermissionDefinitionProvider), [Authorize], CheckPolicyAsync/IsGrantedAsync, CurrentUser, IPermissionManager, resource-based auth, multi-tenancy permissions. Use when you need permission, role or access checks in ABP./abp-cliABP Framework v10.x (10.4–10.6) CLI and tooling: abp new, add-package, generate-proxy, ABP Studio, ABP Suite, --modern flag. Use when working with ABP CLI commands, creating projects, adding packages, or generating proxies./abp-dddABP Framework v10.x (10.4–10.6) Domain Driven Design: Entity, AggregateRoot, repository, domain service, application service, DTO, domain events (AddLocalEvent/AddDistributedEvent), specification, value object, UOW. Use when designing the domain layer, entities, aggregates, or repositories in ABP.Other plugins' skills for the same job