Creates entity IDs with ABP's IGuidGenerator, using sequential GUID layout for efficient database insertion across providers.
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.
Use IGuidGenerator.Create() for entity IDs instead of Guid.NewGuid(). ABP's default SequentialGuidGenerator preserves GUID uniqueness while placing a timestamp component where the target database can order it efficiently.
Guid before constructing a new entity or aggregate root.GuidGenerator property on ABP application/domain service base classes.IGuidGenerator exposes only Guid Create():
public class ProductAppService : ApplicationService
{
private readonly IRepository<Product, Guid> _productRepository;
public ProductAppService(IRepository<Product, Guid> productRepository)
{
_productRepository = productRepository;
}
public async Task CreateAsync(string name)
{
var product = new Product(GuidGenerator.Create(), name);
await _productRepository.InsertAsync(product);
}
}
Outside an ABP base class, inject IGuidGenerator. Pass the generated ID into the entity constructor; do not make entity constructors call a service locator or Guid.NewGuid().
SequentialGuidGenerator implements IGuidGenerator and ITransientDependency; it is the default DI implementation. It uses 10 cryptographically random bytes plus a six-byte UTC millisecond timestamp.SimpleGuidGenerator.Instance implements IGuidGenerator by returning Guid.NewGuid(). ABP base classes use it as a fallback only when no IGuidGenerator service can be resolved.Sequential GUIDs address the insert cost of random GUID clustered keys: inserting unrelated random values can require database index page reordering. They do not make insertion order a business-level ordering contract; store an explicit timestamp or sequence when ordering matters.
AbpSequentialGuidGeneratorOptions.DefaultSequentialGuidType is nullable and defaults to null. GetDefaultSequentialGuidType() falls back to SequentialAtEnd.
| Value | Sequential representation | Database mapping |
|---|---|---|
SequentialAtEnd | Timestamp at the end of the GUID data | SQL Server; fallback default |
SequentialAsString | Sequential when formatted with Guid.ToString() | MySQL and PostgreSQL |
SequentialAsBinary | Sequential when formatted with Guid.ToByteArray() | Oracle |
The matching ABP EF Core provider modules set the value only when it is still null. Manual configuration is normally unnecessary when using those packages:
using Volo.Abp.Guids;
Configure<AbpSequentialGuidGeneratorOptions>(options =>
{
options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsString;
});
Configure it manually only when the actual database storage and comparison behavior requires an override.
IGuidGenerator and confirm the concrete implementation is SequentialGuidGenerator in the application.SequentialGuidType matches the real database provider and GUID column representation.IGuidGenerator, including data seeders and imports.Guid.NewGuid() for entity IDs — it bypasses ABP's sequential strategy.SimpleGuidGenerator as the normal application service — it intentionally delegates to Guid.NewGuid().What SKILL.md sets; muted values are Claude Code's defaults
/abp-infrastructure:generate-guidsfrom abp-infrastructure
npx claudepluginhub abpframework/abp-skills --plugin abp-infrastructure16 skills in this plugin
/check-simple-stateComposable ABP simple-state conditions on definitions and UI state objects. USE FOR: ISimpleStateChecker, ISimpleStateCheckerManager, permission/feature/authentication conditions on IHasSimpleStateCheckers. DO NOT USE FOR: tenant/edition feature values (manage-settings-and-features); permission authorization of a service call (permissions-and-authorization); startup-time module capabilities (toggle-global-features)./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).Other plugins' skills for the same job