Yrzhe avatar

browser-use-cloud

Browser Use Cloud — 云端反检测浏览器,支持 Agent 模式(LLM 自动执行)和 Browser 模式(Playwright 直连,无 LLM 费用)。用于需要反检测、代理 IP、录屏截图、验证码绕过的自动化场景。

version
1.0.0
GitHub stars
65

Install

/plugin install browser-use-cloud@yrzhe-skills

Run it inside Claude Code after adding the marketplace with /plugin marketplace add Yrzhe/claude-skills.

Contents

Discovered from source

Skills 1

Browser Use Cloud

Anti-detect cloud browser platform. Provides AI agents with a controllable cloud Chrome instance featuring stealth fingerprinting, proxy rotation, and video recording.

API Key — Auto-Registration (No Hardcoded Keys)

This skill does not store API keys. Instead, it auto-registers a fresh free account each time credits run out.

How It Works

Browser Use allows AI agents to self-register via a challenge-response flow:

  1. POST /cloud/signup — request a math challenge
  2. Solve the obfuscated math problem using LLM reasoning (answer as "xxx.xx")
  3. POST /cloud/signup/verify — submit answer, receive api_key

Each free account gets ~$0.10 in credits (~100 Browser-mode sessions).

Registration Flow

# Step 1: Request challenge
curl -s -X POST https://api.browser-use.com/cloud/signup \
  -H "Content-Type: application/json" \
  -d '{"name": "auto-agent"}'

# Returns: {"challenge_id": "xxx", "challenge_text": "...obfuscated math..."}
# The challenge contains symbol noise and CJK numerals (e.g. 삼=3, 오=5, 십=10, 구=9)

# Step 2: Solve with LLM — answer as string with 2 decimal places, e.g. "144.00"

# Step 3: Verify and get key
curl -s -X POST https://api.browser-use.com/cloud/signup/verify \
  -H "Content-Type: application/json" \
  -d '{"challenge_id": "xxx", "answer": "144.00"}'

# Returns: {"api_key": "bu_xxx"}

When to Re-Register

When you see 402: You need at least $0.10 in credits, the current key is exhausted. Run the registration flow above to get a fresh key.

Cost-Saving Rules

  1. Always use Browser mode (Playwright direct) — ~$0.001/session, no LLM cost
  2. Avoid Agent mode — burns $0.05-0.10 per call (LLM inference)
  3. Always stop sessions — await client.browsers.stop(browser.id)
  4. One free key lasts ~100 Browser-mode sessions

Two Modes

1. Browser Mode — Playwright Direct Control (Recommended, Cheapest)

You control the browser directly via Playwright/CDP. No LLM involved, no LLM cost.

import asyncio, os
from browser_use_sdk.v3 import AsyncBrowserUse
from playwright.async_api import async_playwright

os.environ["BROWSER_USE_API_KEY"] = "YOUR_API_KEY"  # from auto-registration

async def main():
    client = AsyncBrowserUse()

    # Create cloud browser
    browser = await client.browsers.create(
        proxy_country_code="us",    # 195+ countries available
        enable_recording=True,      # MP4 video recording
        timeout=60,                 # minutes, max 240
    )
    print(f"Live view: {browser.live_url}")

    # Control with Playwright (zero LLM cost)
    async with async_playwright() as p:
        pw = await p.chromium.connect_over_cdp(browser.cdp_url)
        page = pw.contexts[0].pages[0]
        await page.goto("https://example.com")
        await page.screenshot(path="screenshot.png", full_page=True)
        title = await page.title()
        content = await page.evaluate("document.body.innerText")
        print(f"Title: {title}")
        await pw.close()

    # Stop and get recording
    stopped = await client.browsers.stop(browser.id)
    print(f"Recording: {stopped.recording_url}")  # MP4 URL, valid 1 hour
    print(f"Cost: ${stopped.browser_cost}")        # ~$0.001

asyncio.run(main())

2. Minimal Playwright via WebSocket (One-Liner)

from playwright.async_api import async_playwright

WSS = "wss://connect.browser-use.com?apiKey=YOUR_API_KEY&proxyCountryCode=us"

async with async_playwright() as p:
    browser = await p.chromium.connect_over_cdp(WSS)
    page = browser.contexts[0].pages[0]
    await page.goto("https://example.com")
    await page.screenshot(path="shot.png")
    await browser.close()

3. Agent Mode — LLM-Powered Automation (Expensive, Use Sparingly)

The cloud LLM navigates autonomously. Useful for complex tasks but burns credits fast.

os.environ["BROWSER_USE_API_KEY"] = "YOUR_API_KEY"

async def main():
    client = AsyncBrowserUse()
    result = await client.run(
        "Go to https://example.com and extract the main heading",
        model="gemini-3-flash",       # cheapest: $0.60/$3.60 per 1M tokens
        # model="claude-sonnet-4.6",  # recommended: $3.60/$18.00 per 1M tokens
        enable_recording=True,
    )
    print(result.output)
    print(f"Cost: ${result.session.total_cost_usd}")  # ~$0.03-0.10 per call

asyncio.run(main())

Core Features

Screenshots

# Browser mode — Playwright screenshots (recommended)
await page.screenshot(path="full.png", full_page=True)

# Agent mode — auto-generated screenshot URL
print(result.session.screenshot_url)

Video Recording (MP4)

# Enable when creating browser
browser = await client.browsers.create(enable_recording=True)

# After stopping, get MP4 download URL (valid 1 hour)
stopped = await client.browsers.stop(browser.id)
print(stopped.recording_url)  # https://...s3...recording.mp4?...

# Download recording
import urllib.request
urllib.request.urlretrieve(stopped.recording_url, "recording.mp4")

Use cases: product demos, tutorial recordings, bug reproduction videos.

Persistent Login (Profiles)

# Create profile — saves cookies/localStorage
profile = await client.profiles.create(name="my-account")

# First login — complete 2FA manually via live_url
session = await client.sessions.create(profile_id=profile.id)
print(f"Login here: {session.live_url}")
# ... complete login manually ...
await client.sessions.stop(session.id)  # saves session state

# Future sessions — auto-logged-in
browser = await client.browsers.create(profile_id=profile.id)

AgentMail (Built-in Email)

Each session gets a disposable email (e.g. finehand661@mail.bu.app) for signup verification and 2FA codes.

result = await client.run("Sign up on example.com", agentmail=True)
print(result.session.agentmail_email)

Structured Output

from pydantic import BaseModel

class Product(BaseModel):
    name: str
    price: float

class Products(BaseModel):
    items: list[Product]

result = await client.run(
    "Go to amazon.com, search 'keyboard', get top 5",
    output_schema=Products
)

Cached Scripts (Pay Once, Rerun Free)

# First call: agent explores and caches script (~$0.10, ~60s)
result = await client.run(
    "Get top @{{5}} stories from https://news.ycombinator.com as JSON",
    workspace_id=str(ws.id)
)

# Subsequent calls: cached execution ($0 LLM, ~5s)
result2 = await client.run(
    "Get top @{{10}} stories from https://news.ycombinator.com as JSON",
    workspace_id=str(ws.id)
)

MCP Server Integration

Add to Claude Code for direct tool access:

claude mcp add -t http -s user \
  -H "x-browser-use-api-key: YOUR_API_KEY" \
  -- browser-use https://api.browser-use.com/v3/mcp

Available MCP tools:

  • run_session — create and run a task
  • get_session — check status and cost
  • send_task — follow-up task to idle session
  • stop_session — stop task or session
  • list_sessions — list recent sessions

Update key when expired:

claude mcp remove browser-use
claude mcp add -t http -s user \
  -H "x-browser-use-api-key: NEW_KEY" \
  -- browser-use https://api.browser-use.com/v3/mcp

Cost Comparison

ModeLLMBrowserTotal per SessionFree Key Sessions
Browser (Playwright)$0~$0.001~$0.001~100
Agent (gemini-flash)~$0.03~$0.001~$0.03~3
Agent (sonnet)~$0.07~$0.001~$0.07~1

Use Cases

ScenarioRecommended Approach
Screenshot a webpageBrowser mode + page.screenshot()
Record product demo / tutorialBrowser mode + enable_recording=True
Bypass Cloudflare / anti-botBrowser mode + proxy
Access region-locked contentBrowser mode + proxy_country_code
Auto-fill forms / loginBrowser mode + Playwright
Complex multi-step scrapingAgent mode (but costs credits)

vs Local Browser Automation

Local (agent-browser / Playwright)Browser Use Cloud
Runs onLocal machineCloud
Anti-detectionNoneCloudflare/CAPTCHA bypass
Proxy IPsNone195+ countries
RecordingNoneMP4 video
CostFree~$0.001/session
Best forDaily automationAnti-bot, geo-access, demos

Installation

pip install browser-use-sdk playwright
python3 -m playwright install chromium
# or
npm install browser-use-sdk

Sponsors

Details

Marketplace
Yrzhe/claude-skills
Source
plugins/browser-use-cloud
Author
yrzhe
Category
Community
License
MIT

More from Yrzhe/claude-skills

All 17