msw-setup

msw-setup is a skill for Claude Code, Codex from JasonBoy/msw-mcp. It costs 52 tokens per session (517 once invoked), scanned A, original, MIT.

A setup guide for MSW and its MCP client in a web project. MSW is a tool that intercepts network requests so an app can use controlled mock responses during development and testing.

In plain words
What is it for?
Use it when adding MSW to a new web app or moving an existing project to this setup, including projects built with Vite, Next.js, Rspack, Rsbuild, or Webpack.
Why use it?
It removes the manual work of adding the mock service, connecting its browser bridge, and checking that early API requests are actually intercepted.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding MSW to a new web app or moving an existing project to this setup, including projects built with Vite, Next.js, Rspack, Rsbuild, or Webpack.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jasonboy/msw-mcp/msw-setup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JasonBoy/msw-mcp --skill msw-setup
Clone the repo
git clone --depth 1 https://github.com/JasonBoy/msw-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for msw-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/jasonboy/msw-mcp/msw-setup/github.svg)](https://agentmods.dev/skills/jasonboy/msw-mcp/msw-setup)
Your own site
<a href="https://agentmods.dev/skills/jasonboy/msw-mcp/msw-setup"><img src="https://agentmods.dev/badge/skills/jasonboy/msw-mcp/msw-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for msw-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/jasonboy/msw-mcp/msw-setup"><img src="https://agentmods.dev/badge/skills/jasonboy/msw-mcp/msw-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 517 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00517
Opus 5.5 $0.00021 $0.00207
Sonnet 5.5 $0.00010 $0.00103
Haiku 4.5 $0.00005 $0.00052

Measured 1mo ago against content hash 07cfcaa16815, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

msw-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/msw-setup/SKILL.md · 29 lines

What it actually says

msw-setup

Project scaffolding for MSW + the MCP client bridge. For runtime handler changes after setup, use the msw-cli skill.

Workflow

  1. Run msw-cli setup in the project root (optional: --framework vite).
  2. Follow the printed setup guide step by step (detect bundler, install deps, create mocks/, env vars, entry point).
  3. Run msw-cli open and set the app's WebSocket URL to the URL from the output.
  4. Run msw-cli status after starting the dev server — confirm connected: true (this only proves the WebSocket bridge, not that the first browser requests were intercepted).
  5. Hard reload the app and confirm in DevTools → Network that initial API calls are mocked. This catches render-before-mock races that msw-cli status misses.
  6. Use msw-cli add (and related commands) to manage mocks at runtime.

Do not duplicate the full setup guide in chat — execute from msw-cli setup output.

Notes

  • Ask permission before npm install / npx msw init (as the guide describes).
  • The WebSocket URL env var name depends on the framework: NEXT_PUBLIC_MSW_WS_URL (Next.js), VITE_MSW_WS_URL (Vite), or MSW_WS_URL (Rspack/Rsbuild/Webpack) — must match the port from msw-cli open. (MCP_SERVER_URL is accepted as a legacy fallback.)
  • Next.js App Router: app/layout.tsx is a Server Component; the MSW bootstrap must be a 'use client' gate so the app subtree does not mount (and fetch) before initMocks() finishes. Follow the guide’s gated MswProvider pattern — do not start MSW in a parallel useEffect while rendering the full tree.
  • MCP users can still use /msw-setup in an MCP client; the same guide backs both paths.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 29 lines · 52 tokens per session scan A 07cfcaa16815

Subscribe to this mod's changes

msw-setup is a skill published in the GitHub repository JasonBoy/msw-mcp (81 stars, last pushed 4mo ago), licensed MIT. It adds 52 tokens to every session and 517 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

review-prs

Review a GitHub pull request in the googleapis/mcp-toolbox repo against the team's reviewer checklist: PR title/description conventions, linked issue, logic errors and unhandled edge cases, breaking changes, test coverage, docs updates, security (input handling), and new dependencies. Use whenever a maintainer asks…

googleapis/mcp-toolbox · 162 tokens

bad-case-to-dpo

A guide to turning failed production agent runs into training and evaluation data. It explains how to find the first mistake, create preference examples for DPO (Direct Preference Optimization), and check that a fix does not damage other tasks.

bojieli/ai-agent-book · 168 tokens

eval-dataset-design

A guide to creating reliable test sets for AI agents. Each evaluation task includes the request, the simulated user's behaviour, a reset starting state, and a success check that can be independently verified.

bojieli/ai-agent-book · 138 tokens

omh-agent-evaluation

This is a Hermes-native agent-evaluation workflow skill.

rlaope/oh-my-hermes · 71 tokens

llm-as-judge-evaluation

Evaluate LLM outputs using frontier models as judges. Use for pairwise model comparison, quality scoring with custom rubrics, and automated evaluation pipelines. Covers position bias mitigation, statistical significance, and generating preference data for DPO/RLHF.

synthetic-sciences/openscience · 56 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens