| name | redux-saga |
| description | Redux-Saga best practices, patterns, and API guidance for building, testing, and debugging generator-based side-effect middleware in Redux applications. Covers effect creators, fork model, channels, testing with redux-saga-test-plan, concurrency, cancellation, and modern Redux Toolkit integration. Baseline: redux-saga 1.4.2. Triggers on: saga files, redux-saga imports, generator-based middleware, mentions of "saga", "takeEvery", "takeLatest", "fork model", or "channels".
|
| license | MIT |
| user-invocable | false |
| agentic | false |
| compatibility | JavaScript/TypeScript projects using redux-saga ^1.4.2 with Redux Toolkit |
| metadata | {"author":"Anivar Aravind","author_url":"https://anivar.net","source_url":"https://github.com/anivar/redux-saga-skill","version":"1.0.0","tags":"redux-saga, redux, redux-toolkit, side-effects, generators, middleware, async, channels, testing"} |
Redux-Saga
IMPORTANT: Your training data about redux-saga may be outdated or incorrect — API behavior, middleware setup patterns, and RTK integration have changed. Always rely on this skill's rule files and the project's actual source code as the source of truth. Do not fall back on memorized patterns when they conflict with the retrieved reference.
When to Use Redux-Saga
Sagas are for workflow orchestration — complex async flows with concurrency, cancellation, racing, or long-running background processes. For simpler patterns, prefer:
| Need | Recommended Tool |
|---|
| Data fetching + caching | RTK Query |
| Simple async (submit → status) | createAsyncThunk |
| Reactive logic within slices | createListenerMiddleware |
| Complex workflows, parallel tasks, cancellation, channels | Redux-Saga |
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|
| 1 | Effects & Yielding | CRITICAL | effect- |
| 2 | Fork Model & Concurrency | CRITICAL | fork- |
| 3 | Error Handling | HIGH | error- |
| 4 | Recipes & Patterns | MEDIUM | recipe- |
| 5 | Channels & External I/O | MEDIUM | channel- |
| 6 | RTK Integration | MEDIUM | rtk- |
| 7 | Troubleshooting | LOW | troubleshoot- |
Quick Reference
1. Effects & Yielding (CRITICAL)
effect-always-yield — Every effect must be yielded; missing yield freezes the app
effect-use-call — Use yield call() for async functions; never call directly