Adds framework-level dynamic properties to ABP entities/DTOs implementing IHasExtraProperties. Use for ExtraPropertyDictionary, ObjectExtensionManager, and persistence mapping.
Ships in abp-module-development. 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.
IHasExtraProperties gives an object an ExtraPropertyDictionary, while ObjectExtensionManager defines the names, types, defaults, validation metadata, and persistence/mapping metadata for those entries. This is framework-level object extension, not the module-specific extension API for installed ABP modules.
IHasExtraProperties exposes a read-only ExtraProperties property of type ExtraPropertyDictionary, which derives from Dictionary<string, object?>. ABP aggregate roots already implement it. For a standalone DTO or object, derive from ExtensibleObject or implement the interface and initialize the dictionary yourself.
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities;
using Volo.Abp.ObjectExtending;
public class Product : AggregateRoot<Guid>
{
public string Name { get; private set; }
protected Product()
{
Name = string.Empty;
}
public Product(Guid id, string name) : base(id)
{
Name = name;
}
}
public class ProductDto : ExtensibleObject, IEntityDto<Guid>
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
}
ExtensibleObject initializes the dictionary and, by default, fills defaults registered in ObjectExtensionManager. AggregateRoot and AggregateRoot<TKey> do the same.
Define the property for every participating type. Default extra-property mapping checks the source/destination pair, so defining only the entity is not enough for a DTO mapping.
using System.ComponentModel.DataAnnotations;
using Volo.Abp.ObjectExtending;
public static class ProductObjectExtensions
{
public const string ManufacturerCode = "ManufacturerCode";
public static void Configure()
{
ObjectExtensionManager.Instance
.AddOrUpdateProperty<Product, string>(
ManufacturerCode,
property => property.Attributes.Add(new StringLengthAttribute(32)))
.AddOrUpdateProperty<ProductDto, string>(
ManufacturerCode,
property => property.Attributes.Add(new StringLengthAttribute(32)));
}
}
Run this configuration once during startup and before creating instances that need registered defaults. ObjectExtensionManager.Instance is global process state; keep names in constants and make repeated configuration deterministic.
product.SetProperty(ProductObjectExtensions.ManufacturerCode, "ACME-42");
var code = product.GetProperty<string>(
ProductObjectExtensions.ManufacturerCode);
SetProperty validates by default through ExtensibleObjectValidator; pass validate: false only for a deliberate trusted-data path.GetProperty<TProperty> converts primitive-compatible values through ABP's type helper and returns the supplied/default value when absent.HasProperty checks dictionary membership; RemoveProperty deletes an entry.ConfigureByConvention() includes TryConfigureExtraProperties(). For an IHasExtraProperties entity, EF Core maps ExtraProperties to a column of the same name, converts the dictionary to JSON, and installs a value comparer.
builder.ConfigureByConvention();
To map one entry to a real column, configure it before model creation:
ObjectExtensionManager.Instance.MapEfCoreProperty<Product, string>(
ProductObjectExtensions.ManufacturerCode,
(entityBuilder, propertyBuilder) =>
{
propertyBuilder.HasMaxLength(32);
propertyBuilder.HasColumnName("ManufacturerCode");
});
The EF Core JSON converter removes properties mapped to fields/columns from the JSON copy, so the promoted property is not duplicated there. Add a migration after changing the model.
BsonClassMap.ConfigureAbpConventions() calls AutoMap() and TryConfigureExtraProperties(). For a class that directly declares ExtraProperties, ABP maps it as MongoDB extra elements rather than a nested JSON field.
classMap.ConfigureAbpConventions();
Keep this convention in the MongoDB class-map setup for the entity. The MongoDB implementation deliberately checks the declaring type, so inherited mappings are configured on the declaring class rather than repeatedly on derived maps.
For AutoMapper, opt in on the map:
CreateMap<Product, ProductDto>()
.MapExtraProperties();
Both types must implement IHasExtraProperties. With the default definition checks, the property must be registered for both types unless its CheckPairDefinitionOnMapping metadata explicitly relaxes the pair check. Mapperly uses [MapExtraProperties] on the mapper class and supports definition checks, ignored names, and mapping to regular CLR properties.
ExtraProperties dictionary.ExtraProperties JSON column; for promoted properties, verify the dedicated column and confirm the JSON does not duplicate it.SetProperty validation. Prefer SetProperty for application input.ConfigureByConvention() in EF Core — the dictionary converter and object-extension mappings are not applied by that entity configuration.ExtraProperties column; call MapEfCoreProperty and add a migration for a dedicated column.What SKILL.md sets; muted values are Claude Code's defaults
/abp-module-development:extend-objects-with-extra-propertiesfrom abp-module-development
npx claudepluginhub abpframework/abp-skills --plugin abp-module-development13 skills in this plugin
/application-servicesWrites or reviews an ABP application service — the DTO-taking, DTO-returning boundary between the domain and the presentation/API layer. USE FOR: implementing IApplicationService/ApplicationService for non-CRUD use cases, using AbstractKeyCrudAppService for composite or non-standard keys, and unit-of-work basics. DO NOT USE FOR: exposing application services as auto/conventional API controllers, routes, verbs or [RemoteService] (use expose-http-apis); a complete standard-key CrudAppService workflow (use build-crud-application-services); detailed object-to-DTO mapping mechanics/profiles (use map-objects-and-dtos); DTO validation attributes and business exceptions (use handle-validation-and-errors); permission definitions and authorization policy (use permissions-and-authorization); the overall layered project structure (use layered-architecture).
/build-crud-application-servicesBuilds or reviews a complete ABP CRUD application-service contract and implementation with the CrudAppService APIs. USE FOR: choosing ICrudAppService/CrudAppService generic overloads, separating get/list/create/update DTOs, wiring IRepository, object mappings and five policy properties, adding list filters without breaking count/sort/page order, and validating all five CRUD operations. DO NOT USE FOR: a non-CRUD use case or general ApplicationService orchestration (use application-services); composite or non-standard keys with AbstractKeyCrudAppService (use application-services); mapping-provider configuration details (use map-objects-and-dtos); permission definitions (use permissions-and-authorization); optimistic concurrency (use handle-optimistic-concurrency); HTTP endpoint conventions (use expose-http-apis); integration-test infrastructure (use test-abp-applications).
Other plugins' skills for the same job