core/redux-saga

Reference redux-saga API semantics for effects, watchers, channels, cancellation, and testing.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Redux-saga has a large API surface—middleware setup, blocking versus non-blocking effects, watcher helpers, channels, buffers, and cancellation semantics—and misusing any of them causes subtle concurrency bugs. This Skill gives an AI agent the correct API behavior and repository-specific conventions before it writes or edits saga code. ## Core Features & Use Cases - API Reference Coverage: Documents middleware startup, take/put/call/fork/select effects, watcher helpers, channels, buffers, race/all combinators, runSaga, and testing utilities with TypeScript examples. - Repository Compliance Rules: Enforces themis conventions such as attached fork over detached spawn, takeLatest/takeLeading plus delay for debounce, and watcher ownership verification. - Use Case: When asked to add a saga that debounces search input, the agent writes a takeLatest watcher with an explicit delay in the worker instead of introducing a wrapper debounce utility, and avoids detached spawn so cancellation propagates correctly. ## Quick Start Ask the agent to write a redux-saga watcher that loads a user on USER_REQUESTED and cancels stale searches, following this skill's effect and cancellation conventions.

Frequently Asked Questions about core/redux-saga

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

FAQPage Schema
How do I set up redux-saga middleware and run a root saga?▼

Create middleware with createSagaMiddleware(options), mount it via applyMiddleware when creating the Redux store, then call sagaMiddleware.run(rootSaga). The run call is only valid after the middleware is connected to the store.

What is the difference between takeEvery, takeLatest, and takeLeading?▼

takeEvery forks a concurrent worker for every matching action, takeLatest cancels any stale running worker when a new action arrives, and takeLeading ignores new actions while a worker is running. All three also accept a Channel instead of a pattern.

Should I use fork or spawn in redux-saga?▼

Use fork for attached tasks: parent completion waits for children, child errors bubble up, and cancellation propagates downward. spawn creates detached tasks without that lifecycle linkage, and this repository explicitly forbids introducing detached spawn.

How do I implement debounce in redux-saga?▼

Although redux-saga ships a native debounce helper, this repository requires explicit debounce: watch the action with takeLatest or takeLeading and place a delay inside the worker so cancellation semantics stay visible. Do not add action-wrapper debounce utilities.

Why does my saga terminate when a channel closes?▼

take(pattern) and take(channel) auto-terminate when they receive the END sentinel from a closed channel. Use takeMaybe instead when the saga must receive the END object and handle the closed-input case itself.

How do I test redux-saga generators?▼

Use cloneableGenerator from @redux-saga/testing-utils for branch testing without replaying setup yields, and createMockTask for fork, join, and cancel flows. Prefer effect-level assertions for small generators and integration tests for cancellation and channel cleanup.