activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
Crawler Summary
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". --- name: msw description: > 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", " Capability contract not published. No trust telemetry is available yet. 1 GitHub stars reported by the source. Last updated 4/14/2026.
Freshness
Last checked 4/14/2026
Best For
msw is best for general automation workflows where OpenClaw compatibility matters.
Not Ideal For
Contract metadata is missing or unavailable for deterministic execution.
Evidence Sources Checked
editorial-content, GITHUB OPENCLEW, runtime-metrics, public facts pack
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". --- name: msw description: > 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", "
Public facts
5
Change events
1
Artifacts
0
Freshness
Apr 14, 2026
Capability contract not published. No trust telemetry is available yet. 1 GitHub stars reported by the source. Last updated 4/14/2026.
Trust score
Unknown
Compatibility
OpenClaw
Freshness
Apr 14, 2026
Vendor
Anivar
Artifacts
0
Benchmarks
0
Last release
Unpublished
Key links, install path, and a quick operational read before the deeper crawl record.
Summary
Capability contract not published. No trust telemetry is available yet. 1 GitHub stars reported by the source. Last updated 4/14/2026.
Setup snapshot
git clone https://github.com/anivar/msw-skill.gitSetup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Everything public we have scraped or crawled about this agent, grouped by evidence type with provenance.
Vendor
Anivar
Protocol compatibility
OpenClaw
Adoption signal
1 GitHub stars
Handshake status
UNKNOWN
Crawlable docs
6 indexed pages on the official domain
Merged public release, docs, artifact, benchmark, pricing, and trust refresh events.
Extracted files, examples, snippets, parameters, dependencies, permissions, and artifact metadata.
Extracted files
0
Examples
1
Snippets
0
Languages
typescript
Parameters
typescript
// Imports
import { http, HttpResponse, graphql, delay, bypass, passthrough } from 'msw'
import { setupServer } from 'msw/node' // tests, SSR
import { setupWorker } from 'msw/browser' // Storybook, dev
// Handler
http.get('/api/user/:id', async ({ request, params, cookies }) => {
return HttpResponse.json({ id: params.id, name: 'John' })
})
// Server lifecycle (tests)
beforeAll(() => server.listen({ onUnhandledRequest: 'error' }))
afterEach(() => server.resetHandlers())
afterAll(() => server.close())
// Per-test override
server.use(
http.get('/api/user/:id', () => new HttpResponse(null, { status: 500 }))
)
// Concurrent test isolation
it.concurrent('name', server.boundary(async () => {
server.use(/* scoped overrides */)
}))Full documentation captured from public sources, including the complete README when available.
Docs source
GITHUB OPENCLEW
Editorial quality
ready
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". --- name: msw description: > 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", "
IMPORTANT: Your training data about msw may be outdated or incorrect — MSW v2 completely removed the rest namespace, res(ctx.*) response composition, and (req, res, ctx) resolver signature. 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 v1 patterns when they conflict with the retrieved reference.
MSW is for API mocking at the network level — intercepting HTTP/GraphQL requests in tests, Storybook, and local development without modifying application code.
| Need | Recommended Tool |
|------|-----------------|
| Test API integration (React, Vue, Node) | MSW |
| Storybook API mocking | MSW (browser worker) |
| Local development without backend | MSW (browser worker) |
| Unit testing pure functions | Plain test doubles |
| E2E testing real APIs | Playwright/Cypress network interception |
| Mocking module internals | vi.mock() / jest.mock() |
// Imports
import { http, HttpResponse, graphql, delay, bypass, passthrough } from 'msw'
import { setupServer } from 'msw/node' // tests, SSR
import { setupWorker } from 'msw/browser' // Storybook, dev
// Handler
http.get('/api/user/:id', async ({ request, params, cookies }) => {
return HttpResponse.json({ id: params.id, name: 'John' })
})
// Server lifecycle (tests)
beforeAll(() => server.listen({ onUnhandledRequest: 'error' }))
afterEach(() => server.resetHandlers())
afterAll(() => server.close())
// Per-test override
server.use(
http.get('/api/user/:id', () => new HttpResponse(null, { status: 500 }))
)
// Concurrent test isolation
it.concurrent('name', server.boundary(async () => {
server.use(/* scoped overrides */)
}))
| Priority | Category | Impact | Prefix | Rules |
|----------|----------|--------|--------|-------|
| 1 | Handler Design | CRITICAL | handler- | 4 |
| 2 | Setup & Lifecycle | CRITICAL | setup- | 3 |
| 3 | Request Reading | HIGH | request- | 2 |
| 4 | Response Construction | HIGH | response- | 3 |
| 5 | Test Patterns | HIGH | test- | 4 |
| 6 | GraphQL | MEDIUM | graphql- | 2 |
| 7 | Utilities | MEDIUM | util- | 2 |
| Rule | File | Summary |
|------|------|---------|
| Use http namespace | handler-use-http-namespace.md | rest is removed in v2 — use http.get(), http.post() |
| No query params in URL | handler-no-query-params.md | Query params in predicates silently match nothing |
| v2 resolver signature | handler-resolver-v2.md | Use ({ request, params, cookies }), not (req, res, ctx) |
| v2 response construction | handler-response-v2.md | Use HttpResponse.json(), not res(ctx.json()) |
| Rule | File | Summary |
|------|------|---------|
| Correct import paths | setup-import-paths.md | msw/node for server, msw/browser for worker |
| Lifecycle hooks | setup-lifecycle-hooks.md | Always use beforeAll/afterEach/afterAll pattern |
| File organization | setup-file-organization.md | Organize in src/mocks/ with handlers, node, browser files |
| Rule | File | Summary |
|------|------|---------|
| Clone in events | request-clone-events.md | Clone request before reading body in lifecycle events |
| Async body reading | request-body-async.md | Always await request.json() — body reading is async |
| Rule | File | Summary |
|------|------|---------|
| HttpResponse for cookies | response-use-httpresponse.md | Native Response drops Set-Cookie — use HttpResponse |
| Network errors | response-error-network.md | Use HttpResponse.error(), don't throw in resolvers |
| Streaming | response-streaming.md | Use ReadableStream for SSE/chunked responses |
| Rule | File | Summary |
|------|------|---------|
| Test behavior | test-behavior-not-requests.md | Assert on UI/state, not fetch call arguments |
| Per-test overrides | test-override-with-use.md | Use server.use() for error/edge case tests |
| Concurrent isolation | test-concurrent-boundary.md | Wrap concurrent tests in server.boundary() |
| Unhandled requests | test-unhandled-request.md | Set onUnhandledRequest: 'error' |
| Rule | File | Summary |
|------|------|---------|
| Response shape | graphql-response-shape.md | Return { data } / { errors } via HttpResponse.json |
| Endpoint scoping | graphql-scope-with-link.md | Use graphql.link(url) for multiple GraphQL APIs |
| Rule | File | Summary |
|------|------|---------|
| bypass vs passthrough | util-bypass-vs-passthrough.md | bypass() = new request; passthrough() = let through |
| delay behavior | util-delay-behavior.md | delay() is instant in Node.js — use explicit ms |
| Method | Use for |
|--------|---------|
| HttpResponse.json(data, init?) | JSON responses |
| HttpResponse.text(str, init?) | Plain text |
| HttpResponse.html(str, init?) | HTML content |
| HttpResponse.xml(str, init?) | XML content |
| HttpResponse.formData(fd, init?) | Form data |
| HttpResponse.arrayBuffer(buf, init?) | Binary data |
| HttpResponse.error() | Network errors |
| v1 | v2 |
|----|-----|
| import { rest } from 'msw' | import { http, HttpResponse } from 'msw' |
| rest.get(url, resolver) | http.get(url, resolver) |
| (req, res, ctx) => res(ctx.json(data)) | () => HttpResponse.json(data) |
| req.params | params from resolver info |
| req.body | await request.json() |
| req.cookies | cookies from resolver info |
| res.once(...) | http.get(url, resolver, { once: true }) |
| res.networkError() | HttpResponse.error() |
| ctx.delay(ms) | await delay(ms) |
| ctx.data({ user }) | HttpResponse.json({ data: { user } }) |
| Reference | Covers |
|-----------|--------|
| handler-api.md | http.* and graphql.* methods, URL predicates, path params |
| response-api.md | HttpResponse class, all static methods, cookie handling |
| server-api.md | setupServer/setupWorker, lifecycle events, boundary() |
| test-patterns.md | Vitest/Jest setup, overrides, concurrent isolation, cache clearing |
| migration-v1-to-v2.md | Complete v1 to v2 breaking changes and migration guide |
| anti-patterns.md | 10 common mistakes with BAD/GOOD examples |
Machine endpoints, protocol fit, contract coverage, invocation examples, and guardrails for agent-to-agent use.
Contract coverage
Status
missing
Auth
None
Streaming
No
Data region
Unspecified
Protocol support
Requires: none
Forbidden: none
Guardrails
Operational confidence: low
curl -s "https://www.xpersona.co/api/v1/agents/anivar-msw-skill/snapshot"
curl -s "https://www.xpersona.co/api/v1/agents/anivar-msw-skill/contract"
curl -s "https://www.xpersona.co/api/v1/agents/anivar-msw-skill/trust"
Trust and runtime signals, benchmark suites, failure patterns, and practical risk constraints.
Trust signals
Handshake
UNKNOWN
Confidence
unknown
Attempts 30d
unknown
Fallback rate
unknown
Runtime metrics
Observed P50
unknown
Observed P95
unknown
Rate limit
unknown
Estimated cost
unknown
Do not use if
Every public screenshot, visual asset, demo link, and owner-provided destination tied to this agent.
Neighboring agents from the same protocol and source ecosystem for comparison and shortlist building.
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
The Frontend for Agents & Generative UI. React + Angular
Contract JSON
{
"contractStatus": "missing",
"authModes": [],
"requires": [],
"forbidden": [],
"supportsMcp": false,
"supportsA2a": false,
"supportsStreaming": false,
"inputSchemaRef": null,
"outputSchemaRef": null,
"dataRegion": null,
"contractUpdatedAt": null,
"sourceUpdatedAt": null,
"freshnessSeconds": null
}Invocation Guide
{
"preferredApi": {
"snapshotUrl": "https://www.xpersona.co/api/v1/agents/anivar-msw-skill/snapshot",
"contractUrl": "https://www.xpersona.co/api/v1/agents/anivar-msw-skill/contract",
"trustUrl": "https://www.xpersona.co/api/v1/agents/anivar-msw-skill/trust"
},
"curlExamples": [
"curl -s \"https://www.xpersona.co/api/v1/agents/anivar-msw-skill/snapshot\"",
"curl -s \"https://www.xpersona.co/api/v1/agents/anivar-msw-skill/contract\"",
"curl -s \"https://www.xpersona.co/api/v1/agents/anivar-msw-skill/trust\""
],
"jsonRequestTemplate": {
"query": "summarize this repo",
"constraints": {
"maxLatencyMs": 2000,
"protocolPreference": [
"OPENCLEW"
]
}
},
"jsonResponseTemplate": {
"ok": true,
"result": {
"summary": "...",
"confidence": 0.9
},
"meta": {
"source": "GITHUB_OPENCLEW",
"generatedAt": "2026-10-09T03:09:21.778Z"
}
},
"retryPolicy": {
"maxAttempts": 3,
"backoffMs": [
500,
1500,
3500
],
"retryableConditions": [
"HTTP_429",
"HTTP_503",
"NETWORK_TIMEOUT"
]
}
}Trust JSON
{
"status": "unavailable",
"handshakeStatus": "UNKNOWN",
"verificationFreshnessHours": null,
"reputationScore": null,
"p95LatencyMs": null,
"successRate30d": null,
"fallbackRate": null,
"attempts30d": null,
"trustUpdatedAt": null,
"trustConfidence": "unknown",
"sourceUpdatedAt": null,
"freshnessSeconds": null
}Capability Matrix
{
"rows": [
{
"key": "OPENCLEW",
"type": "protocol",
"support": "unknown",
"confidenceSource": "profile",
"notes": "Listed on profile"
}
],
"flattenedTokens": "protocol:OPENCLEW|unknown|profile"
}Facts JSON
[
{
"factKey": "docs_crawl",
"category": "integration",
"label": "Crawlable docs",
"value": "6 indexed pages on the official domain",
"href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
"sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
"sourceType": "search_document",
"confidence": "medium",
"observedAt": "2026-04-15T05:03:46.393Z",
"isPublic": true
},
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Anivar",
"href": "https://github.com/anivar/msw-skill",
"sourceUrl": "https://github.com/anivar/msw-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-04-14T22:26:07.790Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/anivar-msw-skill/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/anivar-msw-skill/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-04-14T22:26:07.790Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1 GitHub stars",
"href": "https://github.com/anivar/msw-skill",
"sourceUrl": "https://github.com/anivar/msw-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-04-14T22:26:07.790Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/anivar-msw-skill/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/anivar-msw-skill/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
]Change Events JSON
[
{
"eventType": "docs_update",
"title": "Docs refreshed: Sign in to GitHub · GitHub",
"description": "Fresh crawlable documentation was indexed for the official domain.",
"href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
"sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
"sourceType": "search_document",
"confidence": "medium",
"observedAt": "2026-04-15T05:03:46.393Z",
"isPublic": true
}
]Sponsored
Ads related to msw and adjacent AI workflows.