Captcha Relay
by @0xclanky
Human-in-the-loop CAPTCHA solving with two modes: screenshot (default, zero infrastructure) and token relay (requires network access). Screenshot mode captur...
clawhub install captcha-relayπ About This Skill
name: captcha-relay description: "Human-in-the-loop CAPTCHA solving with two modes: screenshot (default, zero infrastructure) and token relay (requires network access). Screenshot mode captures the page with a grid overlay, sends it to the human, and injects clicks based on their reply. Token relay mode detects CAPTCHA type + sitekey, serves the real widget on a relay page for native solving, and injects the token via CDP." defaultMode: screenshot
CAPTCHA Relay v2
Solve CAPTCHAs by relaying them to a human. Two modes available.
Modes
Screenshot Mode (default) β No infrastructure needed
Grid overlay screenshot β send image to human via Telegram β human replies with cell numbers β inject clicks.
sharp for image processing + CDP for screenshots and click injection.node index.js # screenshot mode (default)
node index.js --mode screenshot # explicit
node index.js --screenshot # legacy alias
const { solveCaptchaScreenshot } = require('./index');
const capture = await solveCaptchaScreenshot({ cdpPort: 18800 });
// capture.imagePath β annotated screenshot to send to human
// capture.prompt β text prompt for the human
Token Relay Mode β Requires network access
Detects CAPTCHA type + sitekey β serves real widget on relay page β human solves natively β token injected via CDP.
node index.js --mode relay # with localtunnel
node index.js --mode relay --no-tunnel # with Tailscale/LAN
const { solveCaptcha } = require('./index');
const result = await solveCaptcha({ cdpPort: 18800, useTunnel: false });
// result.relayUrl β URL to send to human
// result.token β solved CAPTCHA token
When to Use Each
| Scenario | Mode |
|----------|------|
| Quick & easy, no setup | screenshot |
| Any CAPTCHA type (sliders, text, etc.) | screenshot |
| Known CAPTCHA with sitekey (reCAPTCHA, hCaptcha, Turnstile) | relay |
| Tailscale already configured | relay |
| No network access to host | screenshot |
CLI Flags
| Flag | Default | Description |
|------|---------|-------------|
| --mode screenshot\|relay | screenshot | Select solving mode |
| --screenshot | β | Alias for --mode screenshot |
| --no-inject | inject | Return token without injecting into browser |
| --no-tunnel | tunnel | Skip tunnel, use local/Tailscale IP (relay mode) |
| --timeout N | 120 | Timeout in seconds |
| --cdp-port N | 18800 | Chrome DevTools Protocol port |
Agent Workflow
Screenshot mode (simplest)
1. Call solveCaptchaScreenshot({ cdpPort })
2. Send capture.imagePath to human via message tool with capture.prompt
3. Human replies with cell numbers (e.g. "1,3,5,7")
4. Call injectGridClicks(cdpPort, capture, selectedCells) to click those cells
Relay mode
1. Call solveCaptcha({ useTunnel: false }) (Tailscale) or solveCaptcha() (tunnel)
2. Send result.relayUrl to human via message tool
3. Wait β resolves when human completes the CAPTCHA
4. Token is auto-injected; continue automation
Requirements
--remote-debugging-port=18800npm install (deps: ws, sharp)