Configures Orchard Core shell providers for multi-tenant environments: Azure Blob, database, and file-based migration. Covers ShellSettings, ShellScope, IShellHost, and per-tenant DI.
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 configuration and code for Azure Blob shell storage, database shell storage, migration from file-based providers, and environment-specific shell settings.
tenants.json and per-tenant appsettings.json in the App_Data folder.App_Data.MigrateFromFiles to automatically migrate existing App_Data configuration.OrchardCore:Shells:Azure or OrchardCore:Shells:Database. The 3.x names OrchardCore_Shells_Azure and OrchardCore_Shells_Database still work but are deprecated.{ "steps": [...] }.sealed modifier.Add the OrchardCore.Shells.Azure package to the web project:
<PackageReference Include="OrchardCore.Shells.Azure" Version="3.*" />
{
"OrchardCore": {
"Shells": {
"Azure": {
"ConnectionString": "DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;EndpointSuffix=core.windows.net",
"ContainerName": "orchardcore-shells",
"BasePath": "",
"MigrateFromFiles": true
}
}
}
}
| Setting | Description |
|---|---|
ConnectionString | Azure Storage account connection string |
ContainerName | Name of the blob container for shell configuration |
BasePath | Optional subdirectory path inside the container |
MigrateFromFiles | When true, migrates existing App_Data config to blob storage |
UseHierarchicalNamespace | Optional true/false to force Gen2 (HNS) or Gen1 behavior when account-level detection is unavailable, e.g. with a container-scoped SAS token. Omit to auto-detect |
Orchard Core 4.0 supports storage accounts with Hierarchical Namespace enabled as well as flat-namespace accounts. Before a namespace-sensitive operation the store probes the account (GetAccountInfo) to detect HNS. On HNS accounts, directories are real and moves are atomic through the Data Lake APIs; the DFS endpoint is derived from the connection string, so no extra setting is needed. Set UseHierarchicalNamespace only when detection cannot run.
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddOrchardCms()
.AddAzureShellsConfiguration();
var app = builder.Build();
app.UseStaticFiles();
app.UseOrchardCore();
app.Run();
The blob container mirrors the App_Data structure:
orchardcore-shells/
├── tenants.json
├── appsettings.json (optional root config)
├── appsettings.Production.json (optional environment config)
└── Sites/
├── Default/
│ └── appsettings.json
├── TenantA/
│ └── appsettings.json
└── TenantB/
└── appsettings.json
Note: The blob container must be created before the application starts. Individual tenant directories do not support environment-specific
appsettings.{Environment}.jsonfiles, but the root level does.
{
"OrchardCore": {
"Shells": {
"Database": {
"DatabaseProvider": "SqlConnection",
"ConnectionString": "Server=db-server;Database=OrchardShells;Trusted_Connection=True;",
"TablePrefix": "",
"MigrateFromFiles": true
}
}
}
}
| Setting | Description |
|---|---|
DatabaseProvider | Database engine (SqlConnection, Sqlite, Postgres, MySql) |
ConnectionString | Connection string for the shell configuration database |
TablePrefix | Optional table prefix for the shell configuration table |
Schema | Optional database schema, for providers that support schemas |
MigrateFromFiles | When true, migrates existing App_Data config to the database |
Note: The Database Shells provider does not support root-level
appsettings.jsonorappsettings.{Environment}.jsonfiles.
AddDatabaseShellsConfiguration() ships with the core OrchardCore.Infrastructure package, so no extra package is needed with OrchardCore.Application.Cms.Targets.
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddOrchardCms()
.AddDatabaseShellsConfiguration();
var app = builder.Build();
app.UseStaticFiles();
app.UseOrchardCore();
app.Run();
Both providers support the MigrateFromFiles option to assist migrating from an existing App_Data configuration:
MigrateFromFiles to true in the provider configuration.App_Data and writes to the target store.App_Data files can be removed (but keep as backup).{
"OrchardCore": {
"Shells": {
"Database": {
"DatabaseProvider": "Postgres",
"ConnectionString": "Host=db-server;Database=orchardshells;Username=orcharduser;Password=P@ss;",
"MigrateFromFiles": true
}
}
}
}
Disable the shell provider in development to use local App_Data files, and enable it in production:
var builder = WebApplication.CreateBuilder(args);
var orchardBuilder = builder.Services.AddOrchardCms();
if (!builder.Environment.IsDevelopment())
{
orchardBuilder.AddDatabaseShellsConfiguration();
}
var app = builder.Build();
app.UseStaticFiles();
app.UseOrchardCore();
app.Run();
var builder = WebApplication.CreateBuilder(args);
var orchardBuilder = builder.Services.AddOrchardCms();
if (builder.Environment.IsProduction())
{
orchardBuilder.AddAzureShellsConfiguration();
}
var app = builder.Build();
app.UseStaticFiles();
app.UseOrchardCore();
app.Run();
Store shell provider settings in environment variables to avoid committing secrets:
OrchardCore__Shells__Azure__ConnectionString=DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;EndpointSuffix=core.windows.net
OrchardCore__Shells__Azure__ContainerName=orchardcore-shells
OrchardCore__Shells__Azure__MigrateFromFiles=true
OrchardCore__Shells__Database__DatabaseProvider=SqlConnection
OrchardCore__Shells__Database__ConnectionString=Server=db-server;Database=OrchardShells;Trusted_Connection=True;
OrchardCore__Shells__Database__MigrateFromFiles=true
For load-balanced or horizontally scaled deployments where multiple app instances need to share tenant configuration:
{
"OrchardCore": {
"Shells": {
"Database": {
"DatabaseProvider": "SqlConnection",
"ConnectionString": "Server=central-db;Database=OrchardShells;User Id=shelluser;Password=ShellP@ss;",
"TablePrefix": "Shell",
"MigrateFromFiles": false
}
}
}
}
This ensures all instances read and write tenant configuration from the same central database, enabling:
| Criteria | Azure Blob | Database |
|---|---|---|
Root appsettings.json support | ✅ Yes | ❌ No |
| Environment-specific root config | ✅ Yes | ❌ No |
| Per-tenant file management | ✅ Independent files | Single JSON document |
| Best for | Azure-hosted deployments | Any database-backed deployment |
| Independent tenant config access | ✅ Direct blob access | Via application only |
Shared shell configuration stores tenant settings centrally, but each instance still holds its own running shells. Enable OrchardCore.Tenants.Distributed on the Default tenant, with a distributed cache such as OrchardCore.Redis.Cache, so that tenant creation, setup, and release on one instance are applied on the others (see orchardcore-redis and orchardcore-tenants).
Every tenant is a shell: its own settings, enabled features, DI container and request pipeline inside the one process.
Type (namespace OrchardCore.Environment.Shell) | Role |
|---|---|
ShellSettings | A tenant's identity and settings: Name, State, RequestUrlHost, RequestUrlPrefix, TenantId, VersionId, the this[key] bag (DatabaseProvider, TablePrefix, ...) and ShellConfiguration. Inject it to know the current tenant. |
ShellContext | A built tenant: settings, blueprint (enabled features) and ServiceProvider. |
ShellScope (.Scope) | A unit of work in a tenant; ShellScope.Current, ShellScope.Services and ShellScope.Context are the ambient values. |
IShellHost | Builds, lists, reloads, releases and removes shells. |
IShellSettingsManager | Loads, saves and removes settings in the configured shell store (files, Azure Blob or database, above). |
IShellSettingsManager layers the startup project configuration (appsettings.json, environment variables, ...), then App_Data/appsettings.json, then tenants.json and the per-tenant App_Data/Sites/{tenant}/appsettings.json (whose sections are not nested under OrchardCore). The section names are covered in orchardcore-configuration.
ShellContainerFactory builds each tenant's IServiceProvider as a child of the application services and runs every enabled feature's Startup.ConfigureServices for that tenant. A singleton registered in a module is therefore one instance per tenant. Resolving from the application root provider gives host-level services only; resolve tenant services through a shell scope.
using OrchardCore.Environment.Shell;
using OrchardCore.Environment.Shell.Scope;
var shellScope = await shellHost.GetScopeAsync("Tenant1");
await shellScope.UsingAsync(async scope =>
{
var contentManager = scope.ServiceProvider.GetRequiredService<IContentManager>();
// Runs in a new scope after this one is disposed.
ShellScope.AddDeferredTask(async deferredScope =>
{
var logger = deferredScope.ServiceProvider.GetRequiredService<ILogger<Startup>>();
logger.LogInformation("Finished work in {Tenant}.", deferredScope.ShellContext.Settings.Name);
});
});
UsingAsync(execute, activateShell: true) activates the shell if needed (tenant events run), executes in an isolated async flow, then disposes the scope. UsingServiceScopeAsync is the service-scope-only variant without shell activation or tenant events.IShellHost.TryGetScopeAsync(name) returns (scope, success) instead of throwing for an unknown tenant. From inside a tenant, ShellScope.UsingChildScopeAsync(...) or ShellScope.CreateChildScopeAsync(...) open a scope on the same or another tenant.ShellScope.AddDeferredTask, RegisterBeforeDispose, AddDeferredSignal and AddExceptionHandler hook into the scope lifetime. Deferred tasks are how Orchard Core runs work after a request commits (indexing, tenant reloads).ShellScope.Get, Set, GetOrCreate and the *Feature<T> helpers keep per-scope ambient state.| Member | Effect |
|---|---|
IShellHost.UpdateShellSettingsAsync(settings) | Stamps a new VersionId, saves the settings and reloads the shell. |
IShellHost.ReloadShellContextAsync(settings) | Reloads the settings and rebuilds the shell for later requests; current requests finish on the old one. |
IShellHost.ReleaseShellContextAsync(settings) | Releases the shell so the next request builds a new one with the same settings. |
IShellReleaseManager.RequestRelease() | Asks for a release of the current tenant at the end of the request (used after settings that are read only at startup change). |
ReloadAllShellContextsAsync() / ReleaseAllShellContextsAsync() | Extensions acting on every shell. |
Enable OrchardCore.Tenants.Distributed to propagate reloads and releases to other instances (see Keeping Tenant States in Sync above).
OrchardCore:OrchardCore_Shells_Azure to OrchardCore:Shells:Azure and OrchardCore:OrchardCore_Shells_Database to OrchardCore:Shells:Database (environment variables OrchardCore__Shells__Azure__* and OrchardCore__Shells__Database__*). When both names define a value, the new name wins.UseHierarchicalNamespace only when auto-detection fails.What SKILL.md sets; muted values are Claude Code's defaults
/orchardcore:orchardcore-shellsfrom 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