CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

testland/msw-handlers

Use when JavaScript or TypeScript tests need to mock fetch or XHR calls to an HTTP API, such as replacing hand-rolled fetch mocks or testing loading and error responses, in Vitest or Jest and in Cypress or Playwright: writes Mock Service Worker handlers (`http.get`, `http.post`, `HttpResponse.json`), wires `setupServer` (Node) or `setupWorker` (browser), and manages the `listen` / `resetHandlers` / `close` lifecycle.

1.00x
Quality

92%

Does it follow best practices?

Impact

100%

1.00x

Average score across 10 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

Quality

Content

82%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A strong, highly actionable skill body: everything needed to install, author handlers, wire both environments, and manage lifecycle is present as executable code with useful anti-patterns and limitations. The main gaps are minor token inefficiency from repeated citations and explanatory asides, and a monolithic single-file layout where an API-reference file would improve progressive disclosure.

Suggestions

State the msw-getting-started citation once (e.g., in References or Overview) instead of repeating '(Per [msw-getting-started][gs])' after each code block.

Move the 'HttpResponse static helpers' and 'Pattern matching' tables plus the streaming/limitations detail into a references/ file (e.g. references/api.md) and link to it, keeping SKILL.md as a lean overview.

Promote 'onUnhandledRequest: \'error\'' and the afterEach resetHandlers requirement into an explicit numbered setup checklist with a validate step (e.g., 'run one test; if it fails with an unhandled-request error, add the missing handler') so the error-recovery loop is explicit rather than implied by tables.

DimensionReasoningScore

Conciseness

The body is dense and table-driven with little fluff, but the '(Per [msw-getting-started][gs])' citation is repeated four times and a few asides ('the worker script is what the browser registers to intercept requests', the CI comment 'Vitest / Jest pick up vitest.setup / jest.setup automatically') could be trimmed. This matches 'efficient; minor instances of over-explanation that could be trimmed' rather than the level-5 'every token earns its place'.

4 / 5

Actionability

Fully executable, copy-paste-ready guidance throughout: 'npm i msw --save-dev', 'npx msw init public/ --save', complete handlers.js / browser.js / node.js / vitest.setup.js files, a concrete per-test 'server.use(...)' 500-error test, and CI YAML. Specific examples cover the common cases (GET/POST, path params, error override, lifecycle), matching the top anchor.

5 / 5

Workflow Clarity

Clear install -> author handlers -> setup server/worker -> lifecycle -> per-test overrides -> CI sequence, with 'onUnhandledRequest: \'error\'' as an explicit strict-mode checkpoint and an anti-patterns table covering common failure recovery. It falls short of the level-5 anchor because there is no explicit validate-fix-retry loop or checklist; the checkpoint guidance is implicit in the tables rather than a step.

4 / 5

Progressive Disclosure

Good structure with clear section headers, tables, and clearly signaled one-level-deep external references (MSW docs links, cross-references to wiremock-stubs). However, ~210 lines live in a single SKILL.md with no bundle files; the HttpResponse helpers and pattern-matching API tables could be split into a reference file, so it does not fully meet the level-5 'content appropriately split' anchor.

4 / 5

Total

17

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

An excellent description: it explicitly states when to use the skill with natural, synonym-rich trigger phrases and precisely what it does using the tool's own API names, in third person with no fluff or over-claims. Every dimension sits at the top anchor, and the density is earned — each clause carries trigger or capability information rather than padding.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions with named APIs: 'writes Mock Service Worker handlers (http.get, http.post, HttpResponse.json)', 'wires setupServer (Node) or setupWorker (browser)', and 'manages the listen / resetHandlers / close lifecycle'. This matches the comprehensive-coverage anchor; it clearly exceeds level 4 ('several specific actions; minor gaps') since authoring, wiring, and lifecycle management cover the skill's full scope.

5 / 5

Completeness

It explicitly answers both questions with concrete trigger phrases: the 'when' opens the description ('Use when JavaScript or TypeScript tests need to mock fetch or XHR calls to an HTTP API... in Vitest or Jest and in Cypress or Playwright') and the 'what' follows ('writes Mock Service Worker handlers..., wires setupServer or setupWorker, and manages the listen/resetHandlers/close lifecycle'). Both are explicit and concrete, matching the top anchor; nothing is merely implied.

5 / 5

Trigger Term Quality

Natural trigger phrases users would actually say are covered with synonyms: 'mock fetch or XHR calls', 'replacing hand-rolled fetch mocks', 'testing loading and error responses', and both framework families 'Vitest or Jest' and 'Cypress or Playwright'. This matches the comprehensive-synonyms anchor (like 'PDF files, PDFs, forms, .pdf') rather than level 4's 'a few natural terms missing'.

5 / 5

Distinctiveness Conflict Risk

A clear niche (HTTP mocking in JS/TS tests via MSW) with distinct, specific triggers (fetch/XHR mocking, Vitest/Jest/Cypress/Playwright, setupServer/setupWorker, lifecycle hooks). The 'replacing hand-rolled fetch mocks' phrase even distinguishes it from ad-hoc mocking approaches, so conflict risk with generic testing or mocking skills is minimal — matching the level-5 anchor rather than level 4's 'minor overlap risk with closely related skills'.

5 / 5

Total

20

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

referenced_paths_exist

Referenced path issues: 1 missing

Warning

Total

15

/

16

Passed

Reviewed

On this page