angular-rxjs-interop
БесплатноБез исполняемых скриптовНе проверенBridge Observables and Signals using toSignal and toObservable in Angular. Use when converting between RxJS Observables and Angular Signals.
от HoangNguyen0403★ 598 звёзд на GitHubОб этом скилле
RxJS Interop
Priority: P1 (HIGH)
Principles
- Async to Sync: Use toSignal(observable$, { initialValue: defaultValue }) from @angular/core/rxjs-interop to convert Observables (HTTP, Events) to Signals for template rendering. Call in injection context (class field or constructor). toSignal auto-unsubscribes on component destroy. Provide initialValue to avoid
undefined. - Sync to Async: Use toObservable(this.query) when you need RxJS operators (debounceTime, switchMap, distinctUntilChanged) on Signal. Then wrap back with toSignal() if rendering.
- Auto-Unsubscribe:
toSignalautomatically unsubscribes. - Cleanup: Use takeUntilDestroyed() for manual subscriptions in injection contexts. For use outside, inject(DestroyRef) and call
takeUntilDestroyed(destroyRef).
Guidelines
- HTTP Requests:
- GET:
http.get<User[]>(...).pipe(catchError(() => of([])))->toSignal(..., { initialValue: [] }). Use in templates as {{ users() }}. - Consider httpResource() for simpler reactive HTTP in newer versions.
- POST/PUT: Trigger explicit subscribe() or lastValueFrom().
- Race Conditions: Handle async loading states.
toSignalrequiresinitialValueor handlesundefined.
Anti-Patterns
- No manual subscribe in templates: Use
toSignal()for Observables rendered in templates. - No BehaviorSubject for state: Replace with
signal()+toObservable()for RxJS interop. - No global takeUntil: Use
takeUntilDestroyed()scoped to injection context. Never use global Subject with takeUntil — it leaks if Subject never completed.
References
Установить angular-rxjs-interop в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл angular-rxjs-interop?
Bridge Observables and Signals using toSignal and toObservable in Angular. Use when converting between RxJS Observables and Angular Signals.
Как установить скилл angular-rxjs-interop?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл angular-rxjs-interop запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic