Sends transient SignalR chat UI notifications in Orchard Core using the CrestApps AI Chat feature. Covers IChatNotificationSender, notification transports, action handlers, and custom delivery.
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 C# integration code for transient, non-persistent system messages delivered to connected chat clients through SignalR. These notifications are an AI Chat feature and are distinct from response handlers and persisted chat messages.
CrestApps.OrchardCore.AI.Chat to use the AI Chat session notification transport.IChatNotificationSender to send, update, and remove notifications.ChatContextType: AIChatSession for profile chat or ChatInteraction for ad-hoc interactions.IChatNotificationTransport as a keyed service using the chat context type.AIChatNotificationTransport broadcasts to the AIChatHub session group.ChatInteractionNotificationTransport broadcasts to the ChatInteractionHub interaction group when the interactions feature is enabled.ChatNotification with a required type supplied to its constructor.SendAsync for a new notification, UpdateAsync for a changed notification, and RemoveAsync to clear it.IChatNotificationActionHandler services where the key exactly equals ChatNotificationAction.Name.HandleNotificationAction resolves the keyed handler in a child shell scope and passes a ChatNotificationActionContext. On AIChatHub it first authorizes the caller against the session's profile, so a caller cannot act on an arbitrary session id.IChatNotificationSender, IChatNotificationActionHandler, IChatNotificationTransport and ChatNotificationTypes in CrestApps.Core.AI.Chat; ChatNotification, ChatNotificationAction, ChatNotificationActionContext and ChatContextType in CrestApps.Core.AI.Models.IStringLocalizer; do not hard-code user-facing messages in reusable modules.| Feature | Feature ID | Transport |
|---|---|---|
| AI Chat | CrestApps.OrchardCore.AI.Chat | AIChatNotificationTransport for AIChatSession |
| AI Chat Interactions | CrestApps.OrchardCore.AI.Chat.Interactions | ChatInteractionNotificationTransport for ChatInteraction |
Install the chat package in the web/startup project:
dotnet add package CrestApps.OrchardCore.AI.Chat
{
"steps": [
{
"name": "Feature",
"enable": [
"CrestApps.OrchardCore.AI",
"CrestApps.OrchardCore.AI.Chat"
],
"disable": []
}
]
}
For notifications on ad-hoc chat interactions, also enable CrestApps.OrchardCore.AI.Chat.Interactions.
using CrestApps.Core.AI.Chat;
using CrestApps.Core.AI.Models;
using Microsoft.Extensions.Localization;
namespace MyModule;
public sealed class AgentStatusNotifier
{
private readonly IChatNotificationSender _notifications;
private readonly IStringLocalizer T;
public AgentStatusNotifier(
IChatNotificationSender notifications,
IStringLocalizer<AgentStatusNotifier> localizer)
{
_notifications = notifications;
T = localizer;
}
public Task ShowTypingAsync(string sessionId)
{
return _notifications.SendAsync(
sessionId,
ChatContextType.AIChatSession,
new ChatNotification(ChatNotificationTypes.Typing)
{
Content = T["An agent is typing"].Value,
Icon = "fa-solid fa-ellipsis",
});
}
public Task RemoveTypingAsync(string sessionId)
{
return _notifications.RemoveAsync(
sessionId,
ChatContextType.AIChatSession,
ChatNotificationTypes.Typing);
}
}
| Member | Use |
|---|---|
Id | Optional instance identifier for client targeting |
Type | Required visual and replacement type set by the constructor |
Content | Localized display text |
Icon | Font Awesome icon class |
CssClass | Additional container class |
Dismissible | Shows a client dismissal control |
Actions | Buttons that invoke server-side handlers |
Metadata | Non-sensitive extensibility data sent to the client |
The chat UI applies ai-chat-notification-{type} in addition to base styling. Add theme CSS for custom types.
await notifications.SendAsync(
sessionId,
ChatContextType.AIChatSession,
new ChatNotification(ChatNotificationTypes.Transfer)
{
Content = T["Transferring you to a live agent."].Value,
Icon = "fa-solid fa-headset",
Actions =
[
new ChatNotificationAction
{
Name = ChatNotificationActionNames.CancelTransfer,
Label = T["Cancel transfer"].Value,
CssClass = "btn-outline-danger",
Icon = "fa-solid fa-xmark",
},
],
});
Update the same Transfer type when wait-time information changes. Remove it when transfer completes.
Define a handler for a custom action name:
using CrestApps.Core.AI.Chat;
using CrestApps.Core.AI.Models;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Modules;
namespace MyModule;
public sealed class FeedbackActionHandler : IChatNotificationActionHandler
{
public Task HandleAsync(
ChatNotificationActionContext context,
CancellationToken cancellationToken = default)
{
var notifications = context.Services.GetRequiredService<IChatNotificationSender>();
return notifications.RemoveAsync(
context.SessionId,
context.ChatType,
context.NotificationType);
}
}
public sealed class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddKeyedScoped<IChatNotificationActionHandler, FeedbackActionHandler>("feedback-positive");
}
}
Send an action whose Name is exactly feedback-positive:
await notifications.SendAsync(sessionId, ChatContextType.AIChatSession, new ChatNotification("feedback")
{
Content = T["Was this helpful?"].Value,
Dismissible = true,
Actions =
[
new ChatNotificationAction
{
Name = "feedback-positive",
Label = T["Yes"].Value,
CssClass = "btn-outline-success",
},
],
});
| Constant | Purpose |
|---|---|
ChatNotificationTypes.Typing | Agent typing indicator |
ChatNotificationTypes.Transfer | Live-agent transfer state |
ChatNotificationTypes.AgentConnected | Agent-connected state |
ChatNotificationTypes.AgentReconnecting | Reconnect warning |
ChatNotificationTypes.ConnectionLost | Connection failure |
ChatNotificationTypes.ConversationEnded | Conversation-ended state |
ChatNotificationTypes.SessionEnded | Session-ended state |
ChatNotificationActionNames.CancelTransfer | Reset response-handler routing and remove transfer notification |
ChatNotificationActionNames.EndSession | Close the session and show session-ended state |
ChatContextType is an enum with two values, AIChatSession and ChatInteraction, and the transport is resolved as a keyed service by that value. A custom transport therefore replaces the delivery for one of those two chat types, for example when a module serves profile chat from its own hub. Implement IChatNotificationTransport (SendNotificationAsync, UpdateNotificationAsync, RemoveNotificationAsync), broadcast to your hub's group, and register it for the chat type it serves:
public sealed class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddKeyedScoped<IChatNotificationTransport, MyChatNotificationTransport>(
ChatContextType.AIChatSession);
}
}
The built-in AIChatNotificationTransport and ChatInteractionNotificationTransport are internal. Do not replace them for ordinary profile and interaction notifications.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
orchard-core, signalr, chat-notifications, ai-chat, crestapps
/crestapps-orchardcore:orchardcore-ai-chat-notificationsfrom 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