Generates C# client proxies to call remote ABP HTTP APIs via typed service interfaces. Configures endpoints, authentication (user token or client credentials), and Polly retry policies for microservice and tiered architectures.
Ships in abp-api. 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 generates client proxies so you call a remote HTTP API through its C# interface (await _bookService.GetListAsync()) without touching HttpClient. The proxies handle route/verb mapping, JSON (de)serialization, correlation id, current tenant/culture, API versioning, and error → exception translation. Authentication is not automatic — by default no token is attached (see Authentication below).
Both flavors need a shared service interface that extends IRemoteService — IApplicationService already does, so any app-service interface works. Put it in a shared project (typically *.Application.Contracts).
BaseUrl (or named endpoint) via AbpRemoteServiceOptions.Generated at runtime — easiest to develop, no re-generation step. Add Volo.Abp.Http.Client (abp add-package Volo.Abp.Http.Client), depend on AbpHttpClientModule, and register the proxies for an assembly:
[DependsOn(
typeof(AbpHttpClientModule),
typeof(BookStoreApplicationContractsModule) // holds the service interfaces
)]
public class MyClientAppModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(
typeof(BookStoreApplicationContractsModule).Assembly);
}
}
AddHttpClientProxies scans the assembly, finds every IRemoteService interface, and registers a proxy for each. Full signature:
AddHttpClientProxies(
Assembly assembly,
string remoteServiceConfigurationName = "Default", // RemoteServiceConfigurationDictionary.DefaultName
bool asDefaultServices = true,
ApplicationServiceTypes applicationServiceTypes = ApplicationServiceTypes.All)
Code is generated into your project at development time — a bit faster at runtime (no need to fetch the API definition), but you must re-run the generator whenever the API changes. Setup uses AddStaticHttpClientProxies plus the virtual file system for the generated app-generate-proxy.json:
[DependsOn(
typeof(AbpHttpClientModule),
typeof(AbpVirtualFileSystemModule)
)]
public class MyClientAppModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
// With contracts (default): interfaces are generated into THIS client module,
// so scan the client module's own assembly.
context.Services.AddStaticHttpClientProxies(typeof(MyClientAppModule).Assembly);
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<MyClientAppModule>();
});
}
}
AddStaticHttpClientProxies scans the assembly you pass for public IRemoteService interfaces, so which assembly to pass depends on the contracts mode:
typeof(MyClientAppModule).Assembly).--without-contracts): the interfaces come from the target's *.Application.Contracts (which you must depend on), so pass the Application.Contracts assembly:[DependsOn(
typeof(AbpHttpClientModule),
typeof(AbpVirtualFileSystemModule),
typeof(BookStoreApplicationContractsModule) // holds the reused service interfaces
)]
public class MyClientAppModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddStaticHttpClientProxies(
typeof(BookStoreApplicationContractsModule).Assembly);
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<MyClientAppModule>();
});
}
}
AddStaticHttpClientProxies(Assembly, string remoteServiceConfigurationName = "Default", ApplicationServiceTypes = All) — note there is no asDefaultServices parameter here (that one is dynamic-only).
Generate the code with the server running on the configured BaseUrl:
# With contracts (default): also generates interfaces/DTOs client-side
abp generate-proxy -t csharp -u http://localhost:53929/
# Without contracts: reuse the target's Application.Contracts package instead
abp generate-proxy -t csharp -u http://localhost:53929/ --without-contracts
Use --without-contracts when the client already references the target's *.Application.Contracts (so DTOs/interfaces are reused). Use with contracts for fully independent microservices that must not depend on the target's contracts package. Generated *ClientProxy.Generated.cs are partial — add custom code in a sibling partial and ABP won't overwrite it.
Inject the interface — the proxy is the registered implementation:
public class MyService : ITransientDependency
{
private readonly IBookAppService _bookService;
public MyService(IBookAppService bookService) => _bookService = bookService;
public async Task DoItAsync()
{
var books = await _bookService.GetListAsync();
}
}
If you registered dynamic proxies with asDefaultServices: false (e.g. a local implementation already exists and you don't want to replace it), inject IHttpClientProxy<IBookAppService> and call its .Service property instead.
AbpRemoteServiceOptions & endpointsThe proxy's target address comes from the RemoteServices section of appsettings.json, bound to AbpRemoteServiceOptions:
{
"RemoteServices": {
"Default": { "BaseUrl": "http://localhost:53929/" },
"BookStore": { "BaseUrl": "http://localhost:48392/" }
}
}
AbpRemoteServiceOptions.RemoteServices is a RemoteServiceConfigurationDictionary (string → RemoteServiceConfiguration). Each RemoteServiceConfiguration exposes BaseUrl and optional Version. Configure/override it in code:
context.Services.Configure<AbpRemoteServiceOptions>(options =>
{
options.RemoteServices.Default =
new RemoteServiceConfiguration("http://localhost:53929/");
});
Give a proxy registration a named endpoint via remoteServiceConfigurationName; it maps to a key in the config above. If the named endpoint isn't defined, it falls back to Default:
context.Services.AddHttpClientProxies(
typeof(BookStoreApplicationContractsModule).Assembly,
remoteServiceConfigurationName: "BookStore");
This is the standard pattern for microservices where each service (and the API gateway) has its own BaseUrl. To read a resolved config at runtime, inject IRemoteServiceConfigurationProvider and call GetConfigurationOrDefaultAsync("BookStore") (returns a RemoteServiceConfiguration with the BaseUrl).
By default the proxy attaches no auth token — the built-in NullRemoteServiceHttpClientAuthenticator does nothing, so a call to a [Authorize] endpoint gets 401 unless you wire authentication. Two patterns:
Forward the current user's token (web host). A web app calling a remote API on behalf of the signed-in user adds Volo.Abp.Http.Client.IdentityModel.Web and depends on AbpHttpClientIdentityModelWebModule; it takes the current request's access token and adds it as a bearer header. This is what the tiered Blazor/MVC startup templates use.
Client credentials (server-to-server). A back-end service calling another with its own identity (no user context) adds Volo.Abp.Http.Client.IdentityModel and depends on AbpHttpClientIdentityModelModule, then configures an IdentityClients entry (per named remote service) in appsettings.json:
{
"IdentityClients": {
"Default": {
"GrantType": "client_credentials",
"ClientId": "MyApp_OrderService",
"ClientSecret": "...",
"Authority": "https://localhost:44322",
"Scope": "ProductService"
}
}
}
Keep the ClientSecret out of source control — read it from user-secrets, an environment variable, or a secret store rather than committing it to appsettings.json.
The IdentityClients key matches the named remote service (Default, BookStore, …) used for the proxy. To force forwarding the current user's token for a specific named service, call configuration.SetUseCurrentAccessToken(true) on its RemoteServiceConfiguration — it's an extension method, not a property (the class itself exposes only BaseUrl/Version) — or set "UseCurrentAccessToken": "true" in the RemoteServices entry.
Only retry safe/idempotent requests. A blind retry on a timed-out POST/create can duplicate the side effect, so scope the policy per named client (or per operation), require an idempotency key for commands, and add jitter. Configure AbpHttpClientBuilderOptions in PreConfigureServices (needs Microsoft.Extensions.Http.Polly and using Polly;):
PreConfigure<AbpHttpClientBuilderOptions>(options =>
{
options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) =>
{
// Scope retry to a specific service whose calls are safe/idempotent, and add jitter.
// Don't blanket-retry every client — a retried POST/create can duplicate the effect.
if (remoteServiceName != "ReportingService")
{
return;
}
clientBuilder.AddTransientHttpErrorPolicy(builder =>
builder.WaitAndRetryAsync(3, i =>
TimeSpan.FromSeconds(Math.Pow(2, i))
+ TimeSpan.FromMilliseconds(Random.Shared.Next(0, 250))));
});
});
await _bookService.GetListAsync()) against a running target host; a successful response confirms the proxy resolves the right BaseUrl and maps route/verb correctly.RemoteServices section (or code config) contains the endpoint name the proxy was registered under; a missing named endpoint falls back to Default.abp generate-proxy and confirm the *ClientProxy.Generated.cs files regenerate after an API change.baseUrl and held in the singleton ApiDescriptionCache with no refresh path, so restart the client to pick up API changes.AddStaticHttpClientProxies has no asDefaultServices parameter — that argument is dynamic-only.asDefaultServices: false, the interface is not the default registration — inject IHttpClientProxy<IBookAppService> and use .Service.Default.*ClientProxy.Generated.cs; they're partial, so put custom code in a sibling partial that ABP won't overwrite.Microsoft.Extensions.Http.Polly package and using Polly;.AbpHttpClientModule, no token is attached and a protected endpoint returns 401. Add an IdentityModel module (AbpHttpClientIdentityModelWebModule to forward the current user's token, or AbpHttpClientIdentityModelModule + IdentityClients for client credentials).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/configure-corsConfigure CORS (browser cross-origin access) for an ABP HTTP API host. USE FOR: the App:CorsOrigins setting (comma-separated, trailing-slash trimming), AddCors + WithOrigins, WithAbpExposedHeaders, SetIsOriginAllowedToAllowWildcardSubdomains for wildcard subdomains, the AllowCredentials vs any-origin conflict, UseCors middleware ordering, and which host/gateway to configure in tiered/microservice solutions. DO NOT USE FOR: OpenIddict client redirect / post-logout URIs (registered on the OpenIddict client application at creation/seeding, not a CORS or auth-config setting); RedirectAllowedUrls and named app URLs (configure-app-urls); CSRF/antiforgery and security response headers (secure-web-requests); calling a remote API from C# (consume-remote-services)./configure-swagger-openapiWire up Swagger/OpenAPI for an ABP host with the Volo.Abp.Swashbuckle helpers, including OAuth/OIDC authorize flows and hiding framework endpoints. USE FOR: AddAbpSwaggerGen + UseAbpSwaggerUI setup, AddAbpSwaggerGenWithOAuth / AddAbpSwaggerGenWithOidc for interactive auth on the Swagger UI, AbpSwaggerOidcFlows, HideAbpEndpoints, a metadata/discovery address that differs from the issuer (k8s/docker), versioned SwaggerDoc definitions. DO NOT USE FOR: exposing application services as HTTP controllers (use expose-http-apis); generating C# client proxies for remote APIs (use consume-remote-services); choosing an API versioning strategy (use version-http-apis); configuring the OpenIddict token/authorization server or JWT validation itself (use configure-openiddict-authentication / configure-openiddict-validation).
/expose-http-apisExpose ABP application services as REST endpoints through Auto/Conventional API Controllers. USE FOR: publishing application services as HTTP controllers, route/verb conventions, [RemoteService] toggles, integration services and [IntegrationService]. DO NOT USE FOR: calling a remote ABP HTTP API from C# with client proxies (use consume-remote-services); designing sync-vs-async inter-service communication or the outbox/inbox (use design-module-and-service-communication); building UI pages (use angular-ui / blazor-ui / mvc-razor-ui).
/use-abp-standard-endpointsUse ABP's built-in application-configuration and application-localization HTTP endpoints, and extend them with an IApplicationConfigurationContributor. USE FOR: reading /api/abp/application-configuration (current user, granted policies, settings, features, multi-tenancy, timing) and /api/abp/application-localization from a custom client; extending the config with IApplicationConfigurationContributor and AbpApplicationConfigurationOptions. DO NOT USE FOR: publishing your own application services as controllers (use expose-http-apis); calling remote ABP APIs with C# client proxies (use consume-remote-services); consuming the config in Angular/Blazor/MVC startup (use the per-stack UI skill: angular-ui / blazor-ui / mvc-razor-ui); defining settings/features themselves (use manage-settings-and-features); defining permissions (use permissions-and-authorization).
/version-http-apisAdd API versioning to ABP HTTP APIs so multiple versions of the same service coexist behind static client proxies. USE FOR: AddAbpApiVersioning, query/header/media-type version readers, attaching ApiVersions to conventional controllers, ICurrentApiVersionInfo runtime version switching, the versioned API explorer. DO NOT USE FOR: exposing services as controllers in the first place (use expose-http-apis); Swagger UI / OpenAPI doc setup (use configure-swagger-openapi); generating or calling C# client proxies (use consume-remote-services).
/abp-api:consume-remote-servicesfrom abp-api
npx claudepluginhub abpframework/abp-skills --plugin abp-apiOther plugins' skills for the same job