← ClaudeAtlas

zatanna-api-reverserlisted

Given a file of captured HTTP request/response traffic, reverse-engineers the undocumented API and emits a valid OpenAPI 3.0 spec. Use this skill when you have browser HAR exports, proxy captures, or any set of raw HTTP pairs and need a clean, machine-readable API contract without access to the original source code or docs.
riteshkew/yc-skills · ★ 0 · AI & Automation · score 73
Install: claude install-skill riteshkew/yc-skills
# Workflow When this skill triggers, follow these steps in order. ## Step 1 — Locate the traffic file Check whether the user has specified a traffic JSON path. - If a path is provided, confirm the file exists and is readable. - If no path is provided, ask: "Please provide the path to your captured traffic JSON. It must be an array of `{ method, url, status }` objects, with optional `requestBody` and `responseBody`. See `resources/traffic.json` for a working example." - If the user has a HAR file instead, explain that they should extract the `entries` array from HAR and map each entry to `{ method, url, requestBody, status, responseBody }` before proceeding. ## Step 2 — Describe what will be inferred Before running the engine, tell the user what the analyzer will produce: 1. **Path templating** — numeric and UUID path segments are collapsed into typed `{id}` parameters (e.g. `/users/123` → `/users/{id}`). 2. **Query parameter discovery** — all query string keys observed across all captured requests for each endpoint are collected. 3. **Request body schema** — JSON request bodies are introspected to produce an OpenAPI `requestBody` with inferred property types. 4. **Response schema per status code** — response bodies are introspected per HTTP status code to produce typed `responses`. 5. **Server URL** — extracted from the base URL of the first captured entry. ## Step 3 — Run the engine Execute the engine from the skill root: ```bash node scripts/traffic-to-openapi.mjs