An open API service indexing awesome lists of open source software.

https://github.com/gusruben/claude-browser-traffic


https://github.com/gusruben/claude-browser-traffic

Last synced: 11 days ago
JSON representation

Awesome Lists containing this project

README

          

# claude-browser-traffic

Claude Code skill for scraping websites and reverse engineering APIs by capturing browser traffic with mitmproxy.

## Setup

Clone into your Claude skills directory:

```bash
git clone https://github.com/gusruben/claude-browser-traffic "$HOME/.claude/skills/claude-browser-traffic"
```

(`$HOME` works in bash, zsh, and PowerShell. On `cmd.exe`, use `%USERPROFILE%` instead.)

Add to `~/.claude/settings.json`:
```json
{
"permissions": {
"allow": [
"Read(~/.claude/skills/claude-browser-traffic/captures/**)",
"Bash(~/.claude/skills/claude-browser-traffic/bcap:*)"
],
"additionalDirectories": ["~/.claude/skills/claude-browser-traffic"]
}
}
```

### Install mitmproxy

See the [mitmproxy installation guide](https://docs.mitmproxy.org/stable/overview/installation/).

### Install DuckDB

Install the `duckdb` CLI from the [DuckDB installation guide](https://duckdb.org/docs/installation/) and make sure it's on your `PATH`.

### Install a proxy switcher

Pick a proxy extension for your browser, these extensions let you enable a proxy for a specific tab:

- **Chrome / Edge / Brave / other Chromium**: [TabProxy](https://chromewebstore.google.com/detail/tabproxy-%E2%80%94-per-site-per-t/lgkgojfkajhkhohpgnpmmkodmbdkaiea)
- **Firefox**: [FoxyProxy Standard](https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/)

Add a proxy entry: HTTP, host `127.0.0.1`, port `9090`, name it `mitmproxy`.

### Trust the mitmproxy CA cert

1. Run `mitmdump -p 9090` in a terminal
2. Switch your browser to the `mitmproxy` proxy and open — mitmproxy serves the cert plus per-OS install instructions (Linux, macOS, Windows, iOS, Android)
3. Follow the instructions for your OS + browser, then stop `mitmdump`

## Usage

Tell Claude to "capture browser traffic" or "reverse engineer API", or run `/claude-browser-traffic`.

Claude will start mitmproxy, you can flip the proxy browser extension to `mitmproxy` and browse, then come back when done. After capture, say "save a spec" and Claude will attempt to generate an API spec for any requests you want.