core/channel-effects

Implements redux-saga EventChannel consumers using takeEvery and takeLatest with explicit cleanup.

6|6|Updated Jun 29, 2026
One-click install
npx skills add https://github.com/intent-hq/cloudlands-fe --skill core-channel-effects-intent-hq
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: core/channel-effects
Source: https://github.com/intent-hq/cloudlands-fe/tree/main/.agents/skills/themis/core/channel-effects
Command: npx skills add https://github.com/intent-hq/cloudlands-fe --skill core-channel-effects-intent-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires redux-saga.

What problem does it solve? Consuming app-provided EventChannels in redux-saga often leads to hand-rolled while(true) take loops that leak subscriptions when developers forget try/finally cleanup. This Skill provides correct patterns for consuming websocket, DOM, and IPC event channels with native watcher effects. ## Core Features & Use Cases - Every-event consumption: Use native takeEvery(channel, worker) to fork a new worker for each independent event. - Latest-only consumption: Use takeLatest(channel, worker) when each new event should cancel the previous worker, such as streaming progress or latest search results. - Explicit channel ownership: Wrap channel usage in try/finally and call channel.close() to prevent subscription leaks on cancellation. - Use Case: When subscribing to a websocket event stream in a saga, replace a manual take loop with takeEvery(channel, worker) and close the channel in a finally block. ## Quick Start Ask the AI to rewrite a saga that consumes an EventChannel using takeEvery or takeLatest with proper try/finally channel cleanup.

Frequently Asked Questions about core/channel-effects

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

FAQPage Schema
How do I consume a redux-saga EventChannel with takeEvery?▼

Call redux-saga's takeEvery(channel, worker) directly with the EventChannel returned by your app-provided channel factory. Wrap the usage in try/finally and call channel.close() in the finally block to release the underlying subscription.

When should I use takeLatest vs takeEvery on a channel?▼

Use takeEvery(channel, worker) when events are independent and each should spawn a concurrent worker. Use takeLatest(channel, worker) when only the latest event matters, such as streaming progress updates or latest search results, so each new event cancels the previous worker.

Why does my redux-saga channel leak subscriptions?▼

Leaks happen when hand-rolled while(true) take(channel) loops omit try/finally cleanup, so the channel is never closed on cancellation or error. Replace the loop with takeEvery(channel, worker) inside try/finally and call channel.close() explicitly.

Should I wrap a selector in an EventChannel in redux-saga?▼

No. For selector-derived state changes, use takeEveryFromSelector or takeLatestFromSelector from @augmentcode/themis/saga, which handle subscription and args-tuple keying automatically. Wrapping a selector in a generic EventChannel discards those guarantees.

Does takeEvery own the EventChannel lifecycle?▼

No. Native redux-saga watcher effects do not own app-created channel resources. You must keep ownership explicit by wrapping usage in try/finally and closing the channel yourself when the saga finishes or is cancelled.