core/sagas

Implements typed-redux-saga watchers and workers with ownership, debounce, retry, and streaming rules.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Redux-saga code often suffers from duplicate watchers, wildcard subscriptions, misplaced selectors, and unhandled retry or stream failures. This Skill enforces a single canonical ownership model and typed-redux-saga conventions so saga side effects stay predictable, cancellable, and testable. ## Core Features & Use Cases - Watcher and worker conventions: Enforces yield* with typed-redux-saga effects, passing action creators (not .type) to takeEvery/takeLatest/takeLeading, and reading state only through named selectors imported from [slice]-selectors.ts via .effect(...). - Debounce, retry, and streaming patterns: Provides canonical recipes for trailing debounce with takeLatest + delay, leading/windowed debounce with takeLeading, branching on all retryWithTimeout outcomes, and consuming async generators with wrapStreamingGenerator. - Lifecycle and crash routing: Requires explicit store.runSaga(sagaFn) startup, attached fork instead of spawn, finally channel cleanup, and routes crash/restart questions to the core/saga-manager skill. - Use Case: When adding a search feature, you register one takeLatest watcher on searchInputChanged, delay 300ms in the worker, call the API, and put results—avoiding duplicate watchers and wildcard take('*') subscriptions that would fire on every streaming chunk action. ## Quick Start Ask the agent to write a typed-redux-saga watcher that debounces search input by 300ms and loads results through a named selector effect.

Frequently Asked Questions about core/sagas

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

FAQPage Schema
How do I debounce a redux-saga on user input?▼

Watch the real action with takeLatest and call delay(ms) inside the worker before the effect, giving trailing debounce behavior. Use takeLeading plus a trailing delay only for leading or windowed behavior; do not add new wrapper-action debounce helpers.

How do I read state inside a typed-redux-saga worker?▼

Read state through named selectors imported from the owning slice's [slice]-selectors.ts file and call them with .effect(...). Saga modules must not declare local select* functions or factories, even as module-private locals.

Should I use takeEvery or takeLatest for fetch flows?▼

Default user-triggered fetch and search flows to takeLatest so stale work is cancelled. Use takeEvery only when every action must be processed, and takeLeading when in-flight work should block newer triggers.

Why is take('*') harmful in redux-saga watchers?▼

Wildcard takes wake the saga on every dispatch, which is especially harmful during streaming flows where chunk actions fire continuously and starve intended work. Subscribe with concrete action creators, action-creator arrays, or selector-channel helpers instead.

Does store.init() automatically start my application sagas?▼

No, store.init() does not auto-start app-owned sagas. Start each app saga explicitly with store.runSaga(sagaFn), typically from onMount for component-owned lifetimes or from services and tests for imperative control.

How do I handle failures when retrying a saga with retryWithTimeout?▼

Branch on all three outcomes: success, retries-exhausted, and timeout, dispatching appropriate failure actions for the non-success cases. Keep the retried work idempotent so repeated attempts do not corrupt state.