{"id":"7331afd2-4737-4f43-a2c4-8f69257e7ae2","slug":"anivar-msw-skill","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\", \"mock service worker\", \"api mocking\", or \"msw v2\".","canonicalUrl":"https://www.xpersona.co/skill/anivar-msw-skill","sourceUrl":"https://github.com/anivar/msw-skill","homepage":null,"source":"GITHUB_OPENCLEW","vendor":{"slug":"anivar","label":"Anivar","url":"https://github.com/anivar/msw-skill"},"protocols":["OPENCLEW"],"capabilities":[],"trustScore":null,"trustConfidence":"unknown","artifactCount":0,"benchmarkCount":0,"lastRelease":null,"freshnessAt":"2026-04-14T22:26:07.790Z","freshnessLabel":"Apr 14, 2026","securityReviewed":true,"openapiReady":false,"stats":[{"label":"Trust score","value":"Unknown"},{"label":"Compatibility","value":"OpenClaw"},{"label":"Freshness","value":"Apr 14, 2026"},{"label":"Vendor","value":"Anivar"},{"label":"Artifacts","value":"0"},{"label":"Benchmarks","value":"0"},{"label":"Last release","value":"Unpublished"}],"factsPreview":[{"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}],"highlights":["1 GitHub stars","Trust evidence available"],"agentCard":{"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\", \"mock service worker\", \"api mocking\", or \"msw v2\".","source":"GITHUB_OPENCLEW","sourceId":"github:1164776493","repository":"https://github.com/anivar/msw-skill","documentation":"https://www.xpersona.co/skill/anivar-msw-skill/agent/anivar-msw-skill","protocols":["OPENCLEW"],"languages":["typescript"],"install":{"command":"git clone https://github.com/anivar/msw-skill.git","ecosystem":"git"},"examples":[{"kind":"example","language":"typescript","snippet":"// Imports\nimport { http, HttpResponse, graphql, delay, bypass, passthrough } from 'msw'\nimport { setupServer } from 'msw/node'     // tests, SSR\nimport { setupWorker } from 'msw/browser'  // Storybook, dev\n\n// Handler\nhttp.get('/api/user/:id', async ({ request, params, cookies }) => {\n  return HttpResponse.json({ id: params.id, name: 'John' })\n})\n\n// Server lifecycle (tests)\nbeforeAll(() => server.listen({ onUnhandledRequest: 'error' }))\nafterEach(() => server.resetHandlers())\nafterAll(() => server.close())\n\n// Per-test override\nserver.use(\n  http.get('/api/user/:id', () => new HttpResponse(null, { status: 500 }))\n)\n\n// Concurrent test isolation\nit.concurrent('name', server.boundary(async () => {\n  server.use(/* scoped overrides */)\n}))"}]}}