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