Explains OrchardCore feature management: enabling/disabling features, bulk actions, programmatic control with IShellFeaturesManager, dependencies, manifest declarations, recipe activation, and feature guards like FeatureAttribute vs RequireFeaturesAttribute.
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.
Read when SKILL.md points to them.
Features are enabled per tenant. Manage them at Tools → Features or
through IShellFeaturesManager. Resolve IDs from the module manifest rather
than inferring them from an assembly or package name.
ManageFeatures permission (OrchardCore.Features.FeaturesPermissions.ManageFeatures), granted to Administrator by default.FeaturesBulkAction enum has None, Enable, and Disable. Running a bulk action with nothing selected redirects back with the warning notification "Please select one or more features." (it used to add a model error that the redirect lost).AdminList per category, all named Features (FeaturesAdminList.Name), so it follows the site's List/Grid layout (see orchardcore-admin-lists).[Feature] attributes declared in a theme's manifest alongside [Theme] are listed with their category and an Enable button.public sealed class FeatureToggleService
{
private readonly IShellFeaturesManager _features;
public FeatureToggleService(IShellFeaturesManager features)
{
_features = features;
}
public async Task EnableAsync(string featureId)
{
var available = await _features.GetAvailableFeaturesAsync();
var feature = available.SingleOrDefault(x => x.Id == featureId)
?? throw new InvalidOperationException($"Feature '{featureId}' is unavailable.");
await _features.UpdateFeaturesAsync(
featuresToDisable: [],
featuresToEnable: [feature],
force: false);
}
}
UpdateFeaturesAsync makes a single atomic update when enabling and disabling
features together:
await _features.UpdateFeaturesAsync(
featuresToDisable: [luceneFeature],
featuresToEnable: [elasticsearchFeature],
force: false);
There are two attributes, and picking the right one keeps the tenant's Features list small and understandable. Prefer gating over declaring: every new feature is one more switch the user must learn, enable, and remember.
| Goal | Use | Effect |
|---|---|---|
| Give the user a switch to turn a capability on or off | [assembly: Feature(...)] (FeatureAttribute) | A managed feature that appears in Tools → Features |
| Group reusable services so several features share them without repeating registrations | [assembly: Feature(..., EnabledByDependencyOnly = true)] | A feature the user cannot toggle directly; auto-enabled whenever a dependent feature is enabled |
Scope a Startup's registrations to a specific declared feature | [Feature("FeatureId")] on the StartupBase class | Those services register only when that feature is enabled |
| Extend, override, or add behavior only when other features are present | [RequireFeatures("A", "B")] on the StartupBase class | Those services register only when all listed features are enabled — no new feature is introduced |
FeatureAttributeUse a declared feature when the capability is standalone and the user should
choose whether it runs. See Manifest Declarations below for the [assembly: Feature(...)] syntax.
For a feature that only exists to group reusable services — services several
other features consume — mark it EnabledByDependencyOnly = true. It is enabled
automatically by dependency and is hidden from the direct enable/disable list, so
you register the shared services once instead of repeating them in every
consuming feature.
[assembly: Feature(
Id = "MyModule.Core",
Name = "My Module Core",
Description = "Shared services consumed by the other My Module features.",
Category = "My Module",
EnabledByDependencyOnly = true
)]
Other features then depend on MyModule.Core, which activates it and its shared
services automatically. Explicitly enabling such a feature is only useful for a
custom module that wants to consume those services on its own.
RequireFeaturesAttributeUse [RequireFeatures(...)] to add or override behavior that is only relevant
when another feature is present, without introducing a new feature the user
must manage. This is the preferred tool whenever the behavior is an extension of
existing features rather than an independent capability.
[RequireFeatures("OrchardCore.Contents", "OrchardCore.Workflows")]
public sealed class ContentWorkflowStartup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
// Registered only when both Contents and Workflows are enabled.
// No separate feature is added for the user to discover or toggle.
services.AddScoped<IWorkflowTask, PublishContentTask>();
}
}
A module may have several StartupBase classes: an unattributed one for its
core services, plus [RequireFeatures(...)] classes that light up integrations
as their target features come online.
RequiredStartupAttribute[RequiredStartup] (namespace OrchardCore.Modules, Orchard Core 4.0) composes a
public component type for every tenant even when the feature that defines it is
disabled. Its services are attributed to Application.DefaultFeatureId. Combine
it with [RequireFeatures(...)] to compose it only when all listed features are
enabled. Use it sparingly, for plumbing that must exist regardless of the
module's own feature state.
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Modules;
[RequiredStartup]
[RequireFeatures("OrchardCore.Deployment")]
public sealed class AlwaysOnDeploymentStartup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
// Registered for every tenant where Deployment is enabled,
// even if this module's own feature is disabled.
}
}
IFeaturesProviderIFeaturesProvider (OrchardCore.Environment.Extensions.Features) builds the
IFeatureInfo list of each extension. In 4.0 the extension manager resolves
every registered provider (GetServices<IFeaturesProvider>()) instead of a
single one, so a host-level subsystem can add its own provider (as
OrchardCore.DisplayManagement does for themes) instead of replacing the
default. Custom implementations that replaced the single registration must be
added to the collection instead.
Use the current Pascal-case named arguments supported by the manifest attributes:
using OrchardCore.Modules.Manifest;
[assembly: Module(
Name = "My Module",
Author = "My Organization",
Version = "1.0.0",
Description = "Provides reporting.",
Category = "Content"
)]
[assembly: Feature(
Id = "MyModule.Reporting",
Name = "Reporting",
Description = "Provides reporting dashboards.",
Category = "Content",
Dependencies = ["OrchardCore.Contents", "OrchardCore.Queries"]
)]
Key manifest options on FeatureAttribute:
Dependencies — features that must be enabled first; enabling this feature enables them.EnabledByDependencyOnly = true — the feature is hidden from direct enable/disable and is only turned on when a dependent feature is enabled. Use it to group shared services (see Declare a managed feature with FeatureAttribute above).IsAlwaysEnabled = true — an always-on feature that cannot be disabled.DefaultTenantOnly = true — only the default (root) tenant can enable or disable the feature.Do not bypass dependency validation with force unless the tenant lifecycle
explicitly requires it.
Add the All Features deployment step (AllFeatures, category
Infrastructure) to a deployment plan to export a Feature recipe step with
the enabled features, and the disabled ones unless Ignore disabled features
(IgnoreDisabledFeatures) is checked.
{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.Contents",
"OrchardCore.ContentTypes",
"OrchardCore.Title"
],
"disable": [
"OrchardCore.Lucene"
]
}
]
}
For current search feature IDs, use OrchardCore.Elasticsearch or
OrchardCore.Lucene for the provider and their OrchardCore.Search.*
features only when the corresponding search integration is needed.
FeaturesBulkAction.Toggle no longer exists; call FeatureService.EnableOrDisableFeaturesAsync with FeaturesBulkAction.Enable or FeaturesBulkAction.Disable.OrchardCore.Features.Permissions.ManageFeatures was removed; use OrchardCore.Features.FeaturesPermissions.ManageFeatures.IFeaturesProvider is resolved as a collection; register additional providers instead of replacing the default one.What SKILL.md sets; muted values are Claude Code's defaults
/orchardcore:orchardcore-featuresfrom 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./orchardcore-admin-edit-viewsSkill for writing Orchard Core admin editor views with the ocat CSS classes and cards. Covers Edit views for content parts and fields, field editor variants, part, field and site settings editors, Fields.Edit views, admin pages rendering Model.Editor built with IDisplayManager, the ocat classes and their layout rules, label associations and group captions, part and field wrapper classes, validation, hints and the Hint_Admin shape, cards declared in placement and the Card and CardContainer shapes, split editor shapes, tabs and columns, the edit page action bar, the horizontal form layout, and the UI text casing standard. Use this skill when requests mention Orchard Core admin edit views, admin forms, grouping fields in cards, Edit.cshtml, Fields.Edit.cshtml, Settings.Edit.cshtml, ocat classes, label casing, or field hints. Strong matches include ocat-wrapper, ocat-card, Hint_Admin, PlacementLocationBuilder, IDisplayManager, ContentPartDisplayDriver, SiteDisplayDriver./orchardcore-admin-listsSkill for Orchard Core 4.0 admin index views (list pages) rendered with the AdminList shape. Covers the List and Grid layouts, AdminListContext of TModel, the admin-list and admin-list-column tag helpers, column width and alignment, row display drivers placing shapes for SummaryAdmin and SummaryAdminGrid, row templates and zones, AdminListActions Buttons and Menu layouts, AdminListToolbar, AdminListSearch, the list-management script for select-all and bulk actions, IAdminListColumnsProvider, AdminListOptions, user layout selection, per-list alternates, sortable lists, and upgrading overridden list views. Use this skill when requests mention Orchard Core admin index views, an admin index page, admin lists, converting a hand-written admin listing, grid layout, list columns, row actions menu, or adding a column to the content items list. Strong matches include OrchardCore.Admin.Abstractions, AdminListContext, AdminListColumn, IAdminListColumnsProvider, AdminListOptions, AdminListLayout, ContentsAdminList./orchardcore-admin-menuSkill for creating admin menus in Orchard Core. Covers admin menu content, the link, placeholder, content types, and lists admin node types, the AdminMenu recipe and deployment step, ManageAdminMenu, ViewAdminMenuAll and per-menu ViewAdminMenu permissions from AdminMenuPermissions, custom admin nodes with AdminNode, IAdminNodeNavigationBuilder and AddAdminNode, data localization of node text, rendering in the 4.0 TheAdmin menu, and upgrading from the removed legacy admin menu layout. Use this skill when requests mention Orchard Core Admin Menu, Create and Manage Admin Menus, Admin Menu Deployment Recipe Step, Built-In Admin Node Types, Custom Admin Node Class, LegacyAdminMenuNavigation, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminMenu, OrchardCore.AdminMenu.Abstractions, AdminMenuPermissions, LinkAdminNode, PlaceholderAdminNode, OrchardCore.Lists, OrchardCore.Navigation./orchardcore-admin-schemesSkill for the Orchard Core 4.0 TheAdmin redesign and its admin schemes. Covers scheme records with their four colors, typography, density, corners, horizontal form layout and content width, Design > Themes > Schemes, the default scheme, the per-user scheme picker and its cookie, the seven built-in schemes, the AdminSchemes recipe step and Admin Schemes deployment step, the schemes.css stylesheet, the --ta-* design tokens, ta-content-fluid, dark mode utilities and nested color modes, TheOldAdmin and how to switch to it, and the breaking changes for custom admin themes and Layout overrides. Use this skill when requests mention admin schemes, admin colors, rebranding TheAdmin, dark mode of the admin, the admin content width, the horizontal form layout, TheOldAdmin, or upgrading a custom admin theme to the new TheAdmin. Strong matches include AdminScheme, AdminSchemes, DefaultSchemeId, HorizontalFormLayout, ContentWidth, data-ta-scheme, --ta-primary, ta-content-fluid, TheOldAdmin, and OrchardCore.Themes.TheAdmin.Other plugins' skills for the same job