Scaffolds Orchard Core themes using dotnet new octheme, including project files, Razor/Liquid layouts, resource manifests, and theme activation.
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.
Step-by-step creation of a theme project for an Orchard Core site built on NuGet packages. For shape overrides, alternates, placement, and admin theme customization once the theme exists, use orchardcore-theming.
net11.0 only.OrchardCore.Application.Cms.Targets (see orchardcore-setup).orchardcore-asset-manager).Use the Orchard Core project templates:
dotnet new install OrchardCore.ProjectTemplates
dotnet new octheme -n Contoso.Theme -o src/Themes/Contoso.Theme
dotnet sln add src/Themes/Contoso.Theme/Contoso.Theme.csproj
dotnet add src/Contoso.Web/Contoso.Web.csproj reference src/Themes/Contoso.Theme/Contoso.Theme.csproj
octheme creates Manifest.cs, the project file, and a Views/Layout.liquid (pass --AddLiquid false to skip the Liquid files and --OrchardVersion to pick the Orchard Core package version). Create the theme folder next to the web project, not inside it, and reference it from the web project; a theme that is not referenced by the startup project is never discovered.
The theme project references OrchardCore.Theme.Targets, which marks the assembly as a theme. Use the Razor SDK when the theme has .cshtml files:
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net11.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="OrchardCore.Theme.Targets" Version="3.*" />
<PackageReference Include="OrchardCore.ContentManagement" Version="3.*" />
<PackageReference Include="OrchardCore.DisplayManagement" Version="3.*" />
<PackageReference Include="OrchardCore.ResourceManagement" Version="3.*" />
</ItemGroup>
</Project>
A Liquid-only theme can use Microsoft.NET.Sdk; switch to Microsoft.NET.Sdk.Razor as soon as you add Razor views.
using OrchardCore.DisplayManagement.Manifest;
[assembly: Theme(
Name = "Contoso Theme",
Author = "Contoso",
Website = "https://contoso.com",
Version = "1.0.0",
Description = "The Contoso front-end theme.",
BaseTheme = "TheTheme",
Tags = ["Bootstrap"]
)]
Contoso.Theme); Name is only the display name.BaseTheme takes the ID of another theme (TheTheme, TheBlogTheme, TheAgencyTheme, TheComingSoonTheme, TheAdmin, TheOldAdmin, SafeMode, or one of yours). Templates and placement.json rules of the base theme apply unless your theme overrides them; static files keep their own URL (~/TheTheme/...). Omit it for a standalone theme.Admin tag (ManifestConstants.AdminTag) to Tags for an admin theme so it is offered as an admin theme, and usually set BaseTheme = "TheAdmin" (restyle it through admin schemes and the --ta-* tokens, see orchardcore-admin-schemes) or BaseTheme = "TheOldAdmin" to keep the pre-4.0 look.Dependencies = ["OrchardCore.Menu"] enables features the theme needs.ManifestConstants.OrchardCoreTeam, OrchardCoreWebsite, and OrchardCoreVersion describe Orchard Core's own themes; use your own author, website, and version.Shipping extra features with the theme: a theme assembly can also declare [assembly: Feature(Id = "Contoso.Theme.Widgets", Name = "...", Category = "Theming")] (from OrchardCore.Modules.Manifest). In Orchard Core 4.0 the theme still appears on the Themes page and the extra features appear on the Features page; bind their services with [Feature("Contoso.Theme.Widgets")] on a Startup class.
@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, OrchardCore.DisplayManagement
@addTagHelper *, OrchardCore.ResourceManagement
Add @addTagHelper *, OrchardCore.Menu when the layout uses the <menu> tag helper (and reference the OrchardCore.Menu package). A missing @inherits line causes build errors in Razor views.
Views/Layout.cshtml (or Views/Layout.liquid) is the site layout:
<!DOCTYPE html>
<html lang="@Orchard.CultureName()" dir="@Orchard.CultureDir()">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>@RenderTitleSegments(Site.SiteName, "before")</title>
<style asp-name="bootstrap" version="5" at="Head"></style>
<style asp-name="Contoso.Theme" asp-src="~/Contoso.Theme/css/site.min.css" debug-src="~/Contoso.Theme/css/site.css" depends-on="bootstrap:5" at="Head"></style>
<script asp-name="bootstrap" version="5" at="Foot"></script>
<script asp-name="Contoso.Theme" asp-src="~/Contoso.Theme/js/site.min.js" debug-src="~/Contoso.Theme/js/site.js" at="Foot"></script>
<resources type="Header" />
@await RenderSectionAsync("HeadMeta", required: false)
</head>
<body>
@await RenderSectionAsync("Header", required: false)
<main class="container">
@await RenderSectionAsync("Messages", required: false)
@await RenderBodyAsync()
</main>
@if (IsSectionDefined("Footer"))
{
<footer class="container">
@await RenderSectionAsync("Footer", required: false)
</footer>
}
<resources type="FootScript" />
</body>
</html>
The Liquid equivalent:
<!DOCTYPE html>
<html lang="{{ Culture.Name }}" dir="{{ Culture.Dir }}">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{% page_title Site.SiteName, position: "before" %}</title>
{% style name: "bootstrap", version: "5", at: "Head" %}
{% script name: "bootstrap", version: "5", at: "Foot" %}
{% resources type: "Header" %}
{% render_section "HeadMeta", required: false %}
</head>
<body>
{% render_section "Header", required: false %}
<main class="container">
{% render_section "Messages", required: false %}
{% render_body %}
</main>
{% render_section "Footer", required: false %}
{% resources type: "FootScript" %}
</body>
</html>
RenderBodyAsync() / {% render_body %} renders the Content zone; RenderSectionAsync(name, required: false) / {% render_section %} renders any other zone. <zone name="..."> and {% zone %} only add content to a zone, they never render one.<resources type="Header" /> renders the meta, link, stylesheet, and head script resources (Meta, HeadLink, Stylesheet, HeadScript can also be rendered separately); <resources type="FootScript" /> renders the foot scripts.<resources type="Header" />; pre-render such shapes into a variable at the top of the layout.<script asp-name="jQuery" at="Foot"></script> only if the theme needs it.wwwroot/ are served at ~/{ThemeId}/..., for example ~/Contoso.Theme/css/site.css.wwwroot/Theme.png to show a thumbnail on Design → Themes.Startup with services.AddResourceConfiguration<T>() (see orchardcore-theming).Assets/
├── scss/site.scss
├── js/site.js
└── package.json
Assets.json
See references/assets.md for the files and orchardcore-asset-manager for which parts of the asset pipeline work outside the Orchard Core repository.
dotnet build
dotnet run --project src/Contoso.Web
Enable and select the theme on Design → Themes, or from a recipe:
{
"steps": [
{
"name": "feature",
"enable": ["Contoso.Theme"]
},
{
"name": "themes",
"site": "Contoso.Theme",
"admin": "TheAdmin"
}
]
}
| Zone | Purpose |
|---|---|
HeadMeta | Meta/link tags rendered inside <head> |
Header | Site header |
Navigation | Main menu |
Messages | Alerts/notifications |
BeforeContent / AfterContent | Around the main content |
Content | Main content (rendered by RenderBodyAsync) |
Sidebar | Side widgets |
Footer | Site footer |
A layout zone is filled by widgets (Layers), placement.json rules whose place starts with /, or <zone> blocks in views. For widgets, also list the zone names on Design → Settings → Zones (see orchardcore-layers).
| Theme ID | Description |
|---|---|
TheTheme | Default Bootstrap front-end theme |
TheBlogTheme | Blog theme (Liquid) |
TheAgencyTheme | Agency/business theme |
TheComingSoonTheme | Coming soon page |
TheAdmin | Admin theme, styled by admin schemes |
TheOldAdmin | Admin theme with the pre-4.0 look of TheAdmin, without schemes |
SafeMode | Minimal fallback theme |
| Item | Convention |
|---|---|
| Theme project and ID | Company.ThemeName (PascalCase) |
| Static file URL | ~/Company.ThemeName/... |
| Resource names | Theme ID or Company.ThemeName.Part |
| CSS / JS entry | site.css / site.js |
Only when contributing a theme to Orchard Core itself: put it under src/OrchardCore.Themes/, use ProjectReferences to src/OrchardCore/OrchardCore.Theme.Targets instead of packages, use ManifestConstants in the manifest, and build assets with the repository's yarn build -n <name>.
references/theme-structure.md - Directory layout and templatesreferences/assets.md - SCSS, JS, and asset pipelineWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/orchardcore:orchardcore-theme-creatorfrom 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