Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Rxjs Pro

ASecurity

Program reactively with RxJS: observables, operators, subjects, higher-order mapping, and subscription management. Use for event streams, async orchestration, and complex data flows.

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentsgoreactangulardebuggingapi

Works with

cliapi

Security Analysis

A100/100

Scanned 9/29/2026

$npx -y skills add aicodedecode/awesome-muse-skills --skill rxjs-pro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rxjs Pro?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Rxjs Pro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aicodedecode-rxjs-pro/badge)](https://www.skillsdirectory.com/skills/aicodedecode-rxjs-pro)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: rxjs-pro
description: Program reactively with RxJS: observables, operators, subjects, higher-order mapping, and subscription management. Use for event streams, async orchestration, and complex data flows.
category: development
---

# RxJS Pro

A practical guide to RxJS: thinking in **observables** — streams of values over time — with the operator toolkit (map/filter/scan, flattening strategies, combination, error handling) and the subscription discipline that prevents leaks.

## Overview

RxJS models async as streams: user events, HTTP responses, timers, websockets — all observables you compose with operators instead of nesting callbacks or chaining promises imperatively. The power is in **composition and cancellation**: `switchMap` cancels stale requests automatically; `debounceTime` + `distinctUntilChanged` build search-as-you-type in three operators; `combineLatest` merges streams declaratively.

## When to use

- Search-as-you-type, autocomplete, typeahead.
- Websocket streams, live data, polling with backoff.
- Complex async orchestration (dependent requests, race conditions, cancellation).
- Angular apps (RxJS is idiomatic there: HttpClient, forms, router events).
- Event-heavy UIs: drag interactions, multi-source state.

## Core concepts

- **Observable.** Lazy push collection: `new Observable(subscriber => {...})`. Cold (each subscription re-executes, e.g., HTTP) vs hot (shared, e.g., Subjects, websocket).
- **Operators.** Pure functions composing streams: `map`, `filter`, `scan` (stateful reduce), `tap` (side effects for debugging), `take`, `first`.
- **Flattening (the big one).** `switchMap` (cancel previous — search, route params), `mergeMap` (concurrent — bulk ops), `concatMap` (sequential — ordered saves), `exhaustMap` (ignore while busy — submit buttons, login).
- **Combination.** `combineLatest` (latest from each), `withLatestFrom`, `forkJoin` (all complete → one emission), `zip`, `race`.
- **Subjects.** `Subject` (multicast), `BehaviorSubject` (current value + new subscribers get latest), `ReplaySubject` (buffer). Bridges between imperative and reactive code.
- **Error handling.** `catchError` (recover/replace), `retry`/`retryWhen` (transient failures), `finalize` (cleanup). Errors terminate streams — handle or the stream dies.
- **Subscription management.** `takeUntil(destroy$)`, `async` pipe (Angular auto-unsubscribes), `Subscription.add`. Unclosed subscriptions = leaks.

## Practical workflow

**1. Search-as-you-type (the canonical example).**
```ts
import { fromEvent, debounceTime, distinctUntilChanged, filter, switchMap, catchError, of } from 'rxjs';

fromEvent(input, 'input').pipe(
  map(e => e.target.value.trim()),
  debounceTime(300),
  distinctUntilChanged(),
  filter(q => q.length >= 2),
  switchMap(q => searchApi(q).pipe(catchError(() => of([])))), // cancel stale, survive errors
).subscribe(renderResults);
```

**2. Polling with backoff.**
```ts
timer(0, 5000).pipe(
  exhaustMap(() => fetchStatus()),   // skip tick if previous still running
  retry({ delay: (err, n) => timer(Math.min(1000 * 2 ** n, 30000)) }),
  takeUntil(stop$),
).subscribe(updateUI);
```

**3. Component lifecycle (Angular).**
```ts
private destroy$ = new Subject<void>();
ngOnInit() {
  this.route.paramMap.pipe(
    map(p => p.get('id')),
    switchMap(id => this.service.get(id)),
    takeUntil(this.destroy$),
  ).subscribe(...);
}
ngOnDestroy() { this.destroy$.next(); this.destroy$.complete(); }
```
Or just use the `async` pipe in templates — no manual subscription at all.

**4. Share expensive streams.** `source$.pipe(shareReplay({ bufferSize: 1, refCount: true }))` — one underlying subscription, late subscribers get the latest.

## Common pitfalls

- **Wrong flattening operator.** `mergeMap` for search = out-of-order results; `switchMap` for saves = lost writes. Choose deliberately: cancel/parallel/sequential/ignore.
- **Unclosed subscriptions.** Every `.subscribe` needs an end: `takeUntil`, `take(1)`, `first()`, or async pipe. Route-change leaks are the classic Angular memory bug.
- **Errors killing streams.** One unhandled error completes the whole stream silently. `catchError` at the right level (inside `switchMap`, not outside the whole pipe, usually).
- **Nested subscribes.** `obs1.subscribe(v => obs2.subscribe(...))` — callback hell with extra steps. Flatten with operators.
- **Subjects as first resort.** Reaching for Subject before trying pure operators creates imperative spaghetti. Subjects bridge; operators compose.
- **`combineLatest` needs all to emit.** It waits for every source's first emission — a never-emitting source stalls the whole combination. Seed with `startWith` or use `BehaviorSubject`.
- **Hot vs cold confusion.** Subscribing twice to a cold HTTP observable fires two requests. `shareReplay` when you want one execution, many observers.
- **Over-engineering.** Simple one-shot async doesn't need streams. Promises/async-await for single values; RxJS for streams, cancellation, and composition.

Attribution

aicodedecodeaicodedecode
View sourceSee grades on GitHubMore from aicodedecode →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →