Configures Orchard Core applications: IShellConfiguration, appsettings.json sections, environment variables, Azure Key Vault naming, tenant pre/post-configuration, and IOptionsMonitor patterns.
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.
You are an Orchard Core expert. Generate configuration JSON, environment variables, and C# code for Orchard Core application settings, tenant configuration, and IOptions overrides.
IConfiguration with IShellConfiguration for tenant-specific configuration.OrchardCore section.OrchardCore_ prefix, e.g. OrchardCore:Email:Smtp, OrchardCore:Media:Azure, OrchardCore:Search:Elasticsearch. Always generate the new names.OrchardCore_* names still work but are deprecated. When both are present, the new name wins, and an array under the new name replaces the old array.__ as the hierarchy separator; Azure Key Vault secrets use --.App_Data/Sites/{tenant}/appsettings.json files omit the OrchardCore wrapper section.Media, Email, Search, ...): tenant sections share the OrchardCore:{TenantName} path.PostConfigure<TOptions> to override values that come from site settings stored in the database; use Configure<TOptions> when the module does not use site settings.IOptionsMonitor<TOptions>.CurrentValue; they refresh without a shell release in 4.0.ITempDirectoryProvider (configured by OrchardCore:TempDirectory:Path), never Path.GetTempPath().{ "steps": [...] }.sealed modifier, except view models.Configuration is loaded in the following order (last wins):
appsettings.jsonappsettings.{Environment}.jsonApp_Data/appsettings.json (global tenant configuration, IShellConfiguration only)App_Data/Sites/{tenant_name}/appsettings.json (per-tenant configuration, IShellConfiguration only)Common sections, all nested under OrchardCore:
| Area | Section |
|---|---|
| Admin | Admin, Admin:List |
Email:Smtp, Email:Azure | |
| SMS | Sms:Azure |
| Media | Media, Media:Azure, Media:Azure:ImageCache, Media:AmazonS3, Media:AmazonS3:ImageCache, Media:Slugify |
| Search | Search:Elasticsearch, Search:AzureAISearch |
| Authentication | Authentication:GitHub, Authentication:Google, Authentication:AzureAD, Authentication:MicrosoftAccount, Facebook, X |
| Data | Data:Sqlite, Data:TableOptions, YesSql, Documents |
| Hosting | Shells:Azure, Shells:Database, KeyVault:Azure, DataProtection:Azure, Redis, BackgroundService, TempDirectory |
| Other | Tenants, Users, Roles, Security, Setup, AutoSetup, Liquid, Markdown, Resources, ReverseProxy, HealthChecks, DynamicCache, Workflows, Apis:GraphQL, ReCaptcha, Navigation, Notifications, ContentTypes, Localization:CultureOptions, ContentLocalization:CulturePickerOptions, Antivirus:ClamAV |
See references/configuration-section-names.md for the full previous → new rename table, environment variable and Key Vault before/after examples.
{
"OrchardCore": {
"Email": {
"Smtp": {
"DefaultSender": "[email protected]"
}
},
"Media": {
"MaxFileSize": 104857600,
"Azure": {
"ConnectionString": "...",
"ContainerName": "media",
"ImageCache": {
"ContainerName": "imagecache"
}
}
},
"Search": {
"Elasticsearch": {
"Url": "http://localhost:9200"
}
},
"BackgroundService": {
"ShellWarmup": true,
"PollingTime": "00:01:00",
"MinimumIdleTime": "00:00:10"
}
}
}
OrchardCore_* section using the rename table, e.g. OrchardCore_Email_Smtp → Email:Smtp, OrchardCore_Media_Azure → Media:Azure, OrchardCore_Elasticsearch → Search:Elasticsearch, OrchardCore_GitHub → Authentication:GitHub, OrchardCore_BackgroundService → BackgroundService.OrchardCore__OrchardCore_Media_Azure__ConnectionString → OrchardCore__Media__Azure__ConnectionString.OrchardCore--OrchardCore---Media---Azure--ConnectionString → OrchardCore--Media--Azure--ConnectionString.MediaOptions.TusTempPath usages; resumable uploads now use OrchardCore:TempDirectory:Path.OrchardCore.Cms.Web template appsettings.json already uses the new names and is a good reference.Orchard Core packages that read a configuration section ship a ConfigurationSchema.json file declared as a JSON schema segment. It flows to referencing projects (for example through OrchardCore.Application.Cms.Targets), so Visual Studio provides IntelliSense, descriptions, known values (database providers, setup recipes, time zones, cultures, AWS regions, security headers), and flags deprecated section names in:
appsettings.json and appsettings.{Environment}.jsonApp_Data/appsettings.json and App_Data/appsettings.{Environment}.jsonTenant files under App_Data/Sites/{tenant}/ get no IntelliSense (their sections are not nested in OrchardCore), and Visual Studio Code does not support JSON schema segments yet.
A module can describe its own sections the same way: put a ConfigurationSchema.json at the package root describing properties under OrchardCore, and declare it in buildTransitive/{PackageId}.targets:
<Project>
<ItemGroup>
<JsonSchemaSegment Include="$(MSBuildThisFileDirectory)..\ConfigurationSchema.json" FilePathPattern="appsettings\..*json" />
</ItemGroup>
</Project>
{
"type": "object",
"properties": {
"OrchardCore": {
"type": "object",
"properties": {
"MyService": {
"type": "object",
"description": "Settings of My Service.",
"properties": {
"ApiKey": {
"type": "string",
"description": "The API key. Provide it through user secrets, environment variables or a key vault."
}
}
},
"MyCompany_MyService": {
"type": "object",
"deprecated": true,
"deprecationMessage": "The 'MyCompany_MyService' section is deprecated. Use 'OrchardCore:MyService' instead.",
"doNotSuggest": true
}
}
}
}
}
Follow the same convention: no OrchardCore_ prefix, grouped by service, e.g. OrchardCore:MyService:MyProvider (environment variable OrchardCore__MyService__MyProvider__MySetting).
To rename an existing section without breaking deployments, bind through GetSectionCompat(key, params legacyKeys) from OrchardCore.Environment.Shell.Configuration. It returns a section merged key by key with its legacy sections: the new key wins, then legacy keys in the order given; arrays in a higher-priority section replace lower ones; underscore legacy keys also resolve their dot-notation form.
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Environment.Shell.Configuration;
using OrchardCore.Modules;
namespace MyCompany.MyService;
public sealed class Startup : StartupBase
{
private readonly IShellConfiguration _shellConfiguration;
public Startup(IShellConfiguration shellConfiguration)
{
_shellConfiguration = shellConfiguration;
}
public override void ConfigureServices(IServiceCollection services)
{
// 'MyCompany_MyService' is deprecated, use 'MyService' instead.
services.Configure<MyServiceOptions>(
_shellConfiguration.GetSectionCompat("MyService", "MyCompany_MyService"));
}
}
The single-argument GetSectionCompat(key) overload only adds the old dot-notation fallback and should not be used for new code.
Pre-configure a tenant before it is created. The tenant appears in the admin Tenants list with these values pre-filled:
{
"OrchardCore": {
"MyTenant": {
"State": "Uninitialized",
"RequestUrlPrefix": "mytenant",
"ConnectionString": "Server=localhost;Database=MyTenantDb;Trusted_Connection=True;",
"DatabaseProvider": "SqlConnection"
}
}
}
Override module settings for a specific tenant after it has been set up:
{
"OrchardCore": {
"Default": {
"Media": {
"MaxFileSize": 209715200
}
}
}
}
Configure all tenants to share the same database from a single configuration block:
{
"OrchardCore": {
"ConnectionString": "Server=localhost;Database=SharedOrchardDb;Trusted_Connection=True;",
"DatabaseProvider": "SqlConnection",
"Tenants": {
"RequireTablePrefix": true,
"TablePrefixPattern": "{{ ShellSettings.Name }}",
"SchemaPattern": "dbo"
},
"Default": {
"State": "Uninitialized",
"TablePrefix": "Default"
}
}
}
Default:TablePrefix isolates the Default tenant's tables only; it does not generate prefixes for tenants created later.Tenants:RequireTablePrefix requires a prefix whenever a tenant is created (or an uninitialized one edited) with a provider that supports prefixes.Tenants:TablePrefixPattern and Tenants:SchemaPattern are Fluid templates with ShellSettings in scope; when set, the generated value replaces any posted manual value.DatabaseProvider and ConnectionString are configured at the root, Setup and Tenants treat them as fixed and hide them. Setting only DatabaseProvider does not lock the database fields..db file through the root ConnectionString; this pattern targets SQL Server, MySQL, and PostgreSQL.Tenant-specific files at App_Data/Sites/{tenant_name}/appsettings.json omit the OrchardCore wrapper. They are written during setup, so environment-specific variants are not supported:
{
"Media": {
"MaxFileSize": 52428800
}
}
OrchardCore__Media__MaxFileSize=104857600
OrchardCore__Default__Media__MaxFileSize=209715200
OrchardCore__MyTenant__Media__MaxFileSize=52428800
[email protected]
OrchardCore__Media__Azure__ConnectionString=DefaultEndpointsProtocol=https;...
The 4.0 names keep variable names short, which matters for hosts that limit their length.
With AddOrchardCoreAzureKeyVault() (configured under OrchardCore:KeyVault:Azure), secret names map -- to : and --- to _:
| Secret name | Configuration key |
|---|---|
OrchardCore--Media--Azure--ConnectionString | OrchardCore:Media:Azure:ConnectionString |
OrchardCore--Shells--Database--ConnectionString | OrchardCore:Shells:Database:ConnectionString |
Orchard Core writes in-progress chunked and TUS uploads, deployment and recipe import/export archives, and tenant recipe uploads under a tenant-scoped sub-directory of OrchardCore:TempDirectory:Path (default: the OS temp directory). Point it at a mounted file share, not object storage:
{
"OrchardCore": {
"TempDirectory": {
"Path": "/mnt/shared/temp"
}
}
}
Module code should inject ITempDirectoryProvider (GetRootDirectory(), GetTempFileName(extension), CreateTempSubdirectory(prefix)) instead of calling Path.GetTempPath(). See orchardcore-temp-file-storage for details.
Use PostConfigure to override values populated from site settings:
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddOrchardCms()
.ConfigureServices(tenantServices =>
tenantServices.PostConfigure<ResourceOptions>(options =>
{
options.UseCdn = true;
}));
var app = builder.Build();
app.UseStaticFiles();
app.UseOrchardCore();
app.Run();
The admin settings screen still shows the stored site settings value, so tell administrators when a value is overridden from code.
Read values from the tenant-aware configuration hierarchy (prefer IShellConfiguration over IConfiguration so App_Data and tenant files are included):
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddOrchardCms()
.ConfigureServices((tenantServices, serviceProvider) =>
{
var shellConfiguration = serviceProvider.GetRequiredService<IShellConfiguration>();
tenantServices.PostConfigure<ResourceOptions>(options =>
{
options.UseCdn = shellConfiguration.GetValue<bool>("Resources:UseCdn");
});
});
var app = builder.Build();
app.UseStaticFiles();
app.UseOrchardCore();
app.Run();
Orchard Core 4.0 adds a post-commit, signal-backed refresh pipeline for options built from mutable tenant state (site settings, documents). Built-in examples: EmailOptions, EmailProviderOptions, AzureEmailOptions, SmtpOptions, ShapeRenderingOptions, ReCaptchaSettings, RegistrationOptions, ExternalLoginOptions, AzureAISearchDefaultOptions, SmsProviderOptions, AzureSmsOptions, TwilioOptions, AdminListOptions.
IOptionsMonitor<TOptions> and read CurrentValue (or Get(name)) at the point of use; do not cache the value in a field.services.AddSignalOptionsChangeTokenSource<TOptions>().IOptionsUpdateNotifier.RequestUpdate<TOptions>(). The invalidation is dispatched only after the YesSql session commits successfully; there is no API to cancel a request.SignalOptionsChangeTokenSource<TOptions> with the name and call RequestUpdate<TOptions>(name).ISignal (for example the Redis Bus feature) so every node refreshes.IOptions<TOptions> for values that are immutable for the shell lifetime (startup code, static configuration).See orchardcore-site-settings for a complete settings-backed options example.
Set the ORCHARD_APP_DATA environment variable to change the data folder (created if missing):
ORCHARD_APP_DATA=D:\OrchardData\App_Data
Supported path formats: relative (./App_Data), absolute (/path/from/root), or fully qualified (D:\Path\To\App_Data).
Azure App Settings are treated as environment variables:
| Azure App Setting | Value |
|---|---|
OrchardCore__Media__MaxFileSize | 104857600 |
OrchardCore__Default__Email__Smtp__DefaultSender | [email protected] |
For CI/CD pipelines, use JSON path transformations to inject secrets from pipeline variables or Azure Key Vault into appsettings.json. The IShellConfiguration files in App_Data can also be stored in Azure Blob Storage or the database (see orchardcore-shells).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
orchard-core, configuration, appsettings, tenant-configuration, ioptions
/orchardcore:orchardcore-configurationfrom 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