AI agent skill for MSW 2.0 — 20 rules: handler design, REST/GraphQL, test patterns. Works with Claude Code, Cursor, Codex, Windsurf.
Created by Anivar Aravind
An AI agent skill for writing, reviewing, and debugging MSW (Mock Service Worker) v2 handlers, server setup, and test patterns with modern best practices.
AI agents often generate outdated MSW v1 patterns — rest.get() instead of http.get(), res(ctx.json(...)) instead of HttpResponse.json(), (req, res, ctx) instead of ({ request, params }) — and miss critical testing best practices like server.boundary() for concurrent tests, onUnhandledRequest: 'error', and proper lifecycle hook setup. These produce code that fails to compile or silently misbehaves at runtime.
20 rules with incorrect/correct code examples that teach agents MSW v2's actual API, handler design, server lifecycle, response construction, testing patterns, GraphQL usage, and v1-to-v2 migration. Each rule targets a specific mistake and shows exactly how to fix it.
npx skills add anivar/msw-skill -g
Or with full URL:
npx skills add https://github.com/anivar/msw-skill
| Priority | Category | Rules | Impact |
|---|---|---|---|
| 1 | Handler Design | 4 | CRITICAL |
| 2 | Setup & Lifecycle | 3 | CRITICAL |
| 3 | Request Reading | 2 | HIGH |
| 4 | Response Construction | 3 | HIGH |
| 5 | Test Patterns | 4 | HIGH |
| 6 | GraphQL | 2 | MEDIUM |
| 7 | Utilities | 2 | MEDIUM |
Each rule file contains:
| Reference | Covers |
|---|---|
handler-api.md | http.* and graphql.* methods, URL predicates, path params, handler options |
response-api.md | HttpResponse class, all 7 static methods, cookie handling |
server-api.md | setupServer/setupWorker, lifecycle |
Mine your Claude Code and Codex logs into a local you.md agent profile.
Local-first AI coding agent for VS Code & Cursor. Ollama, LM Studio & your inference fleet. Cursor-grade agent UX — offline, private, zero token cost.
A self-improving skill for AI coding agents (Claude Code, Cursor, AGENTS.md): recognize a hard-won golden path in a session and harvest it into a reusable skill/rule for next time.
Second brain for Forward Deployed Engineers. Engagement memory + 35 skills across 6 domains, all behind one @fde... Works with any AI coding agent.
Game-development Agent Skills for AI coding agents: install once and a master router loads the right skill for your engine and task. 66 original, version-pinned skills (plus a master router) in the portable SKILL.md format that runs across Claude Code, Cursor, Codex, Copilot, Gemini CLI and more, for Godot, Unity, Unreal, web and beyond.
Honey (I Shrunk the AI) by GreenPT: a cross-tool coding skill that cuts AI coding-agent token usage and LLM API costs — write less code, less prose, and denser agent-to-agent handoffs (−53%, lossless in benchmarks) with no loss of quality. Works with Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, Windsurf, Cline & Kiro.
Workflows from the Neura Market marketplace related to this Cursor resource