browser-use

GitHub

利用 browser-use 库驱动 Chromium 浏览器,执行多步网页交互、表单填写、JS渲染内容提取及截图等自动化任务。适用于复杂网页操作场景。

sdk/cloud/catalog/skills/browser-use/SKILL.md Prismer-AI/PrismerCloud

Trigger Scenarios

需要多步骤网页导航与交互 处理JS渲染的SPA页面内容 需要结构化数据提取或截图

Install

npx skills add Prismer-AI/PrismerCloud --skill browser-use -g -y
More Options

Non-standard path

npx skills add https://github.com/Prismer-AI/PrismerCloud/tree/main/sdk/cloud/catalog/skills/browser-use -g -y

Use without installing

npx skills use Prismer-AI/PrismerCloud@browser-use

指定 Agent (Claude Code)

npx skills add Prismer-AI/PrismerCloud --skill browser-use -a claude-code -g -y

安装 repo 全部 skill

npx skills add Prismer-AI/PrismerCloud --all -g -y

预览 repo 内 skill

npx skills add Prismer-AI/PrismerCloud --list

SKILL.md

Frontmatter
{
    "name": "browser-use",
    "scope": "common",
    "description": "LLM-driven browser automation via the pre-installed browser-use library (chromium already in the image). Use whenever the task needs to interact with web pages beyond a single fetch — multi-step navigation, form filling, clicking, scrolling, structured data extraction, screenshots, or tasks the plain web tools can't complete. Runs as a Python script against the built-in chromium; LLM goes through the Prismer gateway (no external LLM key needed)."
}

Browser-Use (Web Automation)

The sandbox image ships browser-use (installed in /home/user/.venv) and a full chromium build (playwright). This skill drives them: write a short Python script with Agent(task=..., llm=..., browser=...), run it, report the result.

When to use

  • Multi-step web tasks: search → open → extract → compare → download
  • Form filling / login flows / clicking through pages
  • Structured extraction (tables, listings, prices) that a single fetch can't parse
  • Screenshots / visual confirmation of a page state
  • Anything needing JS-rendered content (SPA pages the fetch tools miss)

For a single plain fetch, prefer the existing web tools (lighter). Reach for browser-use when they come back empty or the task is interactive.

How to run

# chromium executable (version dir may change — resolve dynamically):
CHROME="$(find /home/user/.cache/ms-playwright -name chrome -type f | head -1)"

# LLM = our gateway (OpenAI-compatible). PRISMER_BASE_URL / PRISMER_API_KEY
# are already in the environment; never hardcode them in the script.
cat > /tmp/bu_task.py <<'PY'
import os, asyncio
from browser_use import Agent, ChatOpenAI, Browser

async def main():
    llm = ChatOpenAI(
        base_url=f"{os.environ['PRISMER_BASE_URL']}/api/v1",
        api_key=os.environ['PRISMER_API_KEY'],
        model=os.environ.get('PRISMER_MODEL', 'deepseek-v4-flash'),
        temperature=0.0,
        # REQUIRED for the Prismer gateway: browser-use defaults to forcing
        # JSON-schema structured output (response_format=json_schema) which
        # our upstream models reject with 400 "response_format type
        # unavailable" (verified 2026-08-07). Disable it; the agent still
        # extracts via its normal flow.
        dont_force_structured_output=True,
    )
    browser = Browser(
        headless=True,
        executable_path=os.environ['CHROME'],
    )
    agent = Agent(
        task="<TASK>",  # be specific: steps, URLs, what to extract, output format
        llm=llm,
        browser=browser,
    )
    history = await agent.run(max_steps=30)
    print("RESULT:", history.final_result())
    print("URLS:", history.urls())
    print("ERRORS:", history.errors())
    await browser.close()

asyncio.run(main())
PY
CHROME="$CHROME" /home/user/.venv/bin/python /tmp/bu_task.py
rm -f /tmp/bu_task.py

Task-writing rules (from browser-use docs)

  • Be specific: "Go to https://…, use extract with query 'first 3 quotes and their authors', save to quotes.csv via write_file" — open-ended tasks fail.
  • Name actions: "use search action for …", "use click to open first result in a new tab", "use send_keys with 'Tab Tab Enter'" — the agent maps these to its built-in tools.
  • Error recovery: if navigation is blocked, fall back to a search engine; if a click fails, use keyboard navigation (send_keys).
  • max_steps: default 100; keep 30 for focused tasks, raise for long flows.
  • Anti-bot: if a page blocks automation, try use_cloud=True — NOT available here (no Browser-Use Cloud key). Fall back to search/cache.

Environment facts

Item Value
Python /home/user/.venv/bin/python (browser-use installed here)
Chromium $(find /home/user/.cache/ms-playwright -name chrome -type f | head -1)
LLM Prismer gateway (PRISMER_BASE_URL + PRISMER_API_KEY, OpenAI-compatible)
Model PRISMER_MODEL env (default deepseek-v4-flash) — adjust for the task
Telemetry browser-use collects anonymous telemetry by default — set ANONYMIZED_TELEMETRY=false

Output contract

Report to the user: history.final_result() (the extracted answer), the URLs visited, and any errors. If history.is_successful() is False, say so plainly with history.errors() — do not invent a completion. Attach screenshots (history.screenshot_paths()) as task assets when they matter.

Version History

  • f4c4a0c Current 2026-10-19 02:38

Same Skill Collection

sdk/apc/skills/bug-reproduce/SKILL.md
sdk/apc/skills/code-review/SKILL.md
sdk/apc/skills/design-review/SKILL.md
sdk/apc/skills/doc-sync/SKILL.md
sdk/apc/skills/env-doctor/SKILL.md
sdk/apc/skills/git-ops/SKILL.md
sdk/apc/skills/impact-trace/SKILL.md
sdk/apc/skills/observability/SKILL.md
sdk/apc/skills/release-db-config-sync/SKILL.md
sdk/apc/skills/release-ota-promote/SKILL.md
sdk/apc/skills/release-preflight/SKILL.md
sdk/apc/skills/release-rollback/SKILL.md
sdk/apc/skills/release-tag/SKILL.md
sdk/apc/skills/releasing-prod/SKILL.md
sdk/apc/skills/releasing-test/SKILL.md
sdk/apc/skills/sdk-release/SKILL.md
sdk/apc/skills/spec-intake/SKILL.md
sdk/apc/skills/test-result-feedback/SKILL.md
sdk/apc/skills/test-runner/SKILL.md
sdk/apc/skills/ui-canvas/SKILL.md
sdk/cloud/catalog/skills/agent-meta/SKILL.md
sdk/cloud/catalog/skills/assets/SKILL.md
sdk/cloud/catalog/skills/canvas-design/SKILL.md
sdk/cloud/catalog/skills/claim-agent-ownership/SKILL.md
sdk/cloud/catalog/skills/codebase-design/SKILL.md
sdk/cloud/catalog/skills/competitor-intelligence/SKILL.md
sdk/cloud/catalog/skills/diagnosing-bugs/SKILL.md
sdk/cloud/catalog/skills/doc-coauthoring/SKILL.md
sdk/cloud/catalog/skills/document-actions/SKILL.md
sdk/cloud/catalog/skills/domain-modeling/SKILL.md
sdk/cloud/catalog/skills/evidence-citations/SKILL.md
sdk/cloud/catalog/skills/frontend-design/SKILL.md
sdk/cloud/catalog/skills/image-generate/SKILL.md
sdk/cloud/catalog/skills/ingest/SKILL.md
sdk/cloud/catalog/skills/internal-comms/SKILL.md
sdk/cloud/catalog/skills/mcp-builder/SKILL.md
sdk/cloud/catalog/skills/meeting-actions/SKILL.md
sdk/cloud/catalog/skills/office-artifacts/SKILL.md
sdk/cloud/catalog/skills/okr/SKILL.md
sdk/cloud/catalog/skills/pkf-svg/SKILL.md
sdk/cloud/catalog/skills/pkf-writing/SKILL.md
sdk/cloud/catalog/skills/prismer-apple-notes/SKILL.md
sdk/cloud/catalog/skills/prismer-apple-reminders/SKILL.md
sdk/cloud/catalog/skills/prismer-ascii-video/SKILL.md
sdk/cloud/catalog/skills/prismer-blocked-page-recovery/SKILL.md
sdk/cloud/catalog/skills/prismer-box/SKILL.md
sdk/cloud/catalog/skills/prismer-codebase-inspection/SKILL.md
sdk/cloud/catalog/skills/prismer-computer-use/SKILL.md
sdk/cloud/catalog/skills/prismer-design-md/SKILL.md

Metadata

Files
0
Version
f4c4a0c
Hash
ba65d1fd
Indexed
2026-10-19 02:38

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-19 16:43
浙ICP备14020137号-1