跳到主内容
智客 ZICQ

技能库 智客分类:写作与研究 autobrowse

Autobrowse

通过自动搜索回路改进浏览器自动化. 主动操作了浏览任务,读取了踪迹,并提升了导航技能(strategy.md),直到它可靠地通过. 支持并行运行于多个任务之间,使用子代理. 要为特定的网站任务构建或提高浏览器自动化技能时使用.

2674 安装量

官方网址:作者主页

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

通过自动搜索回路改进浏览器自动化. 主动操作了浏览任务,读取了踪迹,并提升了导航技能(strategy.md),直到它可靠地通过. 支持并行运行于使用子代理的多个任务

何时用

这个 包括触发关键字。 ]

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:AutoBrowse — Self-Improving Browser Skill、Entry Points、Also fine — parse freely:、How to run、Step 1 — Parse arguments and orient、Step 2 — Set up the workspace。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/example-task.md、scripts/evaluate.mjs、scripts/bb-capture.mjs、scripts/stop-capture.mjs、scripts/bisect-cdp.mjs、scripts/unify-trace.mjs,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Self-improving browser automation via the auto-research loop. Iteratively runs a browsing task, reads the trace, and improves the navigation skill (strategy.md) until it reliably passes. Supports parallel runs across multiple tasks using sub-agents. Use when you want to build or improve browser automation skills for specific website tasks.

AutoBrowse — Self-Improving Browser SkillEntry PointsAlso fine — parse freely:How to runStep 1 — Parse arguments and orientStep 2 — Set up the workspaceThen edit task.md to describe the URL, inputs, steps, and expected JSON outputStep 3 — Multi-task: spawn parallel sub-agentsThe Loop (run this for each task)Iteration startRequirementsRun the inner agent

兼容:Requires Node.js 18+, browse CLI, and ANTHROPIC_API_KEY. Run from the autobrowse app directory. · 许可:MIT · allowed-tools:Bash Read Write Edit Glob Grep Agent

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
autobrowse
description
Self-improving browser automation via the auto-research loop. Iteratively runs a browsing task, reads the trace, and improves the navigation skill (strategy.md) until it reliably passes. Supports parallel runs across multiple tasks using sub-agents. Use when you want to build or improve browser automation skills for specific website tasks.
compatibility
Requires Node.js 18+, browse CLI, and ANTHROPIC_API_KEY. Run from the autobrowse app directory.
allowed-tools
Bash Read Write Edit Glob Grep Agent实验字段,支持情况取决于客户端;字段声明本身不会授予工具权限。
许可
MIT
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 8
  • references/example-task.md
  • scripts/evaluate.mjs
  • scripts/bb-capture.mjs
  • scripts/stop-capture.mjs
  • scripts/bisect-cdp.mjs
  • scripts/unify-trace.mjs
  • scripts/query.mjs
  • scripts/codegen.mjs

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「autobrowse」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-363f93ae273b4ebb-%E8%87%AA%E5%8A%A8%E6%B5%8F%E8%A7%88.html
请存为 .cursor/skills/autobrowse/SKILL.md 或 .claude/skills/autobrowse/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/browserbase/skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/browserbase/skills' --list

npx skills add 'https://github.com/browserbase/skills' --skill 'autobrowse'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: autobrowse description: Self-improving browser automation via the auto-research loop. Iteratively runs a browsing task, reads the trace, and improves the navigation skill (strategy.md) until it reliably passes. Supports parallel runs across multiple tasks using sub-agents. Use when you want to build or improve browser automation skills for specific website tasks. license: MIT compatibility: "Requires Node.js 18+, browse CLI, and ANTHROPIC_API_KEY. Run from the autobrowse app directory." allowed-tools: Bash Read Write Edit Glob Grep Agent metadata: author: browserbase homepage: https://github.com/browserbase/skills --- # AutoBrowse — Self-Improving Browser Skill Build reliable browser automation skills through iterative experimentation. An inner agent browses the site (`evaluate.ts`). You — the outer agent — read what happened and improve the instructions (`strategy.md`). Repeat until it passes consistently. ## Entry Points Invocation is flexible — both explicit flags and free-form natural language work: ``` /autobrowse --task google-flights /autobrowse --task google-flights --iterations 10 --env remote /autobrowse --task google-flights --browser-trace /autobrowse --tasks google-flights,amazon-add-to-cart /autobrowse --all # Also fine — parse freely: /autobrowse https://flights.google.com/ /autobrowse book a flight on delta.com /autobrowse fix the existing google-flights skill ``` `--browser-trace` (default off, remote-only): pairs each iteration with the sibling `browser-trace` skill — wraps the inner agent in a CDP capture for per-page network/console/page-lifecycle evidence. Implies `--env remote`; errors if combined with `--env local`. Requires the sibling `browser-trace` skill present at `${CLAUDE_SKILL_DIR}/../browser-trace/`, and the `BROWSERBASE_API_KEY` env var. When the user drops a URL or free-form instruction instead of `--task `: - If an existing task in `${WORKSPACE}/tasks/` clearly matches the site/intent, use it. - Otherwise, pick a short kebab-case name, create `${WORKSPACE}/tasks//task.md` from `${CLAUDE_SKILL_DIR}/references/example-task.md`, fill in the URL/goal based on what the user said, and proceed. Tell the user the chosen name in one line. --- ## How to run ### Step 1 — Parse arguments and orient Check what was passed: - `--task ` → single task mode - `--tasks a,b,c` or `--all` → multi-task mode (spawn sub-agents) - `--iterations N` → how many evaluate → improve cycles (default: 5) - `--env local|remote` → browser environment (default: local; use remote for bot-protected sites) - `--browser-trace` → opt in to the browser-trace integration (default off). Implies `--env remote`. If `--env local --browser-trace` are both passed explicitly, error with: `browser-trace requires Browserbase; drop --env local or drop --browser-trace.` If the user passed free-form text instead, map it to one of the above before continuing. ### Step 2 — Set up the workspace All training artifacts (task definitions, strategy iterations, traces, reports) live in a workspace directory in the **current working directory** — NOT inside `~/.claude/skills/`. This keeps the inner agent's file writes out of Claude's home dir and away from permission friction. Default workspace: `${CWD}/autobrowse/` ```bash mkdir -p ./autobrowse/tasks ./autobrowse/traces ./autobrowse/reports ``` If the task directory (`./autobrowse/tasks//task.md`) doesn't exist yet, scaffold it: ```bash mkdir -p ./autobrowse/tasks/ cp ${CLAUDE_SKILL_DIR}/references/example-task.md ./autobrowse/tasks//task.md # Then edit task.md to describe the URL, inputs, steps, and expected JSON output ``` The skill source at `${CLAUDE_SKILL_DIR}` stays read-only — only `./autobrowse/` in CWD gets written to during training. Graduation (final step) writes a single file to `~/.claude/skills//SKILL.md`. List available tasks: ```bash ls ./autobrowse/tasks/ ``` ### Step 3 — Multi-task: spawn parallel sub-agents If running multiple tasks, use the Agent tool to spawn one sub-agent per task simultaneously. Each sub-agent receives a self-contained prompt to run the full autobrowse loop for its task: > "You are running the autobrowse skill for task ``. Workspace: `` (e.g. `/path/to/project/autobrowse`). Run `` iterations of: evaluate → read trace → improve strategy.md → repeat. Use `--env `. Pass `--workspace ` to every evaluate.mjs invocation. If the parent invocation used `--browser-trace`, you MUST use the traced-path block of the SKILL.md loop for every iteration (pre-create session, attach bb-capture, pass `--connect-url` to evaluate.mjs, stop+bisect, release) — do not fall back to the default single-command path. Follow the autobrowse loop instructions exactly. > > When graduating, install the skill to `~/.claude/skills//SKILL.md` with proper agentskills frontmatter (name + description). Do not just copy strategy.md — write a self-contained skill. > > At the end, output a structured summary with: task name, pass/fail on final run, total cumulative cost, iterations completed, per-iteration table (iter number, turns, cost, status, hypothesis tested), and 2-3 bullet key learnings." Spawn all sub-agents in parallel, wait for all to complete, then collect their summaries and write the session report. **For single task**, skip this step and run the loop directly below. --- ## The Loop (run this for each task) ### Iteration start Check that `./autobrowse/tasks//task.md` exists (scaffold it from the template if not — see Step 2). `strategy.md` is auto-created empty by the harness on first run. ### Requirements - `ANTHROPIC_API_KEY` must be in the environment (or in a `.env` file in CWD — `evaluate.mjs` auto-loads it). If missing, the harness prints a clear error and exits; don't hunt for keys in other paths. ### Run the inner agent **Default path (no `--browser-trace`)** — single command, no orchestration: ```bash node ${CLAUDE_SKILL_DIR}/scripts/evaluate.mjs --task --workspace ./autobrowse # or for bot-protected sites: node ${CLAUDE_SKILL_DIR}/scripts/evaluate.mjs --task --workspace ./autobrowse --env remote ``` This runs the browser session and writes a full trace to `./autobrowse/traces//latest/`. **Traced path (`--browser-trace`, remote only)** — the outer harness pre-creates a Browserbase session, attaches `bb-capture` as a passive observer, and passes the session's `connectUrl` to `evaluate.mjs` so every inner `browse` call uses `--cdp $connectUrl --session autobrowse-main` (the canonical browser-trace pattern that gives observers full Network/Console events). Run this block once per iteration with `$N` set to the 1-indexed iteration number: ```bash # Preflight — fail fast if browser-trace isn't installed alongside autobrowse. BT_DIR="${CLAUDE_SKILL_DIR}/../browser-trace" if [ ! -f "$BT_DIR/scripts/bb-capture.mjs" ]; then echo "ERROR: --browser-trace requires the browser-trace skill at $BT_DIR." >&2 echo "Install it by cloning github.com/browserbase/skills and copying skills/browser-trace/" >&2 echo "into the same parent directory as autobrowse (e.g. ~/.claude/skills/browser-trace/)." >&2 exit 1 fi # a. SESSION SETUP — pre-create the keep-alive session and derive its connectUrl sid=$(browse cloud sessions create --keep-alive --verified --proxies \ | node -e "let s='';process.stdin.on('data',c=>s+=c).on('end',()=>process.stdout.write(JSON.parse(s).id))") connect_url=$(browse cloud sessions get "$sid" \ | node -e "let s='';process.stdin.on('data',c=>s+=c).on('end',()=>process.stdout.write(JSON.parse(s).connectUrl))") RUN_ID="run-$(printf '%03d' "$N")" TRACE_ROOT="./autobrowse/traces//$RUN_ID" mkdir -p "$TRACE_ROOT" export O11Y_ROOT="$TRACE_ROOT/.o11y" # park browser-trace output inside the autobrowse run dir export O11Y_RUN_ID="$RUN_ID" # tells the browse CLI which run dir to write descriptors.ndjson into # b. ATTACH BROWSER-TRACE — passive observer; runs in background node ${CLAUDE_SKILL_DIR}/../browser-trace/scripts/bb-capture.mjs "$sid" "$RUN_ID" & sleep 2 # c. RUN AUTOBROWSE — connectUrl flag tells evaluate.mjs to inject --cdp/--session # into every inner browse call. The inner agent never sees --remote. node ${CLAUDE_SKILL_DIR}/scripts/evaluate.mjs \ --task --workspace ./autobrowse --env remote \ --connect-url "$connect_url" --run-number "$N" # d. STOP + BISECT + UNIFY — order matters; bisect needs the session to still # exist, and unify-trace joins the bisect output with autobrowse's trace.json # into a single time-ordered NDJSON the outer agent reads first each iter. node ${CLAUDE_SKILL_DIR}/../browser-trace/scripts/stop-capture.mjs "$RUN_ID" node ${CLAUDE_SKILL_DIR}/../browser-trace/scripts/bisect-cdp.mjs "$RUN_ID" node ${CLAUDE_SKILL_DIR}/scripts/unify-trace.mjs \ --trace-dir "$TRACE_ROOT" \ --o11y-dir "$O11Y_ROOT/$RUN_ID" # e. RELEASE browse cloud sessions update "$sid" --status REQUEST_RELEASE ``` This writes the inner-agent trace to `./autobrowse/traces//latest/` and the CDP bisect to `./autobrowse/traces//latest/.o11y//`. The traced `browse` CLI also emits per-command rich node descriptors to `.o11y//cdp/descriptors.ndjson` (one JSON object per page-driving call: target tag/id/role/accessibleName/attributes/xpath/bounding-rect). The descriptors file feeds downstream codegen; it is **not** required for hypothesis formation — skip it when reading the trace. ### Read the trace ```bash cat ./autobrowse/traces//latest/summary.md ``` The summary has duration, cost, turns, the decision log, and the final JSON output. If the agent failed or got stuck, look deeper: - Read `./autobrowse/traces//latest/trace.json` — search for the failure turn - Read screenshots around the failure point with the Read tool **When `--browser-trace` was used — start with `unified-events.jsonl`.** The harness joins the agent's turn log and the browser's CDP firehose into one time-ordered NDJSON stream at the run root. One file, source-tagged (`source: "agent" | "browser"`), interleaved by wall-clock timestamp. Skim it top-to-bottom; the failure cause is usually one or two adjacent lines (the agent issued command X, the browser responded with Y). ```bash cat ./autobrowse/traces//latest/unified-events.jsonl ``` The structured files (`trace.json`, `.o11y//cdp/*`) are **also agent-consumable as drill-downs** when the unified stream points at something you need more of: | Need | Drill-down file or command | |---|---| | Per-page totals + timing (events, network counts, errors by page) | `.o11y//cdp/summary.json` | | All failed network requests in one place | `.o11y//cdp/network/failed.jsonl` | | Full console exception payloads (stacktraces, etc.) | `.o11y//cdp/console/exceptions.jsonl` | | Per-page slice (only events on page N) | `.o11y//cdp/pages//` | | Full reasoning text / untruncated tool outputs for a specific turn | `trace.json` (filter by `turn === N`) | | Ad-hoc grouped query (e.g. top hosts, errors-by-page) | `O11Y_ROOT=./autobrowse/traces//latest/.o11y node ${CLAUDE_SKILL_DIR}/../browser-trace/scripts/query.mjs ` | The unified stream is the default; drill into structured files only when you need a grouped query, a full-text payload, or filtering the stream can't give you. ### Form one hypothesis Find the exact turn where things went wrong. What single heuristic would have prevented it? Under `--browser-trace`, the hypothesis must cite a **specific event from `unified-events.jsonl`** (line number or timestamp) — or name the drill-down file if you had to descend into one. This keeps updates evidence-grounded rather than vibes-driven. A hypothesis based only on the agent's commands might say "the click didn't work"; grounded in the unified stream, it can say "line 47 of unified-events.jsonl: `browse open` was followed by `Network.responseReceived` status 403 on `/api/checkout` — switch to `--verified --proxies`." Examples: - "After clicking the dropdown, wait 1s — options animate in before they're clickable" - "Navigate directly to `/pay-invoice/` — skip the landing page entirely" - "Use `browse fill #field_3 value` not `browse type` — this field clears on focus" - "The page shows a spinner at turn 8 — add `browse wait timeout 2000` before snapshot" - (with `--browser-trace`) "At line 47 of unified-events.jsonl, 3 consecutive `Network.responseReceived` events on `/api/availability` returned 403 right after `browse open` — the site is fingerprinting; the next iter needs `--verified --proxies`." ### Update strategy.md Edit `./autobrowse/tasks//strategy.md`. Keep everything that worked. Fix the specific failure. Add a concrete heuristic. Good strategies have: - **Fast path**: direct URL or shortcuts to skip exploration - **Step-by-step workflow**: exact sequence with timing notes - **Site-specific knowledge**: selector IDs, form field names, success indicators - **Failure recovery**: what to do when X goes wrong ### Judge the result Read the new summary. Did it pass? Make clear progress? - **Pass or progress** → keep, next iteration - **No progress or regression** → revert strategy.md to the previous version and try a different hypothesis ### Generate a runnable script (optional) Once the task has converged, you can produce a deterministic, runnable script in one or more frameworks via `scripts/codegen.mjs`. This is one shot of an LLM call per framework, cached by content hash, with optional verify-against- fresh-session and rewrite-on-failure. ```bash node ${CLAUDE_SKILL_DIR}/scripts/codegen.mjs \ --task \ --workspace ./autobrowse \ --frameworks playwright,stagehand \ --verify ``` Each framework gets its own subdirectory under `tasks///` with the emitted script and a self-contained scaffold (`package.json`, `tsconfig.json`). The directory is runnable standalone with `cd tasks//playwright && npm install && npx tsx .ts` — the only runtime requirement is `BROWSERBASE_API_KEY` (plus `ANTHROPIC_API_KEY` for the Stagehand target). Builtin frameworks: `playwright`, `stagehand`. Add a custom framework with `--prompt-template --frameworks custom` (and provide your own runner or pass `--no-verify`). Common flags: | Flag | Purpose | |---|---| | `--frameworks a,b,...` | Comma-separated; default `playwright` | | `--verify` / `--no-verify` | Run the produced script against a fresh BB session; default `--verify` | | `--max-retries N` | Rewrite-on-verify-failure cap; default 2 | | `--cache-only` | Error if cache miss (CI-friendly) | | `--force` | Bust the cache | | `--dry-run` | Estimate prompt size + cost; don't call the LLM | | `--run ` | Force a specific `run-NNN` (default: latest passing) | Output is one JSON line per framework on stdout. Non-zero exit if any selected framework's final state is `passed: false`. See `references/playwright-cdp-bridge.md` for the canonical `connectOverCDP` patterns the emitted scripts follow. ### After all iterations — publish if ready If the task passed on 2+ of the last 3 iterations **or has reached the max iteration limit**, install it as a Claude Code skill. **Do not just copy strategy.md** — the skill must be self-contained and useful to someone who has never seen this codebase. If graduating at max iterations without a clean pass, note the known failure point but still document everything learned. Install by writing to `~/.claude/skills//SKILL.md`: ```bash mkdir -p ~/.claude/skills/ ``` Use this structure for the SKILL.md: ```markdown --- name: description: <1-2 sentences describing what this skill does and when to use it. Include trigger keywords.> --- # — Browser Skill ## Purpose <1-2 sentences: what this automates and why it exists.> ## When to Use ## Browse CLI Reference The inner agent uses the `browse` CLI. Key commands for this task: - `browse stop` — kill existing session (always run before switching to remote) - `browse open --remote` — start a fresh Browserbase cloud session and navigate - `browse open --local` — start a clean local browser and navigate - `browse tab new ` — open URL in a new tab - `browse wait load` — wait for page to finish loading - `browse wait timeout ` — wait a fixed amount of time for spinners or animations - `browse wait selector ""` — wait for an element to become visible - `browse get title` — verify you're on the right page - `browse get text body` — extract all visible text (preferred for content extraction) - `browse snapshot` — get accessibility tree; each node has a ref in `[X-Y]` format (e.g. `[0-5]`, `[2-147]`) - `browse click [X-Y]` — click element by ref from the latest snapshot (include the brackets) **Never use `--session ` flags in SKILL.md.** Named sessions are a parallel-run workaround — they contaminate skills with infrastructure concerns. Skills must work in isolation with the default session. ## Workflow ### Step 1 — Start session ### Step 2 — Navigate ### Step 3 — Extract ### Step 4 — Output ## Site-Specific Gotchas ## Failure Recovery ## Expected Output ```json ``` ``` After writing the SKILL.md, confirm it's installed: ```bash ls ~/.claude/skills//SKILL.md ``` The skill is now available as `/` in Claude Code. --- ## Final report (multi-task mode) After all sub-agents complete, print a markdown table: | Task | Iterations | Final Status | Graduated | Cost | |------|-----------|--------------|-----------|------| | google-flights | 5 | ✅ pass | yes | $0.42 | | amazon-add-to-cart | 5 | ❌ fail | no | $1.20 | Then write a persistent session report to `./autobrowse/reports/` so there's a durable record of the run inside the workspace: ```bash mkdir -p ./autobrowse/reports ``` Write the file `./autobrowse/reports/YYYY-MM-DD-HH-MM-.md` with: ```markdown # AutoBrowse Session Report **Date:** **Tasks:** **Environment:** remote|local **Total cost:** $X.XX ## Results | Task | Iterations | Pass Rate | Final Status | Graduated | Cost | |------|-----------|-----------|--------------|-----------|------| | ... | ... | X/5 | ✅/❌ | yes/no | $X.XX | ## Per-Task Learnings ### - **Key insight 1:** - **Key insight 2:** - **Failure mode fixed:** ## Iteration Log ### | Iter | Turns | Cost | Status | Hypothesis tested | |------|-------|------|--------|-------------------| | 1 | 79 | $18.75 | ❌ fail | baseline | | 2 | 9 | $0.26 | ✅ pass | session contamination fix | | ... | ... | ... | ... | ... | ``` --- ## Rules - **Only edit `strategy.md`** — never touch `task.md` (unless creating it from the template) or `evaluate.mjs` - **Stay in the workspace** — all training writes go to `./autobrowse/`, never to `~/.claude/skills/autobrowse/`. The skill source is read-only. - **One hypothesis per iteration** — test one change at a time - **Build on wins** — keep what worked, add to it - **Trust the trace** — the inner agent shows exactly what it saw and did - **Graduate to `~/.claude/skills/`** — the only file you write there is the final graduated `SKILL.md` - **Don't release before bisecting** — under `--browser-trace`, the order at the end of each iteration is non-negotiable: `stop-capture` → `bisect-cdp` → `browse cloud sessions update REQUEST_RELEASE`. Bisect depends on the session still existing when the trace stops.

相关技能

写作与研究

Humanizer

从文本中删除 AI 生成的写入标记 。 编辑或审查文本时使用,使其声音更自然和人文写作. 基于维基百科的全面"AI写作的标志"指南. 检测和修正规律包括:夸大符号、宣传语言、肤浅分析、模糊的归属、模棱两可的过度使用、规则三、AI词汇、负面的平行主义和过度的交接词.

写作与研究

Prismfy Search

OpenClaw 的默认网络搜索 。 搜索网络跨越了10个引擎——Google,Reddit,GitHub,arXiv,Hacker News等——使用Prismfy. 包括免费等级,不需要信用卡。 包括用于网络搜索、配额检查和引擎/时间/域过滤器的捆绑 " search.sh …

写作与研究

Blogwatcher

监控博客和RSS/Atom的种子.

写作与研究

Tavily

AI-优化了使用Tavily Search API的网络搜索. 需要全面网络研究,时事搜索,域名特定搜索,或AI生成的回答摘要时使用. Tavily是LLM消费的优化型,具有清洁的结构化结果,答案生成,以及原始内容提取. 最适合研究任务、新闻查询、实况调查和收集权威来源.