Agent skill

Har Derived API Client

by Luciole-Studio in Luciole-Studio/Misaka-Agent

Record a site's XHR into a HAR, derive an HTTP client. An agent skill from Luciole-Studio/Misaka-Agent.

MITAuto-check passedTesting & QA

Install Har Derived API Client

skills CLI
$ npx skills add Luciole-Studio/Misaka-Agent --skill har-derived-api-client -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Luciole-Studio/Misaka-Agent har-derived-api-client --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Luciole-Studio/Misaka-Agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/misaka/core/skills/assets/optional/web-development/har-derived-api-client .claude/skills/har-derived-api-client && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
har-derived-api-client
GitHub stars
139
Used in
1 other repo
Token cost
~2.6k tokens
SKILL.md length
1,084 words
Files
4 (incl. scripts)
Skills in repo
76
Repo updated
First seen
Licence
MIT

At a glance

Record a site's XHR into a HAR, derive an HTTP client. An agent skill from Luciole-Studio/Misaka-Agent.

  • Works in 7 steps: Pick the capturer by pathway (see How to… → Find the interaction. Open the site with… → Capture the HAR via the terminal tool.… → …
  • Testing & QA work in your project
  • SKILL.md covers When to Use, Prerequisites, How to Run and Quick Reference, plus 3 more sections
  • Runs Python scripts from its folder; calls python3, pip and playwright; reaches en.wikipedia.org

What it does

Har Derived API Client is an agent skill from Luciole-Studio/Misaka-Agent. Record a site's XHR into a HAR, derive an HTTP client.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `scripts/har_capture.py`, `scripts/har_capture_cdp.py` and `scripts/har_to_client.py`).

It sits in Testing & QA. It works with Playwright. The repository describes itself as: A multi-agent research system for the humanities and social sciences. The licence is MIT.

When your agent uses it

  • Testing & QA work in your project

Example prompts

  • “/har-derived-api-client”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Pick the capturer by pathway (see How to Run table). Launched-locally → har_capture.py; reached over CDP → har_capture_cdp.py. On Hermes…
  2. Find the interaction. Open the site with browser_navigate (or --headed capture) to see which selector to type into / click, and confirm a…
  3. Capture the HAR via the terminal tool. Order --action to reach the request: fill the box, then sleep long enough for the debounced XHR…
  4. Derive with har_to_client.py --host . Read off: the method, the URL/path template (numeric/UUID segments collapse to {id}), query params…
  5. Write the client. Recreate the request exactly — same method, path, query params, body. Send the headers the site actually needs: at…
  6. Test browserless. Run the client with the terminal tool and confirm it returns the same data the browser saw. This is the payoff: no…
  7. (Optional) Wrap as a CLI — a small argparse script over the derived call, e.g. search.py "frank herbert".

What it can do on your machine

Read from SKILL.md and the folder at commit b94464a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • pip
    • playwright

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • en.wikipedia.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Har Derived API Client loads about 2.6k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 1,084 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Luciole-Studio/Misaka-Agent at commit b94464a, republished under its MIT licence (© Luciole-Studio). 1,084 words, ~2,574 tokens.

Download SKILL.mdSave it as .claude/skills/har-derived-api-client/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
har-derived-api-client
description
Record a site's XHR into a HAR, derive an HTTP client.
version
0.1.0
author
Hermes Agent
license
MIT
platforms
linux, macos, windows

HAR-Derived API Client

Drive a website once with a real browser while recording its network traffic to a HAR file, then distill that HAR into the site's private JSON API so you can call it directly with plain HTTP — far cheaper and faster than browser-controlling the page on every request. Credit: trick by Jared Longster, popularized by Dax (thdxr). This captures and replays; it does NOT bypass auth, solve CAPTCHAs, or defeat bot-detection — if the site needs a logged-in session, you carry its headers/cookies forward, you don't forge them.

The scripts are stdlib-plus-Playwright: capture needs Playwright, derivation is pure stdlib, replay needs only requests/httpx (or curl).

Covers every Hermes browser pathway: the default local browser_navigate backend, plus the cloud/remote backends (Browserbase, Browser-Use, Firecrawl) and any /browser connect CDP endpoint. There are two capture scripts — one for a browser you launch, one for a browser you attach to over CDP — because HAR recording works differently in each case (see How to Run).

When to Use

  • "Build a CLI/client for <website>" — derive its API instead of scripting clicks.
  • "This site has no public API but the page clearly fetches JSON."
  • You're about to loop browser_navigate for the same query repeatedly — stop and derive the endpoint once.
  • Reverse-engineering an autocomplete, search, feed, or checkout XHR.
  • You captured a session on a cloud backend (Browserbase / Browser-Use / Firecrawl) or via /browser connect and want the API without re-renting the browser.

Prerequisites

  • Playwright + a browser binary (capture step only):
    • pip install playwright then playwright install chromium
    • (If a system Playwright already has browsers under ~/.cache/ms-playwright, reuse it.)
  • requests or httpx for the replay step (stdlib urllib also works).
  • No API keys. Any keys/tokens the client needs are the ones the HAR captured.
  • For the CDP path (har_capture_cdp.py): a reachable CDP endpoint. On Hermes, run /browser connect to print the active endpoint, or read BROWSER_CDP_URL / browser.cdp_url in config. Cloud backends expose it as cdpUrl/connectUrl.

How to Run

Scripts under this skill's scripts/, invoked through the terminal tool. Pick the capturer by pathway — this is the part that trips people up:

Browser pathwayHow Hermes reaches itCapturer
Local browser_navigate (default, agent-browser/Playwright)launched locallyhar_capture.py
Camofox (CAMOFOX_URL set)local REST/CDPhar_capture_cdp.py if it exposes CDP, else drive it yourself
Browserbase / Browser-Use / Firecrawl (cloud)CDP (cdpUrl)har_capture_cdp.py
/browser connect <url> / BROWSER_CDP_URLCDPhar_capture_cdp.py

Rule of thumb: if Hermes launched the browser, use har_capture.py; if it connected to one over CDP, use har_capture_cdp.py. har_capture.py uses Playwright's record_har_path, which only works on a locally-owned context. har_capture_cdp.py attaches with connect_over_cdp() and assembles the HAR from page.on("request"/"response") events, because record_har_path is unavailable on a connected browser.

Then, for either path:

  • har_to_client.py — filters the HAR to XHR/fetch/JSON, groups by endpoint, and prints params, headers, bodies, and replay hints (User-Agent / cookie / auth).

Resolve paths against this skill's directory. Canonical loop:

bash
# 1a. Capture, LOCAL browser (Hermes launched it)
python3 scripts/har_capture.py "https://SITE/" out.har \
  --action "fill:input[name=search]:my query" --action "sleep:3" --wait 2

# 1b. Capture, CDP browser (cloud backend or /browser connect)
#     get the endpoint from /browser connect or BROWSER_CDP_URL
python3 scripts/har_capture_cdp.py "ws://HOST/devtools/browser/..." out.har \
  --goto "https://SITE/" --action "fill:input[name=search]:my query" \
  --action "sleep:3" --wait 2

# 2. Derive — read the endpoints out of the HAR
python3 scripts/har_to_client.py out.har --host SITE --max-body 400

# 3. Replay — write a tiny client from the printed endpoint (see Procedure)

Quick Reference

har_capture.py <url> <out.har> [--wait S] [--headed] [--action SPEC ...]
  action SPEC:  fill:SELECTOR:TEXT | press:SELECTOR:KEY | click:SELECTOR
                goto:URL | sleep:SECONDS      (run in order after page load)
  use when Hermes LAUNCHED the browser (local browser_navigate default)

har_capture_cdp.py <cdp_url> <out.har> [--goto URL] [--wait S] [--action SPEC ...]
  same action SPEC; attaches to an existing CDP browser and does NOT close it
  use for cloud backends (Browserbase/Browser-Use/Firecrawl) & /browser connect

har_to_client.py <in.har> [--host SUBSTR] [--include-static] [--max-body N]
  default: keeps only XHR/fetch/JSON; --host narrows to one domain
  prints per endpoint: query params, non-boring req headers, req body sample,
                       response status/content-type + body sample
  prints "### Replay hints": the browser User-Agent, cookie/auth presence

Procedure

  1. Pick the capturer by pathway (see How to Run table). Launched-locally → har_capture.py; reached over CDP → har_capture_cdp.py. On Hermes, /browser connect tells you the CDP endpoint when a cloud/remote backend is active.
  2. Find the interaction. Open the site with browser_navigate (or --headed capture) to see which selector to type into / click, and confirm a JSON XHR fires in devtools/network.
  3. Capture the HAR via the terminal tool. Order --action to reach the request: fill the box, then sleep long enough for the debounced XHR, and always leave --wait at the end so late responses flush. Both capturers embed response bodies, so the derived client sees real payload shapes.
  4. Derive with har_to_client.py --host <domain>. Read off: the method, the URL/path template (numeric/UUID segments collapse to {id}), query params, request-body JSON, and the ### Replay hints block.
  5. Write the client. Recreate the request exactly — same method, path, query params, body. Send the headers the site actually needs: at minimum copy the User-Agent from the replay hints. If hints report cookies or an auth/token header, resend those too.
  6. Test browserless. Run the client with the terminal tool and confirm it returns the same data the browser saw. This is the payoff: no browser in the loop.
  7. (Optional) Wrap as a CLI — a small argparse script over the derived call, e.g. search.py "frank herbert".

Worked example (Wikipedia search-title, derived + replayed live):

python
import requests
r = requests.get(
    "https://en.wikipedia.org/w/rest.php/v1/search/title",
    params={"q": "frank herbert", "limit": 5},
    headers={"accept": "application/json",
             "User-Agent": "Mozilla/5.0 ... Chrome/131 Safari/537.36"},  # from HAR
    timeout=15,
)
for p in r.json()["pages"]:
    print(p["title"], "-", p.get("description"))
Show full SKILL.md (385 more words)Show less

Pitfalls

  • Default library User-Agent gets 403. Many sites (Wikipedia, Cloudflare-fronted APIs) reject python-requests/x.y. Always send the browser UA from the replay hints. This is the #1 reason a derived client fails when the browser succeeded.
  • A failed --action aborts before the HAR flushes — you get no file. If capture errors on a selector, the run produced nothing; fix the selector (use --headed to watch) and rerun. Don't debug a missing HAR.
  • Server-rendered pages have no XHR to derive — har_to_client.py prints "No API-looking entries". The data came in the HTML; scrape it or find the interaction that does fetch JSON.
  • Debounced/typeahead XHRs need a real pause. Add --action "sleep:3" after fill; typing alone won't have fired the request when the HAR closes.
  • Auth/session endpoints need the captured Cookie/Authorization header, and those expire. The derived client is only as durable as the credential; re-capture when it 401s. HARs contain live secrets — treat out.har as sensitive and delete it after deriving.
  • record_har_content="embed" makes big HARs. Use --max-body to cap what's printed; the file itself can be large for media-heavy pages.
  • Endpoints shift. Sites change private APIs without notice. Re-run the capture→derive loop when a client breaks rather than patching URLs by hand.
  • Wrong capturer = empty/no HAR. har_capture.py on a cloud/CDP backend records nothing (it launches its own local browser instead of the one you meant). har_capture_cdp.py needs the endpoint; on Hermes get it from /browser connect or BROWSER_CDP_URL. Match the capturer to the pathway (How to Run table).
  • Headless-Chrome UA is a weak tell. Local/agent-browser capture yields a HeadlessChrome/... User-Agent; some sites sniff the "Headless" token. Cloud backends (Browserbase/Browser-Use) send a real desktop-Chrome UA, so a client derived from a cloud capture replays more reliably. If a headless-derived client 403s where the browser didn't, swap the "Headless" UA for a normal Chrome UA string before assuming the endpoint changed.
  • CDP capture doesn't close the browser. har_capture_cdp.py attaches to a browser it doesn't own and leaves it running — correct for cloud/remote sessions Hermes manages. Don't add a close; let the owning backend tear it down.

Verification

End-to-end proof against a live site with no API key:

bash
python3 scripts/har_capture.py "https://en.wikipedia.org/wiki/Main_Page" /tmp/wiki.har \
  --action "fill:input[name=search]:dune messiah" --action "sleep:3" --wait 2
python3 scripts/har_to_client.py /tmp/wiki.har --host wikipedia.org --max-body 200

Expect the derivation to print GET https://en.wikipedia.org/w/rest.php/v1/search/title with q and limit params and a JSON pages response — then replay it with the Procedure snippet and confirm matching titles come back over plain HTTP.

© Luciole-Studio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts) in misaka/core/skills/assets/optional/web-development/har-derived-api-client of Luciole-Studio/Misaka-Agent.

  • SKILL.md
  • scripts/har_capture.py
  • scripts/har_capture_cdp.py
  • scripts/har_to_client.py

Open the folder on GitHubat commit b94464a

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in Luciole-Studio/Misaka-Agent, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Har Derived API Client next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Har Derived API Client compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Har Derived API Client this skillLuciole-Studio/Misaka-Agent1391 repos~2.6kAutomated safety check: PassMIT
Web Application Testinganthropics/skills180k51 repos~966Automated safety check: PassApache-2.0
Playwright CLIsanity-io/sanity6.4k18 repos~1.9kAutomated safety check: PassMIT
playwright-cli Browser Automationgithub/gh-aw5.4k24 repos~2.8kAutomated safety check: PassMIT
Write and Verify Playwright Testsappsmithorg/appsmith41k—~2.9kAutomated safety check: NotesApache-2.0
Cucumber and Playwright E2E Testslanggenius/dify158k—~682Automated safety check: PassCustom licence

Similar skills

  • Web Application Testing

    anthropics/skills

    Official

    Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.

    180k GitHub starsUsed in 51 repos~966 tokens
    Testing & QAAuto-check passed
  • Playwright CLI

    sanity-io/sanity

    Official

    Automates browser interactions for web testing, form filling, screenshots, and data extraction.

    6.4k GitHub starsUsed in 18 repos~1.9k tokens
    Testing & QAAuto-check passed
  • Official

    Drives a real browser from the command line with playwright-cli to open pages, interact, mock requests, save state and work with Playwright tests.

    5.4k GitHub starsUsed in 24 repos~2.8k tokens
    Testing & QAAuto-check passed
  • Writes a Playwright end-to-end test from a prompt, runs it against a live Appsmith deployment and retries with fixes up to three times until it passes.

    41k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check: notes
  • Guides changes and reviews of the Cucumber and Playwright end-to-end suite under `e2e/`: feature files, step definitions, support code, tags, locators and assertions.

    158k GitHub stars~682 tokensUpdated today
    Testing & QAAuto-check passed
  • E2E Testing

    langflow-ai/langflow

    Write and review Playwright E2E tests for Langflow. An agent skill from langflow-ai/langflow.

    156k GitHub stars~3.3k tokensUpdated today
    Testing & QAAuto-check passed

More from Luciole-Studio/Misaka-Agent

All 76 skills in this repo
  • Kanban Video Orchestrator

    Luciole-Studio/Misaka-Agent

    Plan and run multi-agent video production pipelines. An agent skill from Luciole-Studio/Misaka-Agent.

    139 GitHub starsUsed in 2 repos~2.4k tokens
    Auto-check: notes
  • Ast Grep

    Luciole-Studio/Misaka-Agent

    AST-aware structural code search and rewrite via ast-grep. An agent skill from Luciole-Studio/Misaka-Agent.

    139 GitHub starsUsed in 1 repo~3.2k tokens
    Auto-check passed
  • Drug Discovery

    Luciole-Studio/Misaka-Agent

    Drug discovery: ChEMBL search, drug-likeness, interactions. An agent skill from Luciole-Studio/Misaka-Agent.

    139 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Fitness Nutrition

    Luciole-Studio/Misaka-Agent

    Workout planning, macros, and body metrics via wger/USDA. An agent skill from Luciole-Studio/Misaka-Agent.

    139 GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Hyperframes

    Luciole-Studio/Misaka-Agent

    Render MP4/WebM videos from HTML compositions. An agent skill from Luciole-Studio/Misaka-Agent.

    139 GitHub starsUsed in 1 repo~3.9k tokens
    Auto-check passed
  • Osint Investigation

    Luciole-Studio/Misaka-Agent

    Follow the money via public records and sanctions data. An agent skill from Luciole-Studio/Misaka-Agent.

    139 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed

Works with

Categories

Questions about Har Derived API Client

What does Har Derived API Client do?

Record a site's XHR into a HAR, derive an HTTP client. An agent skill from Luciole-Studio/Misaka-Agent. Har Derived API Client is an agent skill from Luciole-Studio/Misaka-Agent. Record a site's XHR into a HAR, derive an HTTP client.

When should I use Har Derived API Client?

Har Derived API Client fits situations like: testing & QA work in your project.

How do I install Har Derived API Client in Claude Code?

Run `npx skills add Luciole-Studio/Misaka-Agent --skill har-derived-api-client -a claude-code`. Or copy the skill folder (misaka/core/skills/assets/optional/web-development/har-derived-api-client in Luciole-Studio/Misaka-Agent) into .claude/skills/har-derived-api-client in your project. Claude Code loads it when a task matches its description.

How do I install Har Derived API Client in Codex?

Run `npx skills add Luciole-Studio/Misaka-Agent --skill har-derived-api-client -a codex`. Or copy the skill folder (misaka/core/skills/assets/optional/web-development/har-derived-api-client in Luciole-Studio/Misaka-Agent) into .agents/skills/har-derived-api-client in your project. Codex loads it when a task matches its description.

Can I use Har Derived API Client in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Luciole-Studio/Misaka-Agent --skill har-derived-api-client -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/har-derived-api-client, .gemini/skills/har-derived-api-client, .github/skills/har-derived-api-client and .opencode/skills/har-derived-api-client in your project.

What does Har Derived API Client need to run?

Going by SKILL.md and its folder, Har Derived API Client needs Python for the scripts in its folder and the command-line tools its instructions call (python3, pip and playwright). Our summary lists: Python 3.

Does Har Derived API Client access the network?

SKILL.md names 1 domain. In commands or code: en.wikipedia.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Har Derived API Client safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Har Derived API Client use?

Har Derived API Client is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Har Derived API Client use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Har Derived API Client?

Skills that share tags, products or a category with Har Derived API Client: Web Application Testing (anthropics/skills, 180k stars), Playwright CLI (sanity-io/sanity, 6.4k stars), playwright-cli Browser Automation (github/gh-aw, 5.4k stars) and Write and Verify Playwright Tests (appsmithorg/appsmith, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Har Derived API Client?

Luciole-Studio (a GitHub organization) maintains it in Luciole-Studio/Misaka-Agent, which has 139 GitHub stars. The repository holds 76 skills in this directory. The repository was last updated on October 8, 2026.

Source: Luciole-Studio/Misaka-Agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.