apirev-mocklisted
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