A comprehensive guide and rule set for implementing Mock Service Worker v2 best practices in JavaScript and TypeScript projects.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install msw-skill
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install msw-skill using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
MSW (Mock Service Worker) is a premier tool for API mocking at the network level, allowing you to intercept HTTP and GraphQL requests without modifying application code. This skill focuses exclusively on MSW v2, which brings modern standards to API mocking by removing outdated namespaces and introducing the HttpResponse class. By leveraging Openclaw Skills, developers can stay updated with the latest v2 patterns, ensuring reliable and maintainable test suites for React, Vue, and Node.js applications while avoiding common pitfalls from deprecated v1 signatures.
Ensure your project is using MSW version 2.0.0 or higher. Install the package via your preferred package manager:
npm install msw@latest --save-dev
Organize your mocking logic within a src/mocks/ directory, separating your request handlers, browser worker configuration, and Node.js server setup for clean architectural boundaries.
| Feature | Implementation Details |
|---|---|
| Namespace | Use http for REST and graphql for GraphQL queries; the rest namespace is removed. |
| Response | Use HttpResponse.json(), HttpResponse.text(), or HttpResponse.error() for all responses. |
| Lifecycle | Managed via server.listen(), server.resetHandlers(), and server.close() for test environments. |
| Resolvers | Signatures now use ({ request, params, cookies }) for modern property access. |
server.boundary() method for parallel execution.Set-Cookie headers via the HttpResponse class.bypass() for new requests and passthrough() for actual network access.graphql.link(url) utility for complex microservices.Loading
A comprehensive guide and rule set for mastering Jest 29+ testing best practices in JavaScript and TypeScript projects.

A comprehensive framework for creating enterprise-grade technical documentation using Diataxis and industry-standard style guides.

A CLI-based tool for scraping real-time X (Twitter) trending topics globally without requiring user authentication.

A CLI-based scraper that retrieves real-time X (Twitter) trending topics and tweet volumes across multiple countries without requiring an API key or account.

A professional-grade skill for AI agents to build, debug, and optimize complex asynchronous workflows using Redux-Saga generator-based middleware.

A specialized skill for writing robust Redux-Saga tests using modern patterns like expectSaga and redux-saga-test-plan.








































