dotnet-reactive-patterns

Implement Rx.NET reactive patterns for subscription management and thread marshalling.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/Muhomorik/KanelBulleKapital --skill dotnet-reactive-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-reactive-patterns
Source: https://github.com/Muhomorik/KanelBulleKapital/tree/main/.claude/skills/dotnet-reactive-patterns
Command: npx skills add https://github.com/Muhomorik/KanelBulleKapital --skill dotnet-reactive-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rx.NET reactive patterns help teams manage IObservable streams, subscriptions, and threading in .NET applications, reducing leaks and race conditions.

Core Features & Use Cases

  • CompositeDisposable-based subscription management and DisposeWith extension usage to collect and clean up subscriptions
  • ObserveOn-based thread marshalling to ensure UI-bound updates happen on the correct scheduler
  • Event publishing paradigms that ensure domain events are raised after persistence
  • Clear guidelines for error handling and pattern compliance in reactive code

Quick Start

Instantiate your reactive service, wire up subscriptions with a CompositeDisposable, and dispose the subscriptions when finished to avoid leaks.

Frequently Asked Questions about dotnet-reactive-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage IObservable subscriptions in .NET to prevent memory leaks?

Manage IObservable subscriptions using CompositeDisposable and the DisposeWith extension to collect and clean up streams, ensuring subscriptions are disposed when finished to prevent memory leaks in .NET applications.

What's the best way to marshal reactive streams to the UI thread in C#?

Apply the ObserveOn operator to marshal reactive streams to the appropriate scheduler, ensuring UI-bound updates happen on the correct thread and preventing cross-thread race conditions in C# applications.

When should I use Rx.NET reactive patterns instead of standard C# events?

Use Rx.NET reactive patterns when building robust UI and background services with complex IObservable streams, requiring safe error handling, thread marshalling, and disposable management that standard C# events cannot easily provide.

How do I safely handle errors in reactive streams using Rx.NET?

Safely handle errors in reactive streams by enforcing pattern compliance for error handling within your Rx.NET code, ensuring safe disposal of subscriptions and clear guidelines for managing stream failures.

Why should domain events be published after persistence in reactive applications?

Publishing domain events after persistence ensures data consistency before notifying reactive streams, enforcing a clear event publishing paradigm that prevents race conditions and guarantees valid state propagation.