Guides migration from deprecated CrestApps SignalR to OrchardCore.SignalR in CrestApps Orchard Core 3.0. Covers tenant-aware hub routing, client URLs, group isolation, and Redis/Azure backplanes.
Ships in crestapps-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 accurate hub, route, resource, and client code for SignalR in CrestApps Orchard Core 3.0. SignalR hosting now lives in the Orchard Core framework (OrchardCore.SignalR); CrestApps contributes only routing and tenant-isolation helpers that every CrestApps hub follows.
OrchardCore.SignalR for new work. The CrestApps SignalR features are deprecated compatibility shims.OrchardCore.SignalR directly.routes.MapHub<T>(SignalRHubRoutes.GetHubPath<T>()). HubRouteManager was removed in 3.0.Html.SignalRHubUrl<T>() (adds the request path base), never a hard-coded path or tenant prefix.signalr script resource as a dependency instead of copying the client library.TenantSignalRGroupName destinations, never to a bare Clients.User(userId) or an unqualified group name.HubConnectionWork.MustComplete to hub work that changes durable state or group membership.OrchardCore.SignalR.Azure and OrchardCore.SignalR.Redis cannot be enabled together.{ "steps": [...] }.sealed modifier, except for View Models.| Item | Value |
|---|---|
| Hosting feature | OrchardCore.SignalR (package OrchardCore.SignalR) |
| Redis backplane | OrchardCore.SignalR.Redis (depends on OrchardCore.Redis) |
| Azure backplane | OrchardCore.SignalR.Azure (Azure SignalR Service) |
| Deprecated compatibility features | CrestApps.OrchardCore.SignalR, CrestApps.OrchardCore.SignalR.Redis, CrestApps.OrchardCore.SignalR.Azure |
| Route and URL helpers | SignalRHubRoutes, SignalRHtmlHelperExtensions in CrestApps.OrchardCore.Core (namespace CrestApps.OrchardCore) |
| Tenant destinations | TenantSignalRGroupName, HubConnectionWork in CrestApps.OrchardCore.SignalR.Core |
| Hub path convention | /Communication/Hub/{HubTypeName} |
| Script resource | signalr (registered by OrchardCore.SignalR, @microsoft/signalr 10.0.0) |
| JSON protocol | camel case, with Orchard JOptions.KnownConverters |
{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.SignalR"
],
"disable": []
}
]
}
Reference CrestApps.OrchardCore.Core for the routing helpers. Install third-party module packages in the web/startup project.
using CrestApps.OrchardCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.SignalR;
using OrchardCore.Modules;
namespace MyCompany.OrchardCore.Live;
public sealed class NotificationsHub : Hub
{
public Task PingAsync()
{
return Clients.Caller.SendAsync("pong");
}
}
public sealed class Startup : StartupBase
{
public override void Configure(
IApplicationBuilder app,
IEndpointRouteBuilder routes,
IServiceProvider serviceProvider)
{
routes.MapHub<NotificationsHub>(SignalRHubRoutes.GetHubPath<NotificationsHub>());
}
}
Declare OrchardCore.SignalR as a dependency of the feature that maps the hub so the SignalR services are present.
Configure a specific hub only when it needs non-default timing:
services.Configure<HubOptions<NotificationsHub>>(options =>
{
options.ClientTimeoutInterval = TimeSpan.FromMinutes(10);
options.KeepAliveInterval = TimeSpan.FromSeconds(15);
});
@using CrestApps.OrchardCore
@{
var hubUrl = Html.SignalRHubUrl<NotificationsHub>();
}
<script at="Foot" depends-on="signalr">
document.addEventListener("DOMContentLoaded", () => {
const connection = new signalR.HubConnectionBuilder()
.withUrl("@hubUrl")
.withAutomaticReconnect()
.build();
connection.on("pong", () => console.log("Connected."));
connection.start().catch(error => console.error("SignalR connection failed.", error));
});
</script>
Outside a view, call SignalRHubRoutes.GetTenantAwareHubUrl<T>(httpContext). Built scripts are bundled per file in 3.0, so a script that exposes an API must assign it to window.
A backplane is shared infrastructure while user ids and group names are tenant-local. Qualify every destination with the shell name:
using CrestApps.OrchardCore.SignalR.Core;
using Microsoft.AspNetCore.SignalR;
using OrchardCore.Environment.Shell;
public sealed class AlertsHub : Hub
{
private readonly ShellSettings _shellSettings;
public AlertsHub(ShellSettings shellSettings)
{
_shellSettings = shellSettings;
}
public override async Task OnConnectedAsync()
{
var userId = Context.UserIdentifier;
if (string.IsNullOrEmpty(userId))
{
Context.Abort();
return;
}
// Group membership is durable state, so never abandon it half-way on ConnectionAborted.
await Groups.AddToGroupAsync(
Context.ConnectionId,
TenantSignalRGroupName.ForUser(_shellSettings.Name, userId),
HubConnectionWork.MustComplete);
await base.OnConnectedAsync();
}
}
Publish from a service through IHubContext<T> to the same name:
await hubContext.Clients
.Group(TenantSignalRGroupName.ForUser(shellSettings.Name, userId))
.SendAsync("notify", payload);
ForUser(tenantName, userId) and ForGroup(tenantName, logicalGroupName) build length-prefixed names (tenant:{len}:{tenant}:user:{len}:{id}), so equal ids in different shells never collide and a crafted name cannot spoof another tenant.Context.ConnectionAborted; work that changes durable state or group membership uses HubConnectionWork.MustComplete.| Backplane | Feature | Configuration |
|---|---|---|
| Redis | OrchardCore.SignalR.Redis | Uses Orchard Core Redis (OrchardCore.Redis) options; the channel prefix is qualified with the Redis instance prefix and the shell name. |
| Azure SignalR Service | OrchardCore.SignalR.Azure | Shell configuration SignalR:Azure:ConnectionString (in appsettings.json under OrchardCore); the application name is derived per tenant. A warning is logged when the connection string is missing. |
{
"OrchardCore": {
"SignalR": {
"Azure": {
"ConnectionString": "Endpoint=https://contoso.service.signalr.net;AccessKey=...;Version=1.0;"
}
}
}
}
The Contact Center topology check still looks for the deprecated CrestApps.OrchardCore.SignalR.Redis feature ID when a topology profile (for example single-node-distributed) requires a Redis backplane. Enable that compatibility feature on those sites; it turns on OrchardCore.SignalR.Redis. See orchardcore-contact-center.
CrestApps.OrchardCore.SignalR module installed until the upgrade runs. Its features now depend on OrchardCore.SignalR, OrchardCore.SignalR.Redis, or OrchardCore.SignalR.Azure, so the matching framework feature is enabled automatically. Afterwards remove the CrestApps package and keep the framework features, or enable the framework features yourself and remove the package immediately.CrestApps.OrchardCore.SignalR.Redis with OrchardCore.SignalR.Redis in recipes (except where the Contact Center topology check needs it).HubRouteManager.MapHub<T>(routes) with routes.MapHub<T>(SignalRHubRoutes.GetHubPath<T>()).HubRouteManager.GetUriByHub<T>(HttpContext) with Html.SignalRHubUrl<T>() or SignalRHubRoutes.GetTenantAwareHubUrl<T>(HttpContext).TenantSignalRGroupName.ForUser or ForGroup; the encoding changed to length-prefixed names.| Symptom | Check |
|---|---|
| 404 on hub negotiation | Enable OrchardCore.SignalR and map the hub with SignalRHubRoutes.GetHubPath<T>() |
| URL misses the tenant prefix | Generate it with Html.SignalRHubUrl<T>() |
signalR is undefined | Add depends-on="signalr" and render footer scripts |
| Payload casing differs | The JSON protocol is camel case |
| Messages reach users of another tenant | Use TenantSignalRGroupName destinations instead of Clients.User |
| Agent connected but receives no queue events | Group membership was cancelled half-way; use HubConnectionWork.MustComplete |
| Tenant fails to start with both backplanes | Enable only one of OrchardCore.SignalR.Redis and OrchardCore.SignalR.Azure |
| Multi-node clients miss messages | Enable a backplane and configure Redis or Azure SignalR |
What SKILL.md sets; muted values are Claude Code's defaults
/crestapps-orchardcore:orchardcore-signalrfrom crestapps-orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-orchardcore137 skills in this plugin
/orchardcore-accountsSkill for the CrestApps Orchard Core Accounts module (CrestApps.OrchardCore.Accounts) with its Account Members, Account Team, Account E-mail Domains and Account Locations features. Covers the Account type and AccountPart, the account picker and search, IAccountChildTypeRule, account page sections (AccountPageTabs, AddPageSection, Notes), members and IAccountMemberService, account invitations, the account owner and team picked from staff, e-mail domains, locations with a billing location, the account's billing profile and party members, the Accounts recipe and deployment steps, and the admin menu. Use this skill when requests mention accounts, the businesses or households records belong to, an account page tab, members, invitations, owners, domains or locations. Strong matches include AccountPart, AccountPageTabs, IAccountMemberService, IAccountInvitationService, AccountInvitation, AccountTeamPart, AccountEmailDomainsPart, IAccountEmailDomains, AccountLocationsPart and ManageAccountMembers./orchardcore-accounts-b2bSkill for the CrestApps Orchard Core Accounts B2B module (CrestApps.OrchardCore.Accounts.B2B), business selling on an Account content item. Covers B2BAccountPart and B2BAccount, buyers as account members and ship-to addresses as account locations, terms (deposit, net days, credit limit) through the account-terms tender billed to the account, the account's billing profile, purchase order numbers, quotes, price lists through IBuyerPriceProvider, order limits, approvals and budgets, OCI punchout, the account/business page and API, the PriceLists recipe and deployment steps, the B2BAccounts report source, and the move from the removed Companies module. Use this skill when requests mention B2B, wholesale or business buyers, net terms, purchase orders, price lists, order approvals or punchout. Strong matches include B2BAccountPart, B2BAccount, AccountTerms, AccountTermsTenderProvider, B2BAccountBillingProfileSource, IB2BAccountStore, PriceList, B2BPriceProvider, B2BApprovalService and ManageB2BAccounts.Other plugins' skills for the same job