一键导入
browser-msw-expert
Expert competency in systematic browser network mocking using MSW 2.x and Service Worker
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Expert competency in systematic browser network mocking using MSW 2.x and Service Worker
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Advanced technical knowledge for Service Worker runtime control and multi-tab state synchronization in the browser
Implementation competency for automatically generating Mocking GUI standard 4-Layer handlers and mock data by analyzing API specifications
Integrated expert knowledge of the Mocking GUI library architecture, engine behavior, and MSW integration
Product planning expertise for designing core features and establishing product strategy for the Mocking GUI library
Quality assurance competency for rigorously validating specification conformance and technical standard compliance of implemented features
Consulting competency for diagnosing user project environments and designing the optimal Mocking GUI adoption strategy and infrastructure configuration
基于 SOC 职业分类
| version | 1.0.0 |
| description | Expert competency in systematic browser network mocking using MSW 2.x and Service Worker |
| name | browser-msw-expert |
This is an expert competency for building a fully isolated network environment without modifying application code, by combining the browser's Service Worker standard with the MSW (Mock Service Worker) 2.x engine.
Precisely controls the Service Worker lifecycle to prevent mocking gaps.
install(skipWaiting) -> activate(clients.claim) -> fetch(intercept).Goes beyond simple JSON responses to reproduce the same network behavior as a real server.
Integrates with Mocking GUI's standard architecture (Handlers, Factories, Scenarios) to build a maintainable mocking system.
Response objects directly; adhere to harness.config.ts.mockServiceWorker.js file.npx msw init public (generates the Service Worker script)worker.start({ onUnhandledRequest: 'warn' })worker.use(...newHandlers) (required when switching scenarios)async) processing and use HttpResponse factory methods for readability.HttpResponse.error() to trigger actual browser error events.ReadableStream.