Creates custom user settings sections in Orchard Core using the CustomUserSettings stereotype, including tab-based editors, permissions, Liquid access, recipe steps, and SectionDisplayDriver extensions.
Ships in orchardcore. 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.
You are an Orchard Core expert. Generate code and configuration for creating custom per-user settings sections using the CustomUserSettings stereotype.
OrchardCore.Users.CustomUserSettings feature to use custom user settings.CustomUserSettings stereotype.Creatable, Listable, Draftable, and Securable metadata — they do not apply.CustomUserSettings stereotype; this will break existing content items of that type.ManageOwnCustomUserSettings_{ContentTypeName} permission (implied by ManageUsers); a section's editor and summary render only for users holding it.user.Properties.CustomUserSettings-{ContentTypeName} differentiator.SummaryAdmin); they are hidden there by default.SectionDisplayDriver<User, TSection>.sealed modifier, except View Models.{ "steps": [...] } format.{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.Users",
"OrchardCore.Users.CustomUserSettings"
],
"disable": []
}
]
}
Use a data migration to create the content type:
public sealed class Migrations : DataMigration
{
private readonly IContentDefinitionManager _contentDefinitionManager;
public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}
public async Task<int> CreateAsync()
{
await _contentDefinitionManager.AlterTypeDefinitionAsync("UserProfile", type => type
.DisplayedAs("User Profile")
.Stereotype("CustomUserSettings")
.WithPart("UserProfile", part => part
.WithPosition("0")
)
);
await _contentDefinitionManager.AlterPartDefinitionAsync("UserProfile", part => part
.WithField("FirstName", field => field
.OfType("TextField")
.WithDisplayName("First name")
.WithPosition("0")
)
.WithField("LastName", field => field
.OfType("TextField")
.WithDisplayName("Last name")
.WithPosition("1")
)
.WithField("Bio", field => field
.OfType("TextField")
.WithDisplayName("Biography")
.WithPosition("2")
.WithEditor("TextArea")
)
.WithField("Avatar", field => field
.OfType("MediaField")
.WithDisplayName("Profile Picture")
.WithPosition("3")
)
);
return 1;
}
}
After creation, each custom user settings section appears as a tab when editing a user under Access Control → Users. This field-only definition does not require a CLR UserProfile part or AddContentPart registration.
{
"steps": [
{
"name": "ContentDefinition",
"ContentTypes": [
{
"Name": "UserProfile",
"DisplayName": "User Profile",
"Settings": {
"ContentTypeSettings": {
"Stereotype": "CustomUserSettings"
}
},
"ContentTypePartDefinitionRecords": [
{
"PartName": "UserProfile",
"Name": "UserProfile",
"Settings": {
"ContentTypePartSettings": {
"Position": "0"
}
}
}
]
}
],
"ContentParts": [
{
"Name": "UserProfile",
"Settings": {},
"ContentPartFieldDefinitionRecords": [
{
"FieldName": "TextField",
"Name": "FirstName",
"Settings": {
"ContentPartFieldSettings": {
"DisplayName": "First name",
"Position": "0"
}
}
},
{
"FieldName": "TextField",
"Name": "LastName",
"Settings": {
"ContentPartFieldSettings": {
"DisplayName": "Last name",
"Position": "1"
}
}
}
]
}
]
}
]
}
Load the user and access properties through the Properties object:
{% assign user = User | user_id | users_by_id %}
{{ user.Properties.UserProfile.UserProfile.FirstName.Text }}
{{ user.Properties.UserProfile.UserProfile.LastName.Text }}
{{ user.Properties.UserProfile.UserProfile.Bio.Text }}
The property path follows the pattern: user.Properties.{ContentTypeName}.{PartName}.{FieldName}.{ValueProperty}.
Users edit their own section only with the matching permission. For a UserProfile type:
{
"steps": [
{
"name": "Roles",
"Roles": [
{
"Name": "Authenticated",
"PermissionBehavior": "Add",
"Permissions": [
"ManageOwnCustomUserSettings_UserProfile"
]
}
]
}
]
}
public sealed class UserProfileService
{
private readonly UserManager<IUser> _userManager;
public UserProfileService(UserManager<IUser> userManager)
{
_userManager = userManager;
}
public async Task<string> GetFirstNameAsync(string userId)
{
var user = await _userManager.FindByIdAsync(userId);
if (user is not User orchardUser)
{
return null;
}
var profileContent = orchardUser.Properties["UserProfile"];
if (profileContent == null)
{
return null;
}
return profileContent["UserProfile"]?["FirstName"]?["Text"]?.ToString();
}
}
CustomUserSettingsService (namespace OrchardCore.Users.Services, package OrchardCore.Users.Core) returns a section as a ContentItem merged with the current type definition, which is safer than reading raw JSON:
var settingsType = await _customUserSettingsService.GetSettingsTypeAsync("UserProfile");
var profile = await _customUserSettingsService.GetSettingsAsync(user, settingsType);
var firstName = profile.Content.UserProfile.FirstName.Text;
// All users' sections of a type, keyed by user ID.
var allProfiles = await _customUserSettingsService.GetSettingsAsync("UserProfile");
With OrchardCore.Deployment, the Custom User Settings deployment step (IncludeAll or selected SettingsTypeNames) exports every user's sections. The matching recipe step is custom-user-settings; each entry targets a user by userId, and each content item replaces that user's section of the same ContentType:
{
"steps": [
{
"name": "custom-user-settings",
"custom-user-settings": [
{
"userId": "4kxfx7ctgc9y6ag0dk1tb7jx0r",
"user-custom-user-settings": [
{
"ContentItemId": "4p1xr5f2k3jvg0q7a2zcbpsnfa",
"ContentType": "UserProfile",
"UserProfile": {
"FirstName": { "Text": "Ada" },
"LastName": { "Text": "Lovelace" }
}
}
]
}
]
}
]
}
Users that do not exist are skipped. Define the content type first (ContentDefinition step) in the same or an earlier recipe.
By default, each custom user settings section is placed in its own tab in the user editor. The differentiator uses the content type name (which usually equals the part name). To customize placement (e.g., move out of the tab):
{
"CustomUserSettings": [
{
"place": "Content:10#Content",
"differentiator": "CustomUserSettings-UserProfile"
}
]
}
The differentiator format is CustomUserSettings-{ContentTypeName}.
{
"CustomUserSettings": [
{
"place": "Content:5",
"differentiator": "CustomUserSettings-UserProfile"
}
]
}
{
"CustomUserSettings": [
{
"place": "Content:10#Profile",
"differentiator": "CustomUserSettings-UserProfile"
}
]
}
Orchard Core 4.0 builds a CustomUserSettings_SummaryAdmin shape per section for the SummaryAdmin and SummaryAdminGrid display types, hidden by default. Place it to show it in the users list (only for viewers holding the section permission):
{
"CustomUserSettings_SummaryAdmin": [
{
"displayType": "SummaryAdmin",
"differentiator": "CustomUserSettings-UserProfile",
"place": "Description:10"
}
]
}
The section content item is rendered with the SummaryAdmin display type, so add SummaryAdmin placement or templates for its fields as needed.
For more advanced scenarios, extend user properties programmatically by implementing a SectionDisplayDriver<User, TSection>:
public sealed class UserProfile
{
public string DisplayName { get; set; }
public string Location { get; set; }
}
public sealed class UserProfileDisplayDriver : SectionDisplayDriver<User, UserProfile>
{
internal readonly IStringLocalizer S;
public UserProfileDisplayDriver(IStringLocalizer<UserProfileDisplayDriver> stringLocalizer)
{
S = stringLocalizer;
}
public override IDisplayResult Edit(User model, UserProfile section, BuildEditorContext context)
{
return Initialize<UserProfileViewModel, UserProfile>("UserProfile_Edit", static (viewModel, section) =>
{
viewModel.DisplayName = section.DisplayName;
viewModel.Location = section.Location;
}, section).Location(l => l.Zone("Content", "5").Card(S["Profile"], "50"));
}
public override async Task<IDisplayResult> UpdateAsync(User model, UserProfile section, UpdateEditorContext context)
{
var viewModel = new UserProfileViewModel();
await context.Updater.TryUpdateModelAsync(viewModel, Prefix);
section.DisplayName = viewModel.DisplayName;
section.Location = viewModel.Location;
return await EditAsync(model, section, context);
}
}
Register the driver in Startup:
public sealed class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddDisplayDriver<User, UserProfileDisplayDriver>();
}
}
The user editor groups its fields in cards (Account, Password, Regional settings, ...), so give the section's editor shape its own card; the view renders ocat-* rows only (see orchardcore-admin-edit-views). Custom user settings content types keep rendering as their own tab, since they are content item editors.
View Models must not use the sealed modifier because they are used for model binding:
public class UserProfileViewModel
{
public string DisplayName { get; set; }
public string Location { get; set; }
}
CustomSettings instead.CustomUserSettings stereotype is separate from CustomSettings — do not confuse the two.CustomUserSettings stereotype should not have Creatable, Listable, Draftable, or Securable enabled.ClaimsPrincipal.What SKILL.md sets; muted values are Claude Code's defaults
/orchardcore:orchardcore-custom-user-settingsfrom orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin orchardcore140 skills in this plugin
/orchardcore-adminGuidance for the Orchard Core admin panel, including admin controllers and routes, admin menu registration with AdminNavigationProvider, ocat editor forms grouped in cards, admin pages rendering Model.Editor, the UI text casing standard, TheAdmin layout and menu colors, admin branding, the Navbar shape, the Ctrl+K quick navigation palette and QuickNavigationSource, AdminSettings such as MenuBehavior, ShowBreadcrumb, DisplayQuickNavigation, DisplayTitlesInTopbar and ActionsLayout, the AdminDashboard shape, settings pages, and admin filters and zones. Use this skill when requests mention the Orchard Core admin panel, TheAdmin, admin controllers, admin menu registration, an icon on an admin menu item, the AdminSettings recipe step, quick navigation, navigation menu behavior, the admin URL prefix, UI text casing. Strong matches include OrchardCore.Admin, AdminSettings, AdminPermissions, AdminOptions, AdminAttribute, SiteDisplayDriver, IDisplayManager./orchardcore-admin-dashboardSkill for creating admin dashboard widgets in Orchard Core. Covers the DashboardWidget stereotype, DashboardPart position and sizing, the built-in HtmlDashboardWidget, ContentsMetadata and ContentsTags widget types, custom widget content types via recipe or migration, arranging widgets in Manage Dashboard mode, widget template customization, provisioning widgets with recipes, dashboard permissions, the DashboardBreadcrumbProvider Dashboard ancestor, and the AdminDashboardContent shape used when the feature is disabled. Use this skill when requests mention Orchard Core Admin Dashboard, Create and Configure Dashboard Widgets, Enabling Admin Dashboard, Widget Configuration Properties, dashboard widget recipes, Dashboard breadcrumb, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminDashboard, DashboardPart, DashboardBreadcrumbProvider, AccessAdminDashboard, ManageAdminDashboard.Other plugins' skills for the same job