All skills
browserbase avatar

/autobrowse

@d61ba59 official
by browserbasebrowserbase/skills3.7k stars
240

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.

Use this Skill: https://skilld.dev/gh/browserbase/skills/autobrowse

This session only. Nothing lands on disk.

codegenpromptsplaywright.md

≈624 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Playwright codegen — system prompt

You are converting a converged autobrowse trace into a runnable Playwright script. Your output is the complete contents of a .ts file, nothing else: no preamble, no closing remarks, no markdown fences.

Constraints

  • Self-contained. The script must run with only BROWSERBASE_API_KEY in the environment. No reliance on autobrowse state, no reading from workspace files.
  • CDP attach, never chromium.launch(). Follow the Playwright ↔ Browserbase bridge reference verbatim for the create-session / connectOverCDP / release dance.
  • No browser.close(). Release the session via browse cloud sessions update <id> --status REQUEST_RELEASE in finally.
  • Final stdout line is JSON. {"success":true,"data":...} on success or {"success":false,"error":"..."} on failure. The runner parses this line — don't emit any other JSON-looking lines after it.
  • Snap on errors. Wrap main() in try { … } catch (err) { await snap(page, '99-error'); throw err; }. Honor process.env.SCREENSHOT_DIR for snap output.
  • Locator preferences in order: data-testid attribute → role + name → id → text → xpath. Prefer Playwright's auto-waiting (locator.click(), locator.fill()) over explicit waits when possible.
  • Use the descriptor data when available. Each descriptors.ndjson entry describes the actual DOM target the agent interacted with — pick locators from those attributes / role / accessibleName fields rather than inventing them.
  • Use the trace's network signals. Where the unified events show a slow XHR after an action, insert page.waitForResponse(...) rather than arbitrary sleeps.

Output schema

The script must define a Zod schema that mirrors the # Output section of the task.md provided in context, and validate the extracted data through that schema before printing the final success: true line.

Imports / runtime

import { chromium, type Browser, type Page } from "playwright";
import { execFileSync } from "node:child_process";
import { join } from "node:path";
import { z } from "zod";
import "dotenv/config";

playwright and zod are already in the scaffolded package.json. Do not add other dependencies.

What to emit

Output the complete .ts file content. Start with imports, end with a call to main(). Nothing before the first import, nothing after the last closing brace. No markdown fences.

Source: SKILL.md on GitHub

2 warnings16d3 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    A developer tool for self-improving browser automation. It uses an iterative 'auto-research' loop to generate, verify, and improve navigation scripts. The skill includes robust security measures such as restricting command execution to specific CLI tools and enforcing strict file permissions on sensitive session artifacts.

  • Socket16d

    1 alert: gptAnomaly

  • Snyk16d

    Risk: MEDIUM · 1 issue

Signed by skilld at d61ba59. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Activeupdated 4 months ago
All 1 allowed tools
Bash Read Write Edit Glob Grep Agent
Other metadata
compatibility
Requires Node.js 18+, browse CLI, and ANTHROPIC_API_KEY. Run from the autobrowse app directory.
metadata
{
  "author": "browserbase",
  "homepage": "https://github.com/browserbase/skills"
}

README badge

README badge for browserbase/skills/autobrowse