rxjs-best-practices
Installation
SKILL.md
RxJS best practices
Use when building or reviewing reactive code with RxJS.
Mental model
- Model RxJS code as streams over time, not as callback soup with operators attached afterward.
- Keep the meaning of each observable clear: what produces it, when it emits, when it completes, and who owns its subscription lifecycle.
- Prefer readable operator chains over dense pipelines that only the author can mentally execute.
Stream design
- Define whether a stream represents events, state, async work, or derived state before composing it.
- Keep source streams narrow and composable instead of packing unrelated concerns into one shared observable.
- Name streams and intermediate values so readers can understand the flow without simulating every operator mentally.