crestapps/crestapps.agentskills/orchardcore-websockets
Claude Code and agent skill by crestapps/crestapps.agentskills
- community
Checking that the SKILL.md file is still in the repository.
Skill for the CrestApps Orchard Core WebSockets infrastructure module. Covers the dependency-only CrestApps.OrchardCore.WebSockets feature that adds the ASP.NET Core WebSocket middleware to the tenant pipeline, the CrestApps WebSockets configuration section bound to WebSocketOptions (KeepAliveInterval, KeepAliveTimeout, AllowedOrigins), hosting raw WebSocket endpoints, the IWebSocketConnectionRegistry and WebSocketRendezvous contracts for provider callbacks that dial back, in-memory and Redis-b…
Install
npx vskill@latest install crestapps/crestapps.agentskills/orchardcore-websocketsSKILL.md
The same SKILL.md was published earlier as crestapps/crestapps.agentskills/orchardcore-websockets.
Orchard Core WebSockets - Prompt Templates
Host Raw WebSocket Endpoints
You are an Orchard Core expert. Generate accurate code and configuration for features that accept raw WebSocket upgrades (HttpContext.WebSockets.AcceptWebSocketAsync()) in a CrestApps Orchard Core tenant.
Guidelines
- The Orchard Core host does not run
app.UseWebSockets(). Without it a raw upgrade is refused. SignalR does not need it (seeorchardcore-signalr). CrestApps.OrchardCore.WebSocketsis the single place the middleware is added. It isEnabledByDependencyOnly, so it never shows as a toggle; declare it as a dependency of your feature instead of enabling it in a recipe.- Depend on the contracts in
CrestApps.OrchardCore.WebSockets.Abstractions(IWebSocketConnectionRegistry,WebSocketRendezvous), not on the module's host wiring. - Use unguessable, single-use keys for every rendezvous, and remove the key when the starter times out.
- A live socket cannot move between nodes. Route provider callbacks back to the node that started them.
- Install third-party module packages in the web/startup project.
- All recipe JSON must be wrapped in
{ "steps": [...] }. - All C# classes must use the
sealedmodifier, except for View Models.
Feature Overview
| Item | Value | |
|---|---|---|
| Module package | CrestApps.OrchardCore.WebSockets (category Infrastructure) | |
| Feature ID | CrestApps.OrchardCore.WebSockets (WebSocketsConstants.Feature.Area) | |
| Enabled by | Dependency only (for example the CrestApps.OrchardCore.Telnyx feature) | |
| Contracts package | CrestApps.OrchardCore.WebSockets.Abstractions (namespace CrestApps.OrchardCore.WebSockets) | |
| Configuration section | CrestApps:WebSockets (WebSocketsConstants.ConfigurationSectionPath), bound to ASP.NET Core WebSocketOptions | |
| Default registry | InMemoryWebSocketConnectionRegistry (per node) | |
| Distributed registry | DistributedWebSocketConnectionRegistry, active when OrchardCore.Redis is enabled |
Depend on the Feature
Configure the Middleware
Every key is optional; omitted keys keep the ASP.NET Core defaults (two-minute keep-alive, no origin restriction).
| Key | Meaning | |
|---|---|---|
KeepAliveInterval | Interval for server ping frames on an idle socket. | |
KeepAliveTimeout | Time to wait for a pong before aborting. Omit to disable. | |
AllowedOrigins | Accepted Origin header values. Empty accepts all. Only browser handshakes send Origin, so this does not restrict server-to-server provider callbacks. |
Environment variables use OrchardCore__CrestApps__WebSockets__KeepAliveInterval. A tenant's own App_Data/Sites/{TenantName}/appsettings.json starts at CrestApps without the OrchardCore wrapper. The options are read once when the pipeline is built, so a change needs a tenant reload.
Correlate a Provider Callback
A provider (for example Telnyx media streaming) is asked to dial back to a WebSocket endpoint. The request that asked waits for that socket; the endpoint that accepts it hands it over through the registry.
The endpoint the provider dials:
RegisterAsync throws on a duplicate key. TryClaimAsync atomically claims and removes the rendezvous, so a key works once.
Multi-Node Deployments
| Registry | When | Behavior | |
|---|---|---|---|
| In-memory | Default | A key is known only on the node that registered it. A callback on another node looks like an unknown key. | |
| Distributed | OrchardCore.Redis enabled for the tenant | The rendezvous still lives on the registering node, which records ownership of the key in Redis for 10 minutes. A misrouted callback is still refused, but the log names the owning node and the rendezvous stays intact for the provider's retry. If Redis is unreachable, registration falls back to node-local behavior. |
- Single node works out of the box.
- On several nodes, give each node its own public base URL (host affinity) so the provider calls back the node that started the flow, and enable
OrchardCore.Redisso misrouting shows in the log. IWebSocketConnectionRegistryis replaceable; register another implementation withservices.Replace(...)to add a relay.
Both registries count rendezvous operations on the CrestApps.OrchardCore.WebSockets meter: crestapps.websockets.rendezvous (result = registered, conflict, claimed, miss, cross_node, removed; cross_node is a socket that arrived on a node other than the waiting one) and crestapps.websockets.rendezvous.wait.duration (registration to the provider's socket arriving). The rendezvous key never tags a metric. See orchardcore-observability.
Common Failures
| Symptom | Check | |
|---|---|---|
| Upgrade refused or the request is not a WebSocket request | Your feature does not depend on CrestApps.OrchardCore.WebSockets, so UseWebSockets is not in the pipeline | |
| Callback is refused with an unknown key | The callback reached another node, the key expired, or it was already claimed | |
| Browser handshake rejected | The page origin is missing from AllowedOrigins | |
| Idle sockets drop behind a proxy | Lower KeepAliveInterval below the proxy idle timeout |
Related Skills
orchardcore-telephony-telnyxfor the Telnyx media stream endpoint that uses this feature.orchardcore-contact-centerfor voice media and live call topology.orchardcore-signalrfor hub-based real-time messaging.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/crestapps-orchardcore/skills/orchardcore-websockets/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/crestapps/crestapps.agentskills/orchardcore-websockets)