Attaches permission, authentication, feature, and custom conditions to ABP objects implementing IHasSimpleStateCheckers<TState>. Evaluates state-local and global checkers with AND semantics.
Ships in abp-infrastructure. 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.
IHasSimpleStateCheckers<TState> conditionally enabled.SettingDefinition does not implement IHasSimpleStateCheckers<TState>.The state type must implement:
public interface IHasSimpleStateCheckers<TState>
where TState : IHasSimpleStateCheckers<TState>
{
List<ISimpleStateChecker<TState>> StateCheckers { get; }
}
A checker receives SimpleStateCheckerContext<TState>, whose verified properties are IServiceProvider ServiceProvider and TState State:
public class EnabledForEnvironmentChecker<TState> : ISimpleStateChecker<TState>
where TState : IHasSimpleStateCheckers<TState>
{
public Task<bool> IsEnabledAsync(SimpleStateCheckerContext<TState> context)
{
var environment = context.ServiceProvider.GetRequiredService<IHostEnvironment>();
return Task.FromResult(!environment.IsProduction());
}
}
Add the checker to the state's StateCheckers list, then evaluate with ISimpleStateCheckerManager<TState>:
var enabled = await stateCheckerManager.IsEnabledAsync(state);
var results = await stateCheckerManager.IsEnabledAsync(states);
The single-state overload returns Task<bool>. The array overload returns SimpleStateCheckerResult<TState>, a Dictionary<TState, bool> initialized to true for each state.
The manager creates a service scope. It evaluates state-local checkers and then checker types registered in AbpSimpleStateCheckerOptions<TState>.GlobalStateCheckers. Evaluation uses AND semantics and returns false on the first failed non-batch checker. With no local or global checkers, a state is enabled.
For any compatible TState, ABP provides extension methods:
RequireAuthenticated()RequirePermissions(params string[])RequirePermissions(bool requiresAll, params string[])RequirePermissions(bool requiresAll, bool batchCheck, params string[])RequireFeatures(...) with the same overload patternRequireGlobalFeatures(...) string-name and feature-type overloads from Volo.Abp.GlobalFeaturesThe short permission and feature overloads use requiresAll: true and batchCheck: true. These conditions enable or disable the containing state; they do not define permission or feature values.
PermissionDefinition implements IHasSimpleStateCheckers<PermissionDefinition>. Framework UI types such as ApplicationMenuItem and ToolbarItem also implement the contract. FeatureDefinition and SettingDefinition do not implement it.
For bulk evaluation, implement ISimpleBatchStateChecker<TState> or derive from SimpleBatchStateCheckerBase<TState>. Its batch method receives SimpleBatchStateCheckerContext<TState> with ServiceProvider and TState[] States, and returns SimpleStateCheckerResult<TState>.
Register a global checker type when every state of a given type must satisfy it:
Configure<AbpSimpleStateCheckerOptions<MyState>>(options =>
{
options.GlobalStateCheckers.Add<EnabledForEnvironmentChecker<MyState>>();
});
true.false result disables the state.context.ServiceProvider.requiresAll: true and false and verify the batch path does not change semantics.SettingDefinition or FeatureDefinition — neither implements the contract; use simple state on a compatible containing object such as a menu item or permission definition.context.ServiceProvider; the manager owns the scope.What SKILL.md sets; muted values are Claude Code's defaults
/abp-infrastructure:check-simple-statefrom abp-infrastructure
npx claudepluginhub abpframework/abp-skills --plugin abp-infrastructure16 skills in this plugin
/configure-audit-loggingABP audit logging: per-request log of requests, actions, entity change history, exceptions. USE FOR: enabling/disabling auditing, GET request logging, entity change history, AuditLogContributors, ignoring types, [Audited]/[DisableAuditing], manual scopes with IAuditingManager. DO NOT USE FOR: general application/UI logging or Serilog (configure-logging); setting/feature values (manage-settings-and-features); background jobs/workers/handlers (background-jobs-and-events)./configure-loggingABP startup, runtime, exception logging, and the startup-template Serilog bridge. USE FOR: typed ILogger in ABP services; IInitLoggerFactory/GetInitLogger startup buffering; ABP exceptions via LogException; Serilog via UseSerilog. DO NOT USE FOR: audit-log persistence and entity history (configure-audit-logging); distributed traces and metrics (out of scope, wire the OpenTelemetry .NET SDK directly); exception-to-HTTP response details (handle-validation-and-errors)./encrypt-stringsABP IStringEncryptionService with compatible passphrase, salt, IV, key-size options. USE FOR: reversible encryption used by ABP infra; AbpStringEncryptionOptions defaults and config keys; Encrypt/Decrypt null behavior; encrypted setting values. DO NOT USE FOR: password hashing, signing, token generation, or crypto protocol design; defining encrypted ABP settings (manage-settings-and-features)./generate-guidsABP IGuidGenerator entity IDs and sequential GUID layout for the active database provider. USE FOR: IGuidGenerator.Create; SequentialGuidGenerator; SimpleGuidGenerator; AbpSequentialGuidGeneratorOptions.DefaultSequentialGuidType; SequentialAtEnd / SequentialAsString / SequentialAsBinary. DO NOT USE FOR: cache keys and invalidation (cache-entities); cryptographic tokens or secrets (encrypt-strings); schema and repository design./handle-dates-and-timeABP DateTime, UTC normalization, time zones, persistence. USE FOR: IClock and AbpClockOptions; Utc/Local/Unspecified; Clock.Normalize; EF Core DateTime converters and DisableDateTimeNormalization; per-request tenant/user timezone; ITimezoneProvider Windows/IANA. DO NOT USE FOR: timezone settings (manage-settings-and-features); audit-log persistence (configure-audit-logging); multi-tenancy resolution (configure-multi-tenancy)./integrate-aiABP AI workspaces with Microsoft.Extensions.AI, Microsoft Agent Framework, or Microsoft.SemanticKernel. USE FOR: choosing an ABP AI abstraction, AbpAIModule, AbpAIWorkspaceOptions, resolving IChatClient/IChatClientAccessor/IKernelAccessor, per-workspace provider/model config. DO NOT USE FOR: general .NET AI/ML outside ABP's workspace integration (out of scope); AI-call observability (out of scope); tenant-editable AI providers via the commercial AI Management module.Other plugins' skills for the same job