Skip to content

JPeetz/agent-skills / skills/api-backend/har-api-reverse-engineering

har-api-reverse-engineering

Verified

Use this skill when an agent needs to call a website's hidden or undocumented API: capture real browser requests into a HAR file, derive the exact request shape, build a clean replayable client, verify it outside the browser, and reuse the verified client. Activates when a backend has no documented API, or when you must reproduce the precise request (method, URL, headers, JSON body) of an action you can only perform in a browser. Authorized use only — never to bypass auth or bot detection.

FileKindSize
CHANGELOG.mdmarkdown734 B
LICENSEother1.0 KB
SKILL.mdskill md5.9 KB
evals/evals.jsonconfig2.9 KB
references/har-extraction.mdmarkdown1.5 KB

references/har-extraction.md

View on GitHub
# Reading a HAR entry to an API request

A HAR file is JSON. Each entry wraps a `request` and its `response`. To derive a
clean, replayable API call from the entry for an action:

## Locate the entry
Filter entries to the XHR/fetch resource type performing the action you recorded.
```json
{
  "log": {
    "entries": [
      {
        "request": { "method": "POST", "url": "https://...", "headers": [...], "postData": {...} },
        "response": { "status": 200, "content": {...} }
      }
    ]
  }
}
```

## Extract these fields
- **method** → `request.method`
- **url** → `request.url` (full, with query string)
- **headers** → `request.headers` — keep only `content-type`, `accept`,
  `origin`, `referer`. Drop `cookie`, `authorization`, `content-length`, and
  `sec-*` for the clean rebuild.
- **body** → `request.postData.text` (URL-encoded form, JSON, or multipart)
- **dynamic tokens** → scan url + headers + body for session/csrf/nonce/signature
  values that change per request. These get a runtime placeholder, not literal
  replay.

## Rebuild minimal
```bash
curl -i -X POST 'https://...' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  --data '{"..."}'
```
Auth is added separately from your credential source by label — never paste the
captured `Authorization`/cookie.

## Verify
Compare the standalone call's status + response JSON shape against the HAR's
`response`. Non-2xx or mismatched shape usually means an expiring token or missing
auth — inspect the HAR for the rotating value, refresh, retry.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall