msw-skill — Cursor Agents | Neura Market
    Neura MarketNeura Market/Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsBlogVideosGuidesCoursesCommunityExtensionsTrendingGenerate
    CursorAgentsmsw-skill
    Back to Agents
    msw-skill

    msw-skill

    anivar February 23, 2026
    1 copies 0 downloads

    AI agent skill for MSW 2.0 — 20 rules: handler design, REST/GraphQL, test patterns. Works with Claude Code, Cursor, Codex, Windsurf.

    Agent Definition
    # MSW Skill
    
    Created by **[Anivar Aravind](https://anivar.net)**
    
    An AI agent skill for writing, reviewing, and debugging MSW (Mock Service Worker) v2 handlers, server setup, and test patterns with modern best practices.
    
    ## The Problem
    
    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.
    
    ## This Solution
    
    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.
    
    ## Install
    
    ```bash
    npx skills add anivar/msw-skill -g
    ```
    
    Or with full URL:
    
    ```bash
    npx skills add https://github.com/anivar/msw-skill
    ```
    
    ## Baseline
    
    - msw ^2.0.0
    - TypeScript/JavaScript
    
    ## What's Inside
    
    ### 20 Rules Across 7 Categories
    
    | 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:
    - Why it matters
    - Incorrect code with explanation
    - Correct code with explanation
    - Decision tables and additional context
    
    ### 6 Deep-Dive References
    
    | 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

    Tags

    agent-rulesagent-skillagenticai-agentapi-mockingclaudecoding-agentcopilotcursor-rulesgemini

    Comments

    More Agents

    View all
    documentation

    Documentation & Onboarding Agent

    Agent that generates comprehensive documentation, API references, architecture diagrams, and developer onboarding guides from existing code.

    C
    Community
    debugging

    Cursor Bug Triage Agent

    Agent configuration for systematic bug investigation that traces issues from error logs through the codebase to root cause with suggested fixes.

    C
    Community
    api

    API Integration Agent

    Agent for integrating third-party APIs including SDK setup, type generation, error handling, retry logic, and rate limit management.

    C
    Community
    coding

    Cursor Agent Mode

    Cursor's built-in autonomous coding agent that can make multi-file edits, run terminal commands, search the codebase, and iteratively build features with minimal human intervention.

    C
    Cursor Team
    cloud

    Cursor Background Agent

    Cloud-based autonomous coding agent that runs in the background on remote sandboxed environments, handling complex multi-step tasks while you continue working.

    C
    Cursor Team
    composer

    Cursor Composer Agent

    Cursor's multi-file editing agent within Composer mode that can create, edit, and delete files across your entire project in a single conversation.

    C
    Cursor Team

    Stay up to date

    Get the latest Cursor prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.