generate-guids
Installation
SKILL.md
Generate GUIDs in ABP
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.
When to Use
- Create a
Guidbefore constructing a new entity or aggregate root. - Keep entity creation independent of the database provider.
- Select the sequential byte layout for SQL Server, MySQL, PostgreSQL, or Oracle.
- Use the pre-injected
GuidGeneratorproperty on ABP application/domain service base classes.
When Not to Use
- Create cache keys or coordinate cache invalidation — use cache-entities.
- Create password reset tokens, API secrets, or cryptographic nonces — GUID generation is not a token-protection workflow.
- Choose entity key types or model database indexes generally — this skill only covers ABP GUID generation.