anton-abyzov/vskill-test-public-skills-826/http-api-mock-forge
Claude Code and agent skill by anton-abyzov/vskill-test-public-skills-826
- vendor
Checking that the SKILL.md file is still in the repository.
Stand up deterministic HTTP API mocks for tests and local dev using MSW, Nock, or Prism — request matching, stateful handlers, and contract fidelity.
Install
npx vskill@latest install anton-abyzov/vskill-test-public-skills-826/http-api-mock-forgeSKILL.md
The same SKILL.md was published earlier as anton-abyzov/vskill-test-public-skills-826/http-api-mock-forge.
http-api-mock-forge
Replace real upstream HTTP calls with deterministic mocks so tests are fast, offline, and repeatable — without losing contract fidelity.
Pick the right tool
| Tool | Best for | Layer it intercepts | |
|---|---|---|---|
| MSW | browser + node app code, shared handlers | fetch/XHR via service worker / node interceptor | |
| Nock | node-only, low-level HTTP assertions | node http/https module | |
| Prism | mock straight from an OpenAPI spec | standalone HTTP server | |
| WireMock | language-agnostic, JVM-friendly services | standalone HTTP server |
Rule of thumb: if you have an OpenAPI document, generate the mock from it (Prism/WireMock) so the mock can never drift from the contract. Otherwise use MSW for app-level tests.
MSW handler example
Setting onUnhandledRequest: 'error' is key: it fails the test the moment code hits an un-mocked endpoint, catching accidental real network calls.
Stateful mocks
For flows like "create then fetch", keep state inside the handler closure and reset it per test:
Fidelity checklist
- Match method + path + query + relevant headers, not just the path.
- Mirror real status codes and error bodies, including 4xx/5xx, so error
handling is actually exercised.
- Reproduce pagination, rate-limit headers, and latency where the code
depends on them (use a small delay helper for timeouts/retries).
- Keep fixtures close to real payloads; trim only irrelevant fields.
Anti-patterns
- Mocking your own code instead of the network boundary — mock at the HTTP edge.
- Over-broad matchers (
*) that hide real request bugs. - Letting mocks drift from the contract. Regenerate from OpenAPI when the spec
changes, or add a contract test that runs against the real sandbox in CI.
Agent guidance
- Default to MSW for app tests; Prism when an OpenAPI spec exists.
- Always assert on the request the code sent, not only on the response.
- Fail on unhandled requests so silent real calls cannot slip through.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files. Certified 10 Jun 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/http-api-mock-forge/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/anton-abyzov/vskill-test-public-skills-826/http-api-mock-forge)