har-derived-api-client
Qué hace
Esta skill hace que tu IA observe la actividad de red de un sitio web mientras un navegador lo usa, y luego convierta ese registro en un cliente sencillo que llama directamente a los datos del sitio. Es para desarrolladores que necesitan automatizar un sitio que no tiene API pública.
Cuándo usarla
- ✓Cuando quieres un cliente para un sitio web que no tiene API pública pero carga datos en formato JSON.
- ✓Cuando tu IA está a punto de repetir muchas veces los mismos pasos del navegador y una solicitud directa sería más rápida.
- ✓Cuando quieres automatizar una función de autocompletado o de búsqueda que usa un sitio web.
Link de la skill
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/web-development/har-derived-api-client/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Crea un pequeño cliente que busque en los anuncios de este sitio directamente, para no tener que hacer clic en la página cada vez.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill graba el tráfico de red del navegador en un archivo HAR y luego extrae los endpoints que usa la página. Tu IA repite esas solicitudes con herramientas HTTP sencillas y conserva cualquier sesión de inicio de sesión que ya tengas.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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 Chromium that
browser_exec drives, 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_execnavigations 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 connectand want the API without re-renting the browser.
Prerequisites
- Playwright + a browser binary (capture step only):
pip install playwrightthenplaywright install chromium --no-shell- (If a system Playwright already has browsers under
~/.cache/ms-playwright, reuse it.)
requestsorhttpxfor the replay step (stdliburllibalso 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 connectto print the active endpoint, or readBROWSER_CDP_URL/browser.cdp_urlin config. Cloud backends expose it ascdpUrl/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 pathway | How Hermes reaches it | Capturer |
|---|---|---|
Local Chromium (default browser_exec browser) |
launched locally | har_capture.py |
| Browserbase / Browser-Use / Firecrawl (cloud) | CDP (cdpUrl) |
har_capture_cdp.py |
/browser connect <url> / BROWSER_CDP_URL |
CDP | har_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:
# 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_exec default)
har_capture_cdp.py <cdp_url> <out.har> [--goto URL] [--wait S] [--action SPEC ...]
sa
Preguntas frecuentes
¿Sirve para saltar inicios de sesión o CAPTCHA?
No. La skill indica que no evita la autenticación, no resuelve CAPTCHA ni elude la detección de bots.
¿Con qué navegadores funciona?
La skill cubre el navegador Chromium local y los backends de navegador en la nube o remotos, usando dos scripts de captura.
¿Qué necesito para ejecutar la captura?
La captura necesita Playwright, y los pasos de derivación y reproducción solo necesitan Python estándar o curl.
Detalles
Descripción original del autor
Record a site's XHR into a HAR, derive an HTTP client.
Popularidad
- Estrellas en GitHub
- 260 mil
- Posición en el ranking
- #578
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
agent-merge-conflict-arbiter
260 milResuelve un conflicto de fusión de git entre las ramas de dos agentes como tercera parte neutral, produciendo un único resultado fusionado para el repositorio.
antigravity-cli
260 milTe guía para instalar, actualizar y resolver problemas con la herramienta de línea de comandos Antigravity, incluidos sus plugins, el inicio de sesión y el entorno aislado.
blackbox
260 milPermite que tu agente entregue una tarea de programación a la herramienta de línea de comandos Blackbox AI, que ejecuta varios modelos de IA y elige el mejor resultado.
dynamic-workflow
260 milEnseña a tu agente a ejecutar grandes lotes de trabajo similar como un script guardado, de modo que solo los resultados verificados vuelvan a la conversación principal.
Skills parecidas
api-connector-builder
280 milHace que tu agente cree nuevas conexiones de API siguiendo el patrón existente. Úsalo para añadir una integración más sin inventar otra forma de hacer las cosas.
api-design
280 milAyuda a tu agente a diseñar APIs REST según las buenas prácticas. Es útil para definir cómo se comunican las APIs, cómo se muestran los errores y cómo organizar los datos.
backend-patterns
280 milAyuda a tu agente con patrones de arquitectura del lado del servidor y optimización de bases de datos. Es útil para crear o revisar código que se ejecuta en el servidor.