← ClaudeAtlas

apirev-inferlisted

Infers an OpenAPI 3.0.3 spec (JSON and YAML) from a scrubbed HAR file: path templates with typed parameters (ids, UUIDs, dates, hashes, slugs), query parameters, request and response schemas merged across every sample, auth schemes and pagination, plus an inference report with sample counts and low-confidence flags. Use when the user says "generate an OpenAPI spec from this HAR", "infer the API schema", "turn this capture into a spec", "write a swagger file for this API", "what endpoints does this app call", "document the API from traffic", or after apirev-capture finishes.
vivekbhange-hub/api-reverse-skill · ★ 0 · Data & Documents · score 75
Install: claude install-skill vivekbhange-hub/api-reverse-skill
# apirev-infer: HAR to OpenAPI, with receipts The script does the counting; you do the judgment. `har2openapi.py` turns every recorded request into a deterministic spec and writes a report saying how many samples back each endpoint and which inferences are shaky. Your job is to run it, read the report, fix template mistakes with overrides, and tell the user honestly what the spec can and cannot be trusted for. ## Inputs - `api/capture.scrubbed.har` from `apirev-capture` (or another scrubbed HAR path). - Optional: an API title and version, hosts to restrict to, known path templates. - Commands below say `python3`; on Windows use `python` (or `py -3`). ## Outputs - `api/openapi.json`: OpenAPI 3.0.3, keys and paths sorted so diffs stay clean. - `api/openapi.yaml`: same spec as YAML. - `api/inference-report.md`: endpoints with sample counts and confidence, how each path parameter was detected, security schemes, pagination, low-confidence findings, rules used. ## Steps 1. **Run it.** ``` python3 "${CLAUDE_SKILL_DIR}/har2openapi.py" api/capture.scrubbed.har --out api \ --title "Acme Orders API" --yaml ``` Exit code 2 with "looks unscrubbed" means live credentials are still in the file: go back to `apirev-capture`. Do not reach for `--allow-unscrubbed` unless the user explicitly insists and understands examples may then contain secrets. 2. **Read `api/inference-report.md`, not the whole spec.** It is short by design. Check, in order: - **Endpoints