[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79Y9PCQSFWMVP40YF2R359K":3,"skill-same:01M79Y9PCQSFWMVP40YF2R359K":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M79Y9PCQSFWMVP40YF2R359K","r3-reactive-extensions",null,"Build reactive\u002Fevent-driven C# with R3 (Cysharp's modern reimplementation of Reactive Extensions). Covers the Observable\u003CT>\u002FObserver\u003CT> model, the OnErrorResume error contract, async dispatch with AwaitOperation, Task\u002FIAsyncEnumerable integration, TimeProvider\u002FFrameProvider scheduling, the concurrency contract, and how R3 differs from System.Reactive (Rx.NET).","Blind-Striker\u002Fagent-skills-and-plugins","Blind-Striker","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1965259?v=4","01M79WFXTE5PH0C1VB7B54ANMN","Deniz İrgin","01M79WFXV5KZ5GST1K8G035DM5",1,"MIT","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fplugins\u002Fdeniz-dotnet-general\u002Fskills\u002Fr3-reactive-extensions\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: r3-reactive-extensions\ndescription: Build reactive\u002Fevent-driven C# with R3 (Cysharp's modern\n  reimplementation of Reactive Extensions). Covers the Observable\u003CT>\u002FObserver\u003CT>\n  model, the OnErrorResume error contract, async dispatch with AwaitOperation,\n  Task\u002FIAsyncEnumerable integration, TimeProvider\u002FFrameProvider scheduling, the\n  concurrency contract, and how R3 differs from System.Reactive (Rx.NET).\nuser-invocable: false\n---\n\n# R3: Modern Reactive Extensions for .NET\n\nR3 is [Cysharp's](https:\u002F\u002Fgithub.com\u002FCysharp\u002FR3) ground-up reimplementation of Reactive\nExtensions — \"the new future of dotnet\u002Freactive and UniRx.\" It keeps the LINQ-over-events\nprogramming model but rebuilds the core types, error contract, and scheduler to fix\nlong-standing problems in `System.Reactive` (Rx.NET). Use this skill when composing event\nstreams, UI input, timers, or push-based pipelines in C#.\n\n**Canonical sources** (link to these from code and docs):\n- Repository: https:\u002F\u002Fgithub.com\u002FCysharp\u002FR3\n- README (full operator reference): https:\u002F\u002Fgithub.com\u002FCysharp\u002FR3\u002Fblob\u002Fmain\u002FREADME.md\n- Author's design rationale: https:\u002F\u002Fneuecc.medium.com\u002Fr3-a-new-modern-reimplementation-of-reactive-extensions-for-c-cf29abcc5826\n\n## When to Use This Skill\n\nUse this skill when:\n- Composing **events** over time — UI input, sensor\u002Ffeed updates, websocket messages, domain events\n- You need operators like debounce, throttle, merge, combine-latest, distinct-until-changed\n- Building **MVVM** state with `ReactiveProperty` \u002F `BindableReactiveProperty`\n- Bridging push-based streams with `Task` \u002F `async` and `IAsyncEnumerable`\n- Migrating from `System.Reactive`, UniRx, or `IObservable\u003CT>` code\n- You hit Rx pain points: subscriptions dying on exceptions, scheduler overhead, or leak hunting\n\n**Not the right tool for:** request\u002Fresponse I\u002FO (use `async\u002Fawait`), bounded producer\u002Fconsumer\nwith **backpressure** (use `System.Threading.Channels`), or server-side stream processing with\nbatching\u002Fbackpressure (use Akka.NET Streams). R3, like all Rx, is **push-based with no\nbackpressure**. See the `csharp-concurrency-patterns` skill for choosing between these.\n\n## Reference Files\n\n- [rx-net-differences.md](rx-net-differences.md): Every meaningful difference vs System.Reactive (Rx.NET) — the new core types, the error model, operator renames, dropped APIs, the scheduler swap, and a migration checklist.\n- [async-and-integration-patterns.md](async-and-integration-patterns.md): Common patterns — async dispatch with `AwaitOperation`, `Task` integration, `IAsyncEnumerable` round-tripping, `ReactiveProperty`\u002FMVVM, subjects, and subscription lifecycle.\n- [scheduling-and-concurrency.md](scheduling-and-concurrency.md): How R3 handles **concurrent updates** (the threading contract, `Synchronize`, `ObserveOn`), `TimeProvider` vs `FrameProvider`, when each is necessary, and deterministic testing with fake providers.\n\n> Everything in this skill was validated empirically against **R3 1.3.1**. Captured output\n> appears in the reference files as evidence.\n\n---\n\n## Why R3 Exists (the \"why use it\")\n\nThe author ([neuecc](https:\u002F\u002Fneuecc.medium.com\u002Fr3-a-new-modern-reimplementation-of-reactive-extensions-for-c-cf29abcc5826))\nbuilt R3 to fix concrete defects in `System.Reactive`:\n\n1. **Exceptions silently kill subscriptions.** In Rx, one exception in the pipeline calls\n   `OnError` and *unsubscribes forever* — \"a billion-dollar mistake\" for long-lived event\n   streams (a single bad UI event tears down the whole subscription). R3 routes errors to\n   `OnErrorResume` and **keeps the subscription alive by default**.\n2. **`IScheduler` is heavy and confusing.** `ImmediateScheduler`\u002F`Merge` were measured causing\n   real server memory\u002FCPU bloat. R3 deletes `IScheduler` and uses .NET 8's `TimeProvider`\n   (wall-clock) plus a new `FrameProvider` (frame-clock).\n3. **Subscription leaks are hard to find.** R3 makes every `Observable\u003CT>` an abstract class so\n   all subscriptions funnel through one place, enabling `ObservableTracker` to list every live\n   subscription with stack traces.\n4. **Rx and async were awkwardly fused.** R3 treats Rx as **event-first** and adds explicit\n   bridges (`AwaitOperation`, `FromAsync`, `ToAsyncEnumerable`) instead of pretending events\n   are pull-based sequences.\n5. **One library, every UI.** A platform-neutral core plus thin provider packages for Unity,\n   Godot, WPF, WinForms, Avalonia, WinUI3, MAUI, Stride, MonoGame, and Blazor.\n\n---\n\n## Install\n\n```bash\ndotnet add package R3\n# Platform glue (pick what applies): R3.WPF, R3.Avalonia, R3.WinForms, R3.Unity (UPM),\n# R3.Godot, ObservableCollections.R3, etc. See the repo README for the full list.\n```\n\n```csharp\nusing R3;\n```\n\n---\n\n## The Mental Model\n\nR3 replaces Rx's **interfaces** with **abstract classes**, and replaces Rx's two-method error\ncontract with a single completion that carries a result.\n\n```csharp\npublic abstract class Observable\u003CT>\n{\n    public IDisposable Subscribe(Observer\u003CT> observer);     \u002F\u002F tracked centrally\n    protected abstract IDisposable SubscribeCore(Observer\u003CT> observer);\n}\n\npublic abstract class Observer\u003CT> : IDisposable               \u002F\u002F the observer IS the subscription\n{\n    public void OnNext(T value);\n    public void OnErrorResume(Exception error);               \u002F\u002F error WITHOUT unsubscribing\n    public void OnCompleted(Result result);                   \u002F\u002F success OR failure terminates\n}\n```\n\nThe grammar is `(OnNext | OnErrorResume)* OnCompleted(Result)?`. Note the difference from Rx's\n`OnNext* (OnError | OnCompleted)?`: **errors and termination are decoupled**. An error is just a\nnotification; only `OnCompleted` ends the stream, and it carries a `Result` that is either\n`Result.Success` or `Result.Failure(exception)`.\n\n### Quick start\n\n```csharp\nusing R3;\n\nvar subscription = Observable\n    .EveryValueChanged(model, m => m.SearchText)   \u002F\u002F emits when the property changes\n    .Debounce(TimeSpan.FromMilliseconds(300))      \u002F\u002F Rx called this \"Throttle\" (see differences)\n    .DistinctUntilChanged()\n    .SubscribeAwait(async (text, ct) =>\n    {\n        var results = await _api.SearchAsync(text, ct);\n        Render(results);\n    }, AwaitOperation.Switch);                      \u002F\u002F cancel the in-flight search on a new keystroke\n\n\u002F\u002F Dispose to unsubscribe; or route into a DisposableBag \u002F AddTo(token).\nsubscription.Dispose();\n```\n\n---\n\n## Core Behavior, Verified\n\n### Errors do not terminate by default\n\n```csharp\nvar subject = new Subject\u003Cint>();\nsubject.Select(x => 100 \u002F x).Subscribe(\n    onNext:        x => Console.WriteLine($\"next {x}\"),\n    onErrorResume: e => Console.WriteLine($\"errorResume {e.GetType().Name}\"),\n    onCompleted:   (Result r) => Console.WriteLine($\"completed IsSuccess={r.IsSuccess}\"));\n\nsubject.OnNext(2);   \u002F\u002F next 50\nsubject.OnNext(0);   \u002F\u002F errorResume DivideByZeroException   \u003C-- NOT terminated\nsubject.OnNext(5);   \u002F\u002F next 20                             \u003C-- subscription is still alive!\nsubject.OnCompleted(); \u002F\u002F completed IsSuccess=True\n```\n\nThis is the single biggest behavioral change from Rx. To opt back into classic \"an error\nterminates the sequence\" behavior, insert `.OnErrorResumeAsFailure()` — the error then flows to\n`OnCompleted(Result.Failure(e))` and downstream `OnNext`s stop. Recover with `Catch`. Full\ncaptured runs and the (deliberately absent) `Retry` story are in\n[rx-net-differences.md](rx-net-differences.md).\n\n### Async dispatch is explicit\n\nR3's async operators (`SubscribeAwait`, `SelectAwait`, `WhereAwait`, …) take an `AwaitOperation`\nthat decides what happens when values arrive faster than the async work completes:\n\n| `AwaitOperation` | Overlap behavior | Typical use |\n|------------------|------------------|-------------|\n| `Sequential` (default) | Queue values, run one at a time | Ordered processing |\n| `Drop` | Ignore new values while one is running | Debounced submit \u002F cooldown |\n| `Switch` | Cancel the running one, start the new | Search-as-you-type, latest-wins |\n| `Parallel` | Run all concurrently | Independent fan-out |\n| `SequentialParallel` | Run concurrently, emit results in order | Parallel map, ordered output |\n| `ThrottleFirstLast` | Run first + last of a burst | Leading\u002Ftrailing sampling |\n\nThese were verified to behave exactly as described (including `Switch` cancelling the superseded\noperation's `CancellationToken`). See [async-and-integration-patterns.md](async-and-integration-patterns.md).\n\n### Task and IAsyncEnumerable bridges\n\n```csharp\n\u002F\u002F Task -> Observable\nawait Observable.FromAsync(async ct => await LoadAsync(ct)).FirstAsync();\n\n\u002F\u002F Observable -> Task (terminal operators return Task\u003CT>)\nList\u003Cint> all = await source.ToListAsync();\nint last      = await source.LastAsync();\n\n\u002F\u002F IAsyncEnumerable -> Observable, and back\nawait asyncEnumerable.ToObservable().ForEachAsync(Handle);\nawait foreach (var x in source.ToAsyncEnumerable()) { \u002F* ... *\u002F }\n```\n\nAll verified working. Details and the full terminal-operator list are in\n[async-and-integration-patterns.md](async-and-integration-patterns.md).\n\n---\n\n## How R3 Handles Concurrent Updates\n\n**R3 does not serialize concurrent producers.** Like Rx, it assumes the Rx grammar: `OnNext`\nmust not be called concurrently or re-entrantly from multiple threads. Operators (`Where`,\n`Select`, `Subject`, …) are **not internally locked**. Pushing `OnNext` from many threads at once\ninto a stateful downstream **corrupts state** — in testing, 20,000 concurrent `OnNext` calls into\na `List\u003CT>` subscriber lost ~half the items and threw inside the operator chain.\n\nThe fix is to make the boundary explicit:\n\n```csharp\n\u002F\u002F Multiple producer threads -> one serialized consumer\nsubject.Synchronize()                  \u002F\u002F lock-based gate; delivery becomes single-threaded\n       .Where(x => x.IsValid)\n       .Subscribe(Handle);             \u002F\u002F verified: 10000\u002F10000 items, no corruption\n\n\u002F\u002F Or marshal onto a context\u002Fthreadpool, which also serializes delivery:\nsource.ObserveOnThreadPool().Subscribe(Handle);\n\n\u002F\u002F For shared MVVM state written from many threads:\nvar counter = new SynchronizedReactiveProperty\u003Cint>(0);   \u002F\u002F thread-safe writes\n```\n\n**Practical rule:** if more than one thread can publish into a stream, put `Synchronize()` (or an\n`ObserveOn*`) immediately after the source, or use `SynchronizedReactiveProperty`. Full race\nreproductions and outputs are in [scheduling-and-concurrency.md](scheduling-and-concurrency.md).\n\n---\n\n## Time vs Frames: TimeProvider and FrameProvider\n\nR3 has **two** notions of \"when,\" and both are abstractions you can fake in tests:\n\n- **`TimeProvider`** (the .NET 8 BCL type) = wall-clock time. Used by `Delay`, `Debounce`,\n  `Interval`, `Timer`, `Timeout`. This is what server\u002Fbusiness code uses.\n- **`FrameProvider`** (R3-specific) = a *frame clock*. Used by `EveryUpdate`, `DelayFrame(n)`,\n  `IntervalFrame(n)`, etc.\n\n**When is a FrameProvider necessary?** Whenever \"progress\" is measured in render\u002Fupdate ticks\ninstead of elapsed time:\n- **Game engines** (Unity, Godot, Stride, MonoGame) — logic ticks with the engine's update loop,\n  so it respects pause and time-scale and stays in lockstep with rendering.\n- **UI render loops** (WPF\u002FAvalonia\u002FWinUI composition frames) — react per frame.\n- **Deterministic tests** — `FakeFrameProvider.Advance(n)` drives frames with zero real time,\n  exactly as `FakeTimeProvider.Advance(timeSpan)` drives the clock.\n\nPlain server\u002Fbusiness code virtually never needs `FrameProvider` — that's `TimeProvider`\nterritory. Both fakes make time-dependent pipelines fully deterministic; examples in\n[scheduling-and-concurrency.md](scheduling-and-concurrency.md).\n\n---\n\n## Best Practices Summary\n\n### DO\n- Treat `OnErrorResume` as the default: design streams that survive individual bad events.\n- Add `.OnErrorResumeAsFailure()` when you genuinely want an error to terminate the stream.\n- Choose an `AwaitOperation` deliberately for every async operator (`Switch` for latest-wins,\n  `Sequential` for ordering, `Drop` for cooldowns).\n- Put `Synchronize()` \u002F `ObserveOn*` after any source that multiple threads publish into.\n- Pass a `TimeProvider` to time operators and a `FrameProvider` to frame operators so tests can\n  use `FakeTimeProvider` \u002F `FakeFrameProvider`.\n- Manage lifetime: route subscriptions into a `DisposableBag`, `CompositeDisposable`, or\n  `.AddTo(cancellationToken)`; turn on `ObservableTracker` in dev to catch leaks.\n- Use `ReactiveProperty` for de-duplicated observable state; `BindableReactiveProperty` for\n  XAML-bound state.\n\n### DON'T\n- Don't assume an exception ends the stream (that's Rx, not R3).\n- Don't reach for Rx names that R3 renamed: it's `Debounce` (not `Throttle`), `ThrottleLast`\n  (not `Sample`), `Chunk` (not `Buffer`). `Retry`, `GroupBy`, `Finally`, and plain `Buffer` are\n  **absent** in 1.3.1 — see the differences file for replacements.\n- Don't call `OnNext` concurrently\u002Fre-entrantly from multiple threads without `Synchronize()`.\n- Don't use R3 for backpressured throughput pipelines — use Channels or Akka.NET Streams.\n- Don't block on terminal operators (`.Result`\u002F`.Wait()`); they return `Task\u003CT>` — `await` them.\n\n---\n\n## Additional Resources\n\n- **R3 repository:** https:\u002F\u002Fgithub.com\u002FCysharp\u002FR3\n- **Full README \u002F operator reference:** https:\u002F\u002Fgithub.com\u002FCysharp\u002FR3\u002Fblob\u002Fmain\u002FREADME.md\n- **Design rationale (neuecc):** https:\u002F\u002Fneuecc.medium.com\u002Fr3-a-new-modern-reimplementation-of-reactive-extensions-for-c-cf29abcc5826\n- **NuGet:** https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FR3\n- **`TimeProvider` (BCL):** https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fdotnet\u002Fapi\u002Fsystem.timeprovider\n- **`FakeTimeProvider`:** https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FMicrosoft.Extensions.TimeProvider.Testing\n- **Related skill:** `csharp-concurrency-patterns` (choosing R3 vs async\u002Fawait vs Channels vs Akka.NET)\n","# R3: Modern Reactive Extensions for .NET\n\nR3 is [Cysharp's](https:\u002F\u002Fgithub.com\u002FCysharp\u002FR3) ground-up reimplementation of Reactive\nExtensions — \"the new future of dotnet\u002Freactive and UniRx.\" It keeps the LINQ-over-events\nprogramming model but rebuilds the core types, error contract, and scheduler to fix\nlong-standing problems in `System.Reactive` (Rx.NET). Use this skill when composing event\nstreams, UI input, timers, or push-based pipelines in C#.\n\n**Canonical sources** (link to these from code and docs):\n- Repository: https:\u002F\u002Fgithub.com\u002FCysharp\u002FR3\n- README (full operator reference): https:\u002F\u002Fgithub.com\u002FCysharp\u002FR3\u002Fblob\u002Fmain\u002FREADME.md\n- Author's design rationale: https:\u002F\u002Fneuecc.medium.com\u002Fr3-a-new-modern-reimplementation-of-reactive-extensions-for-c-cf29abcc5826\n\n## When to Use This Skill\n\nUse this skill when:\n- Composing **events** over time — UI input, sensor\u002Ffeed updates, websocket messages, domain events\n- You need operators like debounce, throttle, merge, combine-latest, distinct-until-changed\n- Building **MVVM** state with `ReactiveProperty` \u002F `BindableReactiveProperty`\n- Bridging push-based streams with `Task` \u002F `async` and `IAsyncEnumerable`\n- Migrating from `System.Reactive`, UniRx, or `IObservable\u003CT>` code\n- You hit Rx pain points: subscriptions dying on exceptions, scheduler overhead, or leak hunting\n\n**Not the right tool for:** request\u002Fresponse I\u002FO (use `async\u002Fawait`), bounded producer\u002Fconsumer\nwith **backpressure** (use `System.Threading.Channels`), or server-side stream processing with\nbatching\u002Fbackpressure (use Akka.NET Streams). R3, like all Rx, is **push-based with no\nbackpressure**. See the `csharp-concurrency-patterns` skill for choosing between these.\n\n## Reference Files\n\n- [rx-net-differences.md](rx-net-differences.md): Every meaningful difference vs System.Reactive (Rx.NET) — the new core types, the error model, operator renames, dropped APIs, the scheduler swap, and a migration checklist.\n- [async-and-integration-patterns.md](async-and-integration-patterns.md): Common patterns — async dispatch with `AwaitOperation`, `Task` integration, `IAsyncEnumerable` round-tripping, `ReactiveProperty`\u002FMVVM, subjects, and subscription lifecycle.\n- [scheduling-and-concurrency.md](scheduling-and-concurrency.md): How R3 handles **concurrent updates** (the threading contract, `Synchronize`, `ObserveOn`), `TimeProvider` vs `FrameProvider`, when each is necessary, and deterministic testing with fake providers.\n\n> Everything in this skill was validated empirically against **R3 1.3.1**. Captured output\n> appears in the reference files as evidence.\n\n---\n\n## Why R3 Exists (the \"why use it\")\n\nThe author ([neuecc](https:\u002F\u002Fneuecc.medium.com\u002Fr3-a-new-modern-reimplementation-of-reactive-extensions-for-c-cf29abcc5826))\nbuilt R3 to fix concrete defects in `System.Reactive`:\n\n1. **Exceptions silently kill subscriptions.** In Rx, one exception in the pipeline calls\n   `OnError` and *unsubscribes forever* — \"a billion-dollar mistake\" for long-lived event\n   streams (a single bad UI event tears down the whole subscription). R3 routes errors to\n   `OnErrorResume` and **keeps the subscription alive by default**.\n2. **`IScheduler` is heavy and confusing.** `ImmediateScheduler`\u002F`Merge` were measured causing\n   real server memory\u002FCPU bloat. R3 deletes `IScheduler` and uses .NET 8's `TimeProvider`\n   (wall-clock) plus a new `FrameProvider` (frame-clock).\n3. **Subscription leaks are hard to find.** R3 makes every `Observable\u003CT>` an abstract class so\n   all subscriptions funnel through one place, enabling `ObservableTracker` to list every live\n   subscription with stack traces.\n4. **Rx and async were awkwardly fused.** R3 treats Rx as **event-first** and adds explicit\n   bridges (`AwaitOperation`, `FromAsync`, `ToAsyncEnumerable`) instead of pretending events\n   are pull-based sequences.\n5. **One library, every UI.** A platform-neutral core plus thin provider packages for Unity,\n   Godot, WPF, WinForms, Avalonia, WinUI3, MAUI, Stride, MonoGame, and Blazor.\n\n---\n\n## Install\n\n```bash\ndotnet add package R3\n# Platform glue (pick what applies): R3.WPF, R3.Avalonia, R3.WinForms, R3.Unity (UPM),\n# R3.Godot, ObservableCollections.R3, etc. See the repo README for the full list.\n```\n\n```csharp\nusing R3;\n```\n\n---\n\n## The Mental Model\n\nR3 replaces Rx's **interfaces** with **abstract classes**, and replaces Rx's two-method error\ncontract with a single completion that carries a result.\n\n```csharp\npublic abstract class Observable\u003CT>\n{\n    public IDisposable Subscribe(Observer\u003CT> observer);     \u002F\u002F tracked centrally\n    protected abstract IDisposable SubscribeCore(Observer\u003CT> observer);\n}\n\npublic abstract class Observer\u003CT> : IDisposable               \u002F\u002F the observer IS the subscription\n{\n    public void OnNext(T value);\n    public void OnErrorResume(Exception error);               \u002F\u002F error WITHOUT unsubscribing\n    public void OnCompleted(Result result);                   \u002F\u002F success OR failure terminates\n}\n```\n\nThe grammar is `(OnNext | OnErrorResume)* OnCompleted(Result)?`. Note the difference from Rx's\n`OnNext* (OnError | OnCompleted)?`: **errors and termination are decoupled**. An error is just a\nnotification; only `OnCompleted` ends the stream, and it carries a `Result` that is either\n`Result.Success` or `Result.Failure(exception)`.\n\n### Quick start\n\n```csharp\nusing R3;\n\nvar subscription = Observable\n    .EveryValueChanged(model, m => m.SearchText)   \u002F\u002F emits when the property changes\n    .Debounce(TimeSpan.FromMilliseconds(300))      \u002F\u002F Rx called this \"Throttle\" (see differences)\n    .DistinctUntilChanged()\n    .SubscribeAwait(async (text, ct) =>\n    {\n        var results = await _api.SearchAsync(text, ct);\n        Render(results);\n    }, AwaitOperation.Switch);                      \u002F\u002F cancel the in-flight search on a new keystroke\n\n\u002F\u002F Dispose to unsubscribe; or route into a DisposableBag \u002F AddTo(token).\nsubscription.Dispose();\n```\n\n---\n\n## Core Behavior, Verified\n\n### Errors do not terminate by default\n\n```csharp\nvar subject = new Subject\u003Cint>();\nsubject.Select(x => 100 \u002F x).Subscribe(\n    onNext:        x => Console.WriteLine($\"next {x}\"),\n    onErrorResume: e => Console.WriteLine($\"errorResume {e.GetType().Name}\"),\n    onCompleted:   (Result r) => Console.WriteLine($\"completed IsSuccess={r.IsSuccess}\"));\n\nsubject.OnNext(2);   \u002F\u002F next 50\nsubject.OnNext(0);   \u002F\u002F errorResume DivideByZeroException   \u003C-- NOT terminated\nsubject.OnNext(5);   \u002F\u002F next 20                             \u003C-- subscription is still alive!\nsubject.OnCompleted(); \u002F\u002F completed IsSuccess=True\n```\n\nThis is the single biggest behavioral change from Rx. To opt back into classic \"an error\nterminates the sequence\" behavior, insert `.OnErrorResumeAsFailure()` — the error then flows to\n`OnCompleted(Result.Failure(e))` and downstream `OnNext`s stop. Recover with `Catch`. Full\ncaptured runs and the (deliberately absent) `Retry` story are in\n[rx-net-differences.md](rx-net-differences.md).\n\n### Async dispatch is explicit\n\nR3's async operators (`SubscribeAwait`, `SelectAwait`, `WhereAwait`, …) take an `AwaitOperation`\nthat decides what happens when values arrive faster than the async work completes:\n\n| `AwaitOperation` | Overlap behavior | Typical use |\n|------------------|------------------|-------------|\n| `Sequential` (default) | Queue values, run one at a time | Ordered processing |\n| `Drop` | Ignore new values while one is running | Debounced submit \u002F cooldown |\n| `Switch` | Cancel the running one, start the new | Search-as-you-type, latest-wins |\n| `Parallel` | Run all concurrently | Independent fan-out |\n| `SequentialParallel` | Run concurrently, emit results in order | Parallel map, ordered output |\n| `ThrottleFirstLast` | Run first + last of a burst | Leading\u002Ftrailing sampling |\n\nThese were verified to behave exactly as described (including `Switch` cancelling the superseded\noperation's `CancellationToken`). See [async-and-integration-patterns.md](async-and-integration-patterns.md).\n\n### Task and IAsyncEnumerable bridges\n\n```csharp\n\u002F\u002F Task -> Observable\nawait Observable.FromAsync(async ct => await LoadAsync(ct)).FirstAsync();\n\n\u002F\u002F Observable -> Task (terminal operators return Task\u003CT>)\nList\u003Cint> all = await source.ToListAsync();\nint last      = await source.LastAsync();\n\n\u002F\u002F IAsyncEnumerable -> Observable, and back\nawait asyncEnumerable.ToObservable().ForEachAsync(Handle);\nawait foreach (var x in source.ToAsyncEnumerable()) { \u002F* ... *\u002F }\n```\n\nAll verified working. Details and the full terminal-operator list are in\n[async-and-integration-patterns.md](async-and-integration-patterns.md).\n\n---\n\n## How R3 Handles Concurrent Updates\n\n**R3 does not serialize concurrent producers.** Like Rx, it assumes the Rx grammar: `OnNext`\nmust not be called concurrently or re-entrantly from multiple threads. Operators (`Where`,\n`Select`, `Subject`, …) are **not internally locked**. Pushing `OnNext` from many threads at once\ninto a stateful downstream **corrupts state** — in testing, 20,000 concurrent `OnNext` calls into\na `List\u003CT>` subscriber lost ~half the items and threw inside the operator chain.\n\nThe fix is to make the boundary explicit:\n\n```csharp\n\u002F\u002F Multiple producer threads -> one serialized consumer\nsubject.Synchronize()                  \u002F\u002F lock-based gate; delivery becomes single-threaded\n       .Where(x => x.IsValid)\n       .Subscribe(Handle);             \u002F\u002F verified: 10000\u002F10000 items, no corruption\n\n\u002F\u002F Or marshal onto a context\u002Fthreadpool, which also serializes delivery:\nsource.ObserveOnThreadPool().Subscribe(Handle);\n\n\u002F\u002F For shared MVVM state written from many threads:\nvar counter = new SynchronizedReactiveProperty\u003Cint>(0);   \u002F\u002F thread-safe writes\n```\n\n**Practical rule:** if more than one thread can publish into a stream, put `Synchronize()` (or an\n`ObserveOn*`) immediately after the source, or use `SynchronizedReactiveProperty`. Full race\nreproductions and outputs are in [scheduling-and-concurrency.md](scheduling-and-concurrency.md).\n\n---\n\n## Time vs Frames: TimeProvider and FrameProvider\n\nR3 has **two** notions of \"when,\" and both are abstractions you can fake in tests:\n\n- **`TimeProvider`** (the .NET 8 BCL type) = wall-clock time. Used by `Delay`, `Debounce`,\n  `Interval`, `Timer`, `Timeout`. This is what server\u002Fbusiness code uses.\n- **`FrameProvider`** (R3-specific) = a *frame clock*. Used by `EveryUpdate`, `DelayFrame(n)`,\n  `IntervalFrame(n)`, etc.\n\n**When is a FrameProvider necessary?** Whenever \"progress\" is measured in render\u002Fupdate ticks\ninstead of elapsed time:\n- **Game engines** (Unity, Godot, Stride, MonoGame) — logic ticks with the engine's update loop,\n  so it respects pause and time-scale and stays in lockstep with rendering.\n- **UI render loops** (WPF\u002FAvalonia\u002FWinUI composition frames) — react per frame.\n- **Deterministic tests** — `FakeFrameProvider.Advance(n)` drives frames with zero real time,\n  exactly as `FakeTimeProvider.Advance(timeSpan)` drives the clock.\n\nPlain server\u002Fbusiness code virtually never needs `FrameProvider` — that's `TimeProvider`\nterritory. Both fakes make time-dependent pipelines fully deterministic; examples in\n[scheduling-and-concurrency.md](scheduling-and-concurrency.md).\n\n---\n\n## Best Practices Summary\n\n### DO\n- Treat `OnErrorResume` as the default: design streams that survive individual bad events.\n- Add `.OnErrorResumeAsFailure()` when you genuinely want an error to terminate the stream.\n- Choose an `AwaitOperation` deliberately for every async operator (`Switch` for latest-wins,\n  `Sequential` for ordering, `Drop` for cooldowns).\n- Put `Synchronize()` \u002F `ObserveOn*` after any source that multiple threads publish into.\n- Pass a `TimeProvider` to time operators and a `FrameProvider` to frame operators so tests can\n  use `FakeTimeProvider` \u002F `FakeFrameProvider`.\n- Manage lifetime: route subscriptions into a `DisposableBag`, `CompositeDisposable`, or\n  `.AddTo(cancellationToken)`; turn on `ObservableTracker` in dev to catch leaks.\n- Use `ReactiveProperty` for de-duplicated observable state; `BindableReactiveProperty` for\n  XAML-bound state.\n\n### DON'T\n- Don't assume an exception ends the stream (that's Rx, not R3).\n- Don't reach for Rx names that R3 renamed: it's `Debounce` (not `Throttle`), `ThrottleLast`\n  (not `Sample`), `Chunk` (not `Buffer`). `Retry`, `GroupBy`, `Finally`, and plain `Buffer` are\n  **absent** in 1.3.1 — see the differences file for replacements.\n- Don't call `OnNext` concurrently\u002Fre-entrantly from multiple threads without `Synchronize()`.\n- Don't use R3 for backpressured throughput pipelines — use Channels or Akka.NET Streams.\n- Don't block on terminal operators (`.Result`\u002F`.Wait()`); they return `Task\u003CT>` — `await` them.\n\n---\n\n## Additional Resources\n\n- **R3 repository:** https:\u002F\u002Fgithub.com\u002FCysharp\u002FR3\n- **Full README \u002F operator reference:** https:\u002F\u002Fgithub.com\u002FCysharp\u002FR3\u002Fblob\u002Fmain\u002FREADME.md\n- **Design rationale (neuecc):** https:\u002F\u002Fneuecc.medium.com\u002Fr3-a-new-modern-reimplementation-of-reactive-extensions-for-c-cf29abcc5826\n- **NuGet:** https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FR3\n- **`TimeProvider` (BCL):** https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fdotnet\u002Fapi\u002Fsystem.timeprovider\n- **`FakeTimeProvider`:** https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FMicrosoft.Extensions.TimeProvider.Testing\n- **Related skill:** `csharp-concurrency-patterns` (choosing R3 vs async\u002Fawait vs Channels vs Akka.NET)\n",{"name":5,"description":7,"user-invocable":20},"master","b30b1c1908dbc56a8184128f18803053d762ccb5","plugins\u002Fdeniz-dotnet-general\u002Fskills\u002Fr3-reactive-extensions",0,"https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins","https:\u002F\u002Fgithub.com\u002FBlind-Striker","denizirgin.com","VP of Engineering - \r\n@armutcom @homeruntech @prontopro\r\n |  Speaker \r\n@CodeFiction\r\n, http:\u002F\u002Fcodefiction.tech | Developer, gamer, blogger, maiden iron fan","2026-11-13 00:23:18",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill r3-reactive-extensions",{"tool":39,"command":40},"bunx","bunx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill r3-reactive-extensions",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill r3-reactive-extensions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fplugins\u002Fdeniz-dotnet-general\u002Fskills\u002Fr3-reactive-extensions\u002FSKILL.md",true,[47,53,57],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"async-and-integration-patterns.md","REFERENCE","参考文档",8550,"https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fplugins\u002Fdeniz-dotnet-general\u002Fskills\u002Fr3-reactive-extensions\u002Fasync-and-integration-patterns.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"rx-net-differences.md",12421,"https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fplugins\u002Fdeniz-dotnet-general\u002Fskills\u002Fr3-reactive-extensions\u002Frx-net-differences.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"scheduling-and-concurrency.md",7843,"https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fplugins\u002Fdeniz-dotnet-general\u002Fskills\u002Fr3-reactive-extensions\u002Fscheduling-and-concurrency.md",[62,69,76,83,90,97],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M79YGWBJ52PHMSTKJ3RJ3AWR","writing-tunit-tests","Write tests in TUnit — the attributes, the async assertion model, data-driven cases, lifecycle hooks, and the parallelism rules. USE FOR writing or fixing a test in a TUnit project, translating a test idea into TUnit syntax, or reviewing TUnit test code for API mistakes. DO NOT USE FOR deciding what to test, judging whether a test is any good, or running tests.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fwriting-tunit-tests\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79YGR3Y9RCRS6TD71D0KKP8","dotnet-walls","Walls for a .NET change in a repository without its own quality gates — pinned, ephemeral analyzer, format, clone and scanner commands for the verify step, their identity ratchet, and the build traps. Use during a walls preflight, or when a worker's verify step needs .NET quality gates.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fdotnet-walls\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79YGFNJBST7D803NQW3SBYM","csharp-15","Write, review and modernize C# 15 (.NET 11) code correctly. Covers every C# 15 feature - collection expression arguments (`[with(...), ...]`), union types (`union`, `[Union]`, `IUnion`, custom unions), closed class hierarchies (`closed`), extension indexers, labeled `break`\u002F`continue`, non-virtual static interface members on runtimes without default interface methods, and the preview memory-safety model (`unsafe(expr)`, `safe`, requires-unsafe members). Use when code targets net11.0 or LangVersion 15\u002Fpreview, when the user mentions any of these features, when replacing marker interfaces, OneOf-style results, `goto`\u002Fflag loop exits or capacity\u002Fcomparer boilerplate, or when the build reports CS8121, CS8509, CS8655, CS8510, CS0121\u002FCS0411 on a `with(...)` element, CS9370, CS9380 or CS9363.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fcsharp-15\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M79YGAV031473HSX6FN87ENH","verified-waves","Run one task as verified multi-agent waves. Plans the fan-out, sends findings to fresh skeptics, keeps a ledger, and reports N of M done; small tasks stay solo.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fverified-waves\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M79YG6QXNND4WRPP3GATSY8J","harness","The bundled dispatch harness, which runs a task file on worker models through OpenCode or Codex, fences their writes, escalates their asks to the operator, settles each result from git and its verify commands, and records every step in a ledger. Its commands, task file, modes and write fence, configuration, runs and their recovery, ledger and exit codes.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fharness\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M79YG2P5S91SDTA5912XJ4FV","delegating-to-worker-models","Use when you hand off implementation, a plan, research a decision will rely on, or a review, and you brief the worker and check what comes back. A subagent that searches, reads in parallel, or keeps your context small is ordinary tool use. Covers what stays with you, the mechanism, assigning work by strength, the walls preflight, prompts without contradictions, the worker contract and model profiles, evidence from your own run, review, and the fix-up loop.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fdelegating-to-worker-models\u002FSKILL.md",[],[]]