redux-saga
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".
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anivar/redux-saga-skillWhat This Skill Does
The redux-saga skill for OpenClaw provides advanced, context-aware assistance for managing complex side effects in Redux applications. It acts as an expert advisor for the redux-saga library (v1.4.2), helping developers implement generator-based middleware, manage concurrent task execution, and handle complex asynchronous workflows. The skill enforces critical design patterns like effect yielding, proper fork-model management, and robust error handling to ensure your Redux sagas remain maintainable, testable, and stable.
Installation
To integrate this skill into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/anivar/redux-saga-skill
Use Cases
You should leverage this skill when your application requires advanced orchestration that goes beyond simple data fetching. Ideal use cases include:
- Long-running background tasks: Managing processes that need to run concurrently with user interactions.
- Complex Asynchronous Flows: Orchestrating sequences where cancellation, racing, or multi-step dependency management is required.
- Channel-based Communication: Building event-driven architectures that bridge external I/O (like WebSockets or DOM events) with the Redux store.
- Application Resilience: Implementing retry logic, exponential backoff, and sophisticated error boundaries for critical services.
Example Prompts
- "How do I refactor my authentication flow to use a non-blocking
forkpattern that remains responsive to logout actions?" - "Review this saga implementation: I'm getting a freezing issue. Am I correctly yielding all effects and handling the
takeLatestconcurrency pattern?" - "Can you help me write a test for this saga using
redux-saga-test-planto verify the order of dispatched actions after a successful race?"
Tips & Limitations
- Rule of Thumb: Always prioritize
yieldfor every effect. Missing yields are the #1 cause of silent saga failures. - Modernization: While this skill supports
redux-saga, always check if your use case might be better served by RTK Query orcreateListenerMiddleware. The skill is designed to help you decide when Sagas are the right tool. - Testing: Always use
redux-saga-test-planfor mocking complex scenarios. Avoid relying on manual generator iteration tests if possible. - Error Handling: Remember that
forkerrors bubble up; usespawnwhen you require error isolation in your root saga.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anivar-redux-saga-skill": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: code-execution
Related Skills
zod-testing
Testing patterns for Zod schemas using Jest and Vitest. Covers schema correctness testing, mock data generation, error assertion patterns, integration testing with API handlers and forms, snapshot testing with z.toJSONSchema(), and property-based testing. Baseline: zod ^4.0.0. Triggers on: test files for Zod schemas, zod-schema-faker imports, mentions of "test schema", "schema test", "zod mock", "zod test", or schema testing patterns.
jest
Jest best practices, patterns, and API guidance for JavaScript/TypeScript testing. Covers mock design, async testing, matchers, timer mocks, snapshots, module mocking, configuration, and CI optimization. Baseline: jest ^29.0.0 / ^30.0.0. Triggers on: jest imports, describe, it, test, expect, jest.fn, jest.mock, jest.spyOn, mentions of "jest", "unit test", "test suite", or "mock".
redux-saga-testing
Write tests for Redux Sagas using redux-saga-test-plan, runSaga, and manual generator testing. Covers expectSaga (integration), testSaga (unit), providers, partial matchers, reducer integration, error simulation, and cancellation testing. Works with Jest and Vitest. Triggers on: test files for sagas, redux-saga-test-plan imports, mentions of "test saga", "saga test", "expectSaga", "testSaga", or "redux-saga-test-plan".
zod
Zod v4 best practices, patterns, and API guidance for schema validation, parsing, error handling, and type inference in TypeScript applications. Covers safeParse, object composition, refinements, transforms, codecs, branded types, and v3→v4 migration. Baseline: zod ^4.0.0. Triggers on: zod imports, z.object, z.string, z.infer, safeParse, mentions of "zod", "schema validation", "zod v4", or "z.enum".
msw
MSW (Mock Service Worker) v2 best practices, patterns, and API guidance for API mocking in JavaScript/TypeScript tests and development. Covers handler design, server setup, response construction, testing patterns, GraphQL, and v1-to-v2 migration. Baseline: msw ^2.0.0. Triggers on: msw imports, http.get, http.post, HttpResponse, setupServer, setupWorker, graphql.query, mentions of "msw", "mock service worker", "api mocking", or "msw v2".