derive-client

Generates standalone API clients from browser network traffic recorded in HAR files.

41.7k|2.8k|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/vercel-labs/agent-browser --skill derive-client
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: derive-client
Source: https://github.com/vercel-labs/agent-browser/tree/main/skill-data/derive-client
Command: npx skills add https://github.com/vercel-labs/agent-browser --skill derive-client

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Repeatedly driving a browser to automate the same website is slow and fragile. This Skill records a site's network traffic once, reverse-engineers its internal API from the captured requests, and generates a standalone client or CLI that calls the endpoints directly over HTTP.

Core Features & Use Cases

  • HAR-Based Recording: Captures browser traffic with embedded response bodies using agent-browser, preserving everything needed to study endpoints offline.
  • Endpoint Identification and Extraction: Uses jq queries to filter real JSON API calls from analytics noise, then extracts request shapes, response schemas, and auth material like cookies and CSRF tokens.
  • Client Generation and Verification: Produces one typed function per recorded flow with auth loaded from files or environment variables, then verifies every endpoint against the live API.
  • Use Case: You need to scrape a product catalog daily. Record one browsing session, derive the search and detail endpoints, and generate a CLI that fetches data directly without launching a browser again.

Quick Start

Record this website's network traffic with agent-browser and generate a standalone API client that calls its internal endpoints directly.

Frequently Asked Questions about derive-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reverse engineer a website's internal API?▼

Record the site's network traffic with agent-browser network har start while using the site normally, then stop the capture to a HAR file. Query the HAR with jq to find JSON API endpoints, extract request shapes and auth headers, and write a client that replays those calls directly.

How to extract API endpoints from a HAR file?▼

Use jq to filter HAR entries by JSON mimeType and list method, status, and URL for each request. Ignore analytics endpoints like /collect or /track and third-party domains; the real API is usually first-party, JSON, and correlates with your recorded actions.

Why does my derived API client return 401 or 403 errors?▼

A 401 or 403 usually means the session expired or required headers are missing. Log in again through agent-browser, re-export cookies with agent-browser cookies get --json, and verify the client sends headers like user-agent, referer, or x-csrf-token that the API expects.

Can I automate a site without keeping the browser open?▼

Yes, after one recorded session the generated client talks to the site's internal API over plain HTTP with no browser needed. Only flows with per-session CSRF tokens or signed expiring parameters may still require the browser.

What are the limitations of deriving clients from recorded traffic?▼

Internal APIs are unversioned and can change without notice, so keep the HAR to re-derive the client. HAR files also contain live credentials like cookies and tokens, so treat them as secrets and keep them out of version control.