/abp-sensei:abp-settings-featuresfrom ABP Sensei
ABP Framework v10.x settings and features: ISettingProvider, ISettingManager, SettingDefinitionProvider, IFeatureChecker, and feature toggles. Use for configuration management and feature flags in ABP.
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.
User asks about settings, ISettingProvider, ISettingManager, ISettingDefinitionProvider, setting values, features, IFeatureChecker, IFeatureDefinitionProvider, feature toggles, or feature management in ABP Framework.
ABP's setting system provides a hierarchical, extensible way to manage configuration values with fallback from user → tenant → global → configuration → default.
Create a class inheriting SettingDefinitionProvider:
using Volo.Abp.Settings;
namespace Acme.BookStore.Settings
{
public class BookStoreSettingDefinitionProvider : SettingDefinitionProvider
{
public override void Define(ISettingDefinitionContext context)
{
context.Add(
new SettingDefinition(
"App.UI.LayoutType",
defaultValue: "LeftMenu",
displayName: L["LayoutType"],
isVisibleToClients: true
),
new SettingDefinition(
"Smtp.EnableSsl",
defaultValue: "false",
displayName: L["EnableSsl"],
isVisibleToClients: false
)
);
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<BookStoreResource>(name);
}
}
}
defaultValue is a string — all setting values stored as stringsisVisibleToClients: true exposes the value to the browser for conditional UIpublic class MyModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<SettingDefinitionContext>(options =>
{
// Modify identity module settings before they're finalized
});
}
}
public class MyService : ITransientDependency
{
private readonly ISettingProvider _settingProvider;
public MyService(ISettingProvider settingProvider)
{
_settingProvider = settingProvider;
}
public async Task FooAsync()
{
// Get as string (null if not set)
string userName = await _settingProvider.GetOrNullAsync("Smtp.UserName");
// Get as bool, fallback to default
bool enableSsl = await _settingProvider.GetAsync<bool>("Smtp.EnableSsl");
// Get as bool, fallback to provided default
bool enableSsl = await _settingProvider.GetAsync<bool>(
"Smtp.EnableSsl", defaultValue: true);
// Shortcut: IsTrueAsync
bool enableSsl = await _settingProvider.IsTrueAsync("Smtp.EnableSsl");
// Get as int
int port = await _settingProvider.GetAsync<int>("Smtp.Port");
// Get as nullable int
int? port = (await _settingProvider.GetOrNullAsync("Smtp.Port"))?.To<int>();
}
}
ApplicationService,DomainService, and other base classes already property-injectISettingProvider. UseSettingProviderproperty directly.
Settings with isVisibleToClients: true are available via JavaScript:
const layoutType = abp.setting.values['App.UI.LayoutType'];
5 pre-built providers, evaluated bottom → top:
| Provider | Name | Source |
|---|---|---|
| DefaultValueSettingValueProvider | "D" | Default value in setting definition |
| ConfigurationSettingValueProvider | "C" | IConfiguration (appsettings.json) |
| GlobalSettingValueProvider | "G" | System-wide (database) |
| TenantSettingValueProvider | "T" | Current tenant (database) |
| UserSettingValueProvider | "U" | Current user (database) |
In appsettings.json:
{
"Settings": {
"Smtp.EnableSsl": "true",
"Smtp.Port": "587"
}
}
public class MySettingDefinitionProvider : SettingDefinitionProvider
{
public override void Define(ISettingDefinitionContext context)
{
context.Add(
new SettingDefinition(
"Smtp.Password",
defaultValue: "",
isVisibleToClients: false,
isEncrypted: true // Encrypted in storage
)
);
}
}
public class CustomSettingValueProvider : SettingValueProvider
{
public override string Name => "Custom";
public CustomSettingValueProvider(ISettingStore settingStore)
: base(settingStore) { }
public override Task<string> GetOrNullAsync(SettingDefinition setting)
{
// Return setting value or null
// Use SettingStore or another data source
}
}
// Register
Configure<AbpSettingOptions>(options =>
{
options.ValueProviders.Add<CustomSettingValueProvider>();
});
Custom encryption implementation:
public class MyEncryptionService : ISettingEncryptionService, ITransientDependency
{
public string Decrypt(string encryptedValue) { /* ... */ }
public string Encrypt(string plainValue) { /* ... */ }
}
Used to get and set setting values (for building setting management UIs):
public class MyService : ITransientDependency
{
private readonly ISettingManager _settingManager;
public MyService(ISettingManager settingManager)
{
_settingManager = settingManager;
}
public async Task FooAsync()
{
Guid user1Id = ...;
Guid tenant1Id = ...;
// Current user
string layout = await _settingManager.GetOrNullForCurrentUserAsync("App.UI.LayoutType");
await _settingManager.SetForCurrentUserAsync("App.UI.LayoutType", "LeftMenu");
// Specific user
await _settingManager.SetForUserAsync(user1Id, "App.UI.LayoutType", "LeftMenu");
// Current tenant
await _settingManager.SetForCurrentTenantAsync("App.UI.LayoutType", "LeftMenu");
// Specific tenant
await _settingManager.SetForTenantAsync(tenant1Id, "App.UI.LayoutType", "LeftMenu");
// Global
await _settingManager.SetGlobalAsync("App.UI.LayoutType", "TopMenu");
string global = await _settingManager.GetOrNullGlobalAsync("App.UI.LayoutType");
}
}
Use
ISettingProviderfor reading only (implements caching). UseISettingManagerfor setting management UIs.
Setting values are cached via distributed cache. Always use ISettingManager to change values — it manages the cache.
5 pre-built providers (reverse order execution):
| Provider | Can Get | Can Set |
|---|---|---|
| DefaultValueSettingManagementProvider | Yes | No |
| ConfigurationSettingManagementProvider | Yes | No |
| GlobalSettingManagementProvider | Yes | Yes |
| TenantSettingManagementProvider | Yes | Yes |
| UserSettingManagementProvider | Yes | Yes |
public class CustomSettingProvider : SettingManagementProvider, ITransientDependency
{
public override string Name => "Custom";
public CustomSettingProvider(ISettingManagementStore store)
: base(store) { }
}
Configure<SettingManagementOptions>(options =>
{
options.Providers.Add<CustomSettingProvider>();
});
The module provides default UI for:
Extensible — add custom tabs:
MVC:
public class MySettingGroupViewComponent : AbpSettingManagementViewComponent
{
public IViewComponentResult Invoke()
{
return View("~/Views/Shared/Components/MySettingGroup/Default.cshtml");
}
}
Features are tenant-scoped toggles that enable/disable functionality per tenant. Different from settings — features control what a tenant can use.
using Volo.Abp.Features;
using Volo.Abp.Validation.StringValues;
namespace Acme.BookStore.Features
{
public class BookStoreFeatureDefinitionProvider : FeatureDefinitionProvider
{
public override void Define(IFeatureDefinitionContext context)
{
var myGroup = context.AddGroup("BookStore");
// Boolean toggle feature
myGroup.AddFeature(
"BookStore.PdfReporting",
defaultValue: "false",
displayName: LocalizableString.Create<BookStoreResource>("PdfReporting"),
valueType: new ToggleStringValueType()
);
// Numeric feature with validator
myGroup.AddFeature(
"BookStore.MaxProductCount",
defaultValue: "10",
displayName: LocalizableString.Create<BookStoreResource>("MaxProductCount"),
valueType: new FreeTextStringValueType(
new NumericValueValidator(0, 1000000)
)
);
}
}
}
| Type | UI | Use Case |
|---|---|---|
ToggleStringValueType | Checkbox | on/off, enabled/disabled |
FreeTextStringValueType | Textbox | Free text, numbers |
SelectionStringValueType | Dropdown | Select from predefined list |
myGroup.AddFeature(
"BookStore.Advanced",
defaultValue: "false",
displayName: L["AdvancedFeature"],
description: L["AdvancedFeatureDescription"],
valueType: new ToggleStringValueType(),
isVisibleToClients: true, // Expose to browser (default: true)
properties: new Dictionary<string, object>
{
{ "CustomProperty", "value" }
}
);
var reporting = myGroup.AddFeature(
"BookStore.Reporting",
defaultValue: "false",
displayName: L["Reporting"],
valueType: new ToggleStringValueType()
);
reporting.AddChild(
"BookStore.PdfExport",
defaultValue: "false",
displayName: L["PdfExport"],
valueType: new ToggleStringValueType()
);
Child features only available when parent is enabled.
[RequiresFeature("BookStore.PdfReporting")]
public class PdfReportAppService : ApplicationService, IPdfReportAppService
{
public async Task<PdfReportResultDto> GetPdfReportAsync()
{
// Only accessible if feature is enabled
}
}
public class ReportingAppService : ApplicationService
{
public async Task DoWorkAsync()
{
// Check if enabled
if (await FeatureChecker.IsEnabledAsync("BookStore.PdfReporting"))
{
// Feature is enabled
}
// Get value
string maxCount = await FeatureChecker.GetOrNullAsync("BookStore.MaxProductCount");
// Extension methods
bool isEnabled = await FeatureChecker.IsTrueAsync("BookStore.PdfReporting");
int max = (await FeatureChecker.GetAsync<int>("BookStore.MaxProductCount"));
}
}
ApplicationServicebase class already hasFeatureCheckerproperty injected.
Features are managed via the Feature Management UI (available with Identity module):
ISettingProvider for reading (caching), ISettingManager for writingisVisibleToClients: true only for settings needed in browserisEncrypted: true for sensitive values (passwords, API keys)App., Smtp., Emailing.defaultValuedisplayName for UI displayToggleStringValueType for simple on/off featuresFreeTextStringValueType with validators for numeric limits[RequiresFeature] attribute for automatic feature checkingisVisibleToClients: false for internal-only featuresdisplayName and description| Aspect | Settings | Features |
|---|---|---|
| Purpose | Configuration values | Functionality toggles |
| Scope | User, Tenant, Global | Tenant only |
| Value types | Any string | Toggle, FreeText, Selection |
| UI | Setting Management page | Feature Management modal |
| Fallback | 5-level chain | Default value only |
| Encryption | Supported | Not typically needed |
| Client access | isVisibleToClients | isVisibleToClients |
What SKILL.md sets; muted values are Claude Code's defaults
26 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-daprABP Framework v10.x (10.4–10.6) Dapr integration: Volo.Abp.Dapr packages, service invocation via C# API client proxies (Volo.Abp.Http.Client.Dapr), distributed event bus over Dapr pub/sub (Volo.Abp.EventBus.Dapr + Volo.Abp.AspNetCore.Mvc.Dapr.EventBus), distributed lock, AbpDaprOptions, API token security. Use when you need Dapr sidecar communication, Dapr pub/sub, or Dapr service invocation in ABP.npx claudepluginhub burakdmir/abp-skills --plugin abp-senseiOther plugins' skills for the same job