Skip to content

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
View on GitHub

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 -y

Installs 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

PriorityCategoryImpactPrefix
1Setup & InitializationCRITICALsetup-
2Handler ArchitectureCRITICALhandler-
3Test IntegrationHIGHtest-
4Response PatternsHIGHresponse-
5Request MatchingMEDIUM-HIGHmatch-
6GraphQL MockingMEDIUMgraphql-
7Advanced PatternsMEDIUMadvanced-
8Debugging & PerformanceLOWdebug-

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

Similar to Msw

More Testing & QA