← ClaudeAtlas

apirev-mocklisted

Runs a local mock server that replays recorded responses from a scrubbed HAR, or example responses from the spec, matched by path template, with optional latency and seeded random errors. Unknown routes return 404 JSON listing every known route. Use when the user says "mock this API", "I need a fake backend", "run a local mock server", "let the frontend work without the backend", "simulate a slow or flaky API", "replay the captured responses", or "test my client offline".
vivekbhange-hub/api-reverse-skill · ★ 0 · API & Backend · score 75
Install: claude install-skill vivekbhange-hub/api-reverse-skill
# apirev-mock: the backend, recorded Frontend and QA work stalls when the backend is down, slow to set up, or shared. This skill serves what the real API actually returned, from the scrubbed capture, on localhost. It is a replay, not a simulation: no state, no invented data. ## Inputs - `api/capture.scrubbed.har` (recorded responses) and/or `api/openapi.json` (route templates and fallback examples). Using both gives the best matching. - Optional: port, latency, error rate, seed. - Commands below say `python3`; on Windows use `python` (or `py -3`). ## Outputs - A running server on `http://127.0.0.1:<port>`. - Optionally `api/mock/` with copies of the HAR/spec used, when the user wants the mock setup committed for teammates (copy the scrubbed HAR there; never a raw one). ## Steps 1. **Check the route table first.** ``` python3 "${CLAUDE_SKILL_DIR}/mock_server.py" --har api/capture.scrubbed.har \ --spec api/openapi.json --list ``` Each line shows a route, how many recordings back it, and whether answers come from the HAR or spec examples. Routes with source `none` will answer 501; tell the user which ones. 2. **Start it in the background** so the conversation can continue: ``` python3 "${CLAUDE_SKILL_DIR}/mock_server.py" --har api/capture.scrubbed.har \ --spec api/openapi.json --port 8080 ``` Use the Bash tool's background mode. Confirm it answers: `curl -s http://127.0.0.1:8080/v1/pets?page=1&limit=3 | head -c 300`. 3. **Poin