Comprehensive MSW v2 mocking guide with 45 rules for handlers, setup, and test integration.
- CCM score
- 57 of 100
- skills.sh installs
- 917
- GitHub stars
- 228
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers API mocking for MSW v2 across setup, handler architecture, test integration, response patterns, and request matching
- Includes 8 prioritized categories, from CRITICAL setup and handler rules down to LOW debugging and performance rules
- Covers REST and GraphQL mocking, plus advanced patterns such as bypass requests, file uploads, and Vitest browser mode
- Designed for test setup, handler authoring, and debugging unmatched requests, with general testing methodology left to other skills
Install
$ npx -y skills add pproenca/dot-skills --skill msw -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
MSW Best Practices
Comprehensive API mocking guide for MSW v2 applications, designed for AI agents and LLMs. Contains 45 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Setting up MSW for testing or development
- Writing or organizing request handlers
- Configuring test environments with MSW
- Mocking REST or GraphQL APIs
- Debugging handler matching issues
- Testing error states and edge cases
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Setup & Initialization | CRITICAL | setup- |
| 2 | Handler Architecture | CRITICAL | handler- |
| 3 | Test Integration | HIGH | test- |
| 4 | Response Patterns | HIGH | response- |
| 5 | Request Matching | MEDIUM-HIGH | match- |
| 6 | GraphQL Mocking | MEDIUM | graphql- |
| 7 | Advanced Patterns | MEDIUM | advanced- |
| 8 | Debugging & Performance | LOW | debug- |
Quick Reference
1. Setup & Initialization (CRITICAL)
Details
- Repository
- github.com/pproenca/dot-skills
- Categories
- Testing & QA, Frontend & UI Code
- First seen
- Jun 3, 2026
More from pproenca/dot-skills
All 100- Clean Code876
- Terminal Ui873
- Ui Design842
- Typescript Refactor814
- React Refactor807
- Chrome Extension Ui746
- Shadcn745
- Chrome Extension739
- Shell717
- Tailwind670
- Refactor665
- Expo572
- React511
- Tailwind Responsive Ui486
- Tailwind Ui Refactor478
- Zustand468
- Debug456
- Ios Design452
- Feature Spec442
- Feature Arch437
- React Testing Library433
- Expo React Native Coder426
- Jscodeshift426
- Tdd426
Similar to Msw
More Testing & QAmocking-assistantpatricio0312rev/skills257 installsReusable MSW mocks, fixtures, and service stubs for stable API and component tests.
vitestpproenca/dot-skills8.1K installsCatalog of 44 Vitest best-practice rules covering async tests, setup, mocking, performance, and snapshots.
api-testing-patternsproffesor-for-testing/agentic-qe634 installsComprehensive API test patterns covering contract, component, and integration levels with agent-assisted validation.
api-mock-serverpatricio0312rev/skills301 installsMock API server setup covering MSW, json-server, and fixture factories for tests and local development.
Testing Anti-Patternsbobmatnyc/claude-mpm-skills390 installsAuthoritative guide for avoiding testing anti-patterns, covering mock misuse, test-only production code, and incomplete mocks.