Adds the MiniProfiler performance widget to Orchard Core front-end and admin pages. Covers feature enabling, permissions, widget placement, shape rendering timings, YesSql SQL profiling with duplicate/error query badges, and MiniProfilerOptions configuration.
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. Enable and configure the MiniProfiler widget so authorized users can see request, shape, and database timings on Orchard Core pages.
OrchardCore.MiniProfiler feature per tenant. Use it to investigate a specific problem: profiling adds work to every request of the tenant and exposes route names, SQL, and timings.ViewMiniProfilerOnFrontEnd — front-end (themed) pages.ViewMiniProfilerOnBackEnd — admin pages.Administrator role receives both by default. Never grant them to Anonymous.MiniProfilerOptions.ResultsAuthorize (or ResultsAuthorizeAsync) before enabling the module where untrusted users can reach the site.Startup.Order = -500) and calls app.UseMiniProfiler() so the profiler wraps all downstream middleware.MiniProfilerFilter is an IAsyncResultFilter that adds the MiniProfiler shape to the layout's Footer zone for view and Razor Page results when the user has the matching permission.ShapeStep (IShapeDisplayEvents) records a Shape: <shape-type> step for every shape rendered through display management.IStore connection factory is wrapped with MiniProfilerConnectionFactory (backed by CurrentDbProfiler), so SQL executed through YesSql appears as custom timings.{ "steps": [...] } format.sealed modifier, except View Models.{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.MiniProfiler"
],
"disable": []
}
]
}
{
"steps": [
{
"name": "Roles",
"Roles": [
{
"Name": "Developer",
"Permissions": [
"ViewMiniProfilerOnFrontEnd",
"ViewMiniProfilerOnBackEnd"
]
}
]
}
]
}
using OrchardCore.Localization;
using OrchardCore.Security.Permissions;
namespace OrchardCore.MiniProfiler;
public sealed class Permissions : IPermissionProvider
{
public static readonly Permission ViewMiniProfilerOnFrontEnd =
new("ViewMiniProfilerOnFrontEnd", LocalizationSource.Create<Permissions>("View Mini Profiler widget on front end pages"));
public static readonly Permission ViewMiniProfilerOnBackEnd =
new("ViewMiniProfilerOnBackEnd", LocalizationSource.Create<Permissions>("View Mini Profiler widget on back end pages"));
// Both permissions default to the Administrator role via GetDefaultStereotypes().
}
The module registers the upstream StackExchange.Profiling.MiniProfilerOptions in each tenant container. Configure them from the web project with ConfigureServices() after AddOrchardCms(). The module does not bind MiniProfilerOptions from configuration.
using StackExchange.Profiling;
builder.Services
.AddOrchardCms()
.ConfigureServices(tenantServices =>
tenantServices.Configure<MiniProfilerOptions>(options =>
{
options.IgnoredPaths.Add("/health");
options.PopupRenderPosition = RenderPosition.Right;
// Protect stored results. MiniProfiler routes run before Orchard authentication,
// so authenticate explicitly instead of relying on HttpContext.User.
options.ResultsAuthorizeAsync = async request =>
{
var result = await request.HttpContext.AuthenticateAsync();
return result.Succeeded && result.Principal.IsInRole("Administrator");
};
}));
Useful options to reduce overhead and noise:
ShouldProfile — limit profiling by environment, identity, path, or endpoint.IgnoredPaths — skip health checks or high-volume endpoints.EnableMvcFilterProfiling, EnableMvcViewProfiling, MvcFilterMinimumSaveMs, MvcViewMinimumSaveMs — trim MVC timings.TrackConnectionOpenClose, ExcludeStackTraceSnippetFromCustomTimings — trim SQL detail.PopupRenderPosition, PopupShowTrivial, PopupShowTimeWithChildren, PopupMaxTracesToShow, PopupStartHidden, PopupToggleKeyboardShortcut, ShowControls, ColorScheme.The shape and YesSql integrations have no separate settings; they are active whenever the feature is enabled.
Shape: <type> steps.#1, #2, ...) with duration, start offset, time to first result, and the step that ran them. Gaps between queries show which step spent the time.
! in the timing tree and on the widget button flags requests and steps with duplicate or failing commands.Results are kept in the tenant's in-memory cache for 30 minutes, are lost on restart, and are not shared between instances. Behind a load balancer use session affinity while diagnosing, or set MiniProfilerOptions.Storage to a shared IAsyncStorage from a MiniProfiler storage package (installed in the web project).
using StackExchange.Profiling;
using (MiniProfiler.Current?.Step("Load recommendations"))
{
await recommendationService.LoadAsync();
}
MiniProfiler.Current is null when the request is not profiled.
Footer zone, and ShouldProfile/IgnoredPaths allow the request. APIs and decoupled responses are profiled but get no widget. Check /mini-profiler-resources requests, including the tenant URL prefix.ResultsAuthorize.OrchardCore.DisplayManagement activity source and meter with OpenTelemetry (see orchardcore-opentelemetry and orchardcore-display-management) over MiniProfiler.orchardcore-diagnostics and orchardcore-logging-serilog when investigating performance and failures.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/orchardcore:orchardcore-mini-profilerfrom 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