managedcode/dotnet-skills/managedcode-orleans-signalr
Claude Code and agent skill by managedcode/dotnet-skills
- community
Checking that the SKILL.md file is still in the repository.
Integrate ManagedCode.Orleans.SignalR for grain-driven SignalR delivery, connection and group routing, offline user queues, and restart-safe state. USE FOR: Orleans backplane setup, grain-to-hub publishing, reconnect, heartbeat, and client-invocation failures. DO NOT USE FOR: ordinary SignalR without Orleans or unrelated persistence. INVOKES: inspect configuration, implement the integration, and validate connected-client delivery.
Install
npx vskill@latest install managedcode/dotnet-skills/managedcode-orleans-signalrSKILL.md
The same SKILL.md was published earlier as managedcode/dotnet-skills/managedcode-orleans-signalr.
ManagedCode.Orleans.SignalR
Trigger On
- configuring an Orleans SignalR backplane or sending messages from grains
- diagnosing connection, group, or user routing across hosts
- upgrading offline delivery, heartbeat persistence, or client invocation handling
Install
For a host that runs both the silo and SignalR endpoint:
For separate hosts, put Server on the silo and Client on the ASP.NET Core endpoint. Core supplies shared contracts transitively. Keep versions and partition options aligned across participants; preserve central package management when present.
Configure the Backplane
A combined local development host can use the memory provider:
Import only Server.Extensions for this combined host; a separate client-only endpoint uses Client.Extensions. Importing both makes AddOrleans ambiguous. Use authenticated hub endpoints and the application's existing cluster discovery in deployed environments. The memory provider does not survive silo restarts. When offline delivery must survive restarts, register a durable Orleans grain-storage provider under OrleansSignalROptions.OrleansSignalRStorage instead of the memory helper. Connection metadata, queued messages, heartbeat registrations, and invocation state use this named store.
Send and Receive Updates
Inject IHubContext<UpdatesHub> into the grain or application service that owns the event:
Register a receiver before starting the connection. This example uses the application's @microsoft/signalr client:
Derive userId and permitted group membership from authenticated application identity. Never treat a client-supplied user or group name as authorization. Keep domain state in the owning grain; the backplane transports notifications about that state.
Delivery and Upgrade Boundaries
10.3.0persists queued offline user messages with delivery IDs and expiry, removing them after acknowledgement. Successful dispatch or queue storage is not proof that the browser applied the update; use application event IDs and idempotent handlers when replay matters.KeepMessageIntervalbounds offline retention.MaxQueuedMessagesPerUserdefaults to 100 and discards oldest entries when exceeded. Test expiry and overflow explicitly; offline queues are not an unlimited event log.KeepEachConnectionAliverenews a bounded heartbeat lease. Disabling it relies on ordinary observer/activation lifecycle; it does not make disconnected observers immortal. Test clean disconnect and abrupt host loss independently.- Observer failure thresholds, grace-period buffering, and circuit-breaker options affect retries and cleanup. Set them from measured reconnect behavior and watch drop/failure metrics.
- Internal persisted
HubMessageStatechanged from a dictionary to aQueuedHubMessagelist, andISignalRInvocationGrain.WaitForCompletionnow returns a cancellation-awareIAsyncEnumerable<CqrsStreamChunk<InvocationProgress, CompletionMessage>>. Applications using these lower-level contracts must validate serialization and mixed-version compatibility before rolling upgrades. - A storage write failure must remain observable. Test retry and reactivation with the actual configured serializer and storage provider; an in-memory-only test does not prove durable recovery.
Workflow
- Choose combined or separate silo/endpoint hosts and align packages, clustering, partition options, and named storage.
- Configure authenticated connection, user, and group targeting.
- Keep publishing at an explicit domain-event boundary and decide whether bounded offline retention is sufficient.
- Exercise live delivery, reconnect replay, queue limits, heartbeat cleanup, and interrupted client invocations.
- Before upgrades, validate prior persisted payloads with the production serializer and choose an explicit compatibility or maintenance-window strategy.
Deliver
- configured backplane and named storage with a stated durability boundary
- a working publisher and client receiver
- evidence for the required live, offline, restart, and failure behavior
Validate
dotnet restoreanddotnet buildresolve the aligned package set- a real connected client receives a grain-originated message on another host
- user/group isolation, reconnect, queue expiry/overflow, and heartbeat cleanup work
- restart tests preserve queued messages only when durable storage is configured
- cancellation and missing-client completion terminate predictably
- tests keep unrelated cases parallel; isolate destructive restart tests by their owned cluster
Sources
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcatalog/Libraries/ManagedCode-Orleans-SignalR/skills/managedcode-orleans-signalr/SKILL.md
Popularity
- Repository stars
- 477
- Repository forks
- 33
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 9 Sep 2026, 2 months ago.
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/managedcode/dotnet-skills/managedcode-orleans-signalr)