Agent skill

Browser Use

by letta-ai in letta-ai/letta-code

Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video.

Apache-2.0Auto-check passedProductivity & Automation

Install Browser Use

skills CLI
$ npx skills add letta-ai/letta-code --skill browser-use -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install letta-ai/letta-code browser-use --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/letta-ai/letta-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/builtin/browser-use .claude/skills/browser-use && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
browser-use
GitHub stars
3.6k
Token cost
~3.3k tokens
SKILL.md length
1,112 words
Files
2 (incl. references)
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video.

  • Works in 9 steps: Find a Chromium-based browser (below).… → Launch with a dedicated profile and… → Discover targets via /json/list; pick… → …
  • Automate a browser
  • SKILL.md covers Visible by default when a…, Workflow, Finding the browser and Launching, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Browser Use is an agent skill from letta-ai/letta-code. Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video. Load only when the user asks to open or automate a browser, interact with or test rendered page UI, scrape a site that needs browser execution, or capture a browser screenshot or video. Do not load for backend logs, traces, API or stream events, source-code inspection, or plain HTTP or web research that does not require a browser.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/recording.md`).

It sits in Productivity & Automation, covering Browser automation, Web scraping and Forms and invoices. The repository describes itself as: Stateful agents that are like people, with memory, identity, and the ability to learn and adapt. The licence is Apache-2.0.

When your agent uses it

  • Automate a browser
  • Test rendered page UI
  • Scrape a site that needs browser execution
  • Capture a browser screenshot

Example prompts

  • “/browser-use”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Find a Chromium-based browser (below). If none exists, see "No Chrome installed".
  2. Launch with a dedicated profile and remote debugging. Never attach to the
  3. Discover targets via /json/list; pick the "page" target by URL or title.
  4. Connect to its webSocketDebuggerUrl and enable only the domains you need
  5. Inspect before acting: find elements by accessible name, label, text, role,
  6. Act through Input.* for user-like interactions; use Runtime.evaluate for
  7. Wait on observable state, never fixed sleeps alone.
  8. Verify the result (DOM state, URL, screenshot, console/network events).
  9. Clean up temporary background work: stop screencasts and close the

What it can do on your machine

Read from SKILL.md and the folder at commit 253a3bc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • chromedevtools.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Browser Use loads about 3.3k tokens when it runs, and up to ~3.8k if it reads all its reference files. Until then it costs about 117 tokens; SKILL.md has 1,112 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~117
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from letta-ai/letta-code at commit 253a3bc, republished under its Apache-2.0 licence (© letta-ai). 1,112 words, ~3,295 tokens.

Download SKILL.mdSave it as .claude/skills/browser-use/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
browser-use
description
Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video. Load only when the user asks to open or automate a browser, interact with or test rendered page UI, scrape a site that needs browser execution, or capture a browser screenshot or video. Do not load for backend logs, traces, API or stream events, source-code inspection, or plain HTTP or web research that does not require a browser.

Browser Use with CDP

Drive the browser through its native Chrome DevTools Protocol over the remote-debugging WebSocket. This works with zero dependencies: launch the browser with --remote-debugging-port, then talk JSON over fetch and the built-in WebSocket global (available in Bun and Node ≥ 22 — no ws package).

If the project already has Playwright or Puppeteer installed, using it is usually simpler — reach for raw CDP when no automation library is available, when protocol-level control is needed, or when recording a deterministic visual demo.

Protocol reference: https://chromedevtools.github.io/devtools-protocol/. The running browser's exact schema is at http://127.0.0.1:<port>/json/protocol; tip-of-tree docs can differ from the installed version.

Visible by default when a display exists

When the computer has a display, prefer a visible (headful) browser for any task the user might watch or take over: clicking or typing, forms, sign-in, checkout/payment, CAPTCHAs or bot protection, and user handoff. Most browser tasks exist because plain HTTP is not enough; a headless browser is more likely to trigger bot protection and gives the user no way to observe or step in. Visible does not mean pixel-driven: keep operating the page over CDP, and the user sees every action in the window.

Use headless mode only for work the user explicitly wants in the background and that cannot require interaction or handoff, such as read-only scraping, CI, or screenshot/PDF generation, or when no display exists. A headless page does not satisfy a request to open or reopen a site in a browser the user can see.

When the user asks to review, watch, or take over, leave that browser window open after the task. Do not kill or close it before replying.

Workflow

  1. Find a Chromium-based browser (below). If none exists, see "No Chrome installed".
  2. Launch with a dedicated profile and remote debugging. Never attach to the user's normal profile unless explicitly asked.
  3. Discover targets via /json/list; pick the "page" target by URL or title.
  4. Connect to its webSocketDebuggerUrl and enable only the domains you need (usually Page, Runtime, DOM, Input; add Network, Log when debugging).
  5. Inspect before acting: find elements by accessible name, label, text, role, stable ID, or placeholder — not generated classes or child indexes.
  6. Act through Input.* for user-like interactions; use Runtime.evaluate for inspection, coordinate math, and setup with no meaningful user interaction.
  7. Wait on observable state, never fixed sleeps alone.
  8. Verify the result (DOM state, URL, screenshot, console/network events).
  9. Clean up temporary background work: stop screencasts and close the WebSocket. Kill a browser you launched only when the user did not ask to review, watch, or take over the visible window.

Finding the browser

Any Chromium-based browser supports CDP (Chrome, Chromium, Edge, Brave). Probe in order:

bash
# macOS
for c in "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
         "/Applications/Chromium.app/Contents/MacOS/Chromium" \
         "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" \
         "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"; do
  [ -x "$c" ] && { echo "$c"; break; }
done

# Linux
for c in google-chrome google-chrome-stable chromium chromium-browser microsoft-edge brave-browser; do
  command -v "$c" && break
done

On Windows, check %ProgramFiles%\Google\Chrome\Application\chrome.exe, %ProgramFiles(x86)%\..., %LocalAppData%\Google\Chrome\Application\chrome.exe, and the same patterns for Microsoft\Edge.

No Chrome installed

Any browser found by the probe above works identically — use it. If truly no Chromium-based browser exists, do not install or download one automatically. Tell the user that browser use requires Chrome or another Chromium-based browser and recommend either:

  1. Install Chrome on the current computer, then retry the browser task.
  2. Teleport the conversation back to its Cloud sandbox, where a browser is already installed.

Wait for the user to choose. Do not silently replace the browser task with plain HTTP or claim browser automation succeeded.

Launching

Use a disposable profile and a fixed port. Chrome refuses to run as root without --no-sandbox, so add that flag when id -u is 0:

bash
chrome_args=( \
  --remote-debugging-port=9222 \
  --user-data-dir=/tmp/cdp-profile \
  --window-size=1440,900 \
  --force-device-scale-factor=1 \
  --no-first-run \
  --no-default-browser-check \
)
[ "$(id -u)" -eq 0 ] && chrome_args+=(--no-sandbox)
"$CHROME" "${chrome_args[@]}" https://example.com

Add --headless=new only for explicitly invisible work or when no display exists (see "Visible by default" above). With --remote-debugging-port=0, read the chosen port from <user-data-dir>/DevToolsActivePort. Launch in the background and poll http://127.0.0.1:9222/json/version until it responds.

HTTP endpoints: /json/version (browser metadata + browser-level WebSocket URL), /json/list (targets), PUT /json/new?<url> (open tab), /json/activate/<id>, /json/close/<id>, /json/protocol (schema).

Attach to the page target for Page/DOM/Runtime/Input work; use the browser target only for browser-wide commands (target control, downloads, browser contexts).

Show full SKILL.md (460 more words)Show less

Minimal CDP client

CDP messages are JSON with monotonically increasing request ids. Run with bun:

ts
const targets = await (await fetch("http://127.0.0.1:9222/json/list")).json();
const target = targets.find((t: any) => t.type === "page");
if (!target) throw new Error("No page target");

const ws = new WebSocket(target.webSocketDebuggerUrl);
await new Promise((resolve, reject) => {
  ws.onopen = resolve;
  ws.onerror = reject;
});

let nextId = 0;
const pending = new Map();
ws.onmessage = (event) => {
  const msg = JSON.parse(String(event.data));
  if (!msg.id) return handleEvent(msg); // Page.loadEventFired, Log.entryAdded, ...
  const p = pending.get(msg.id);
  if (!p) return;
  pending.delete(msg.id);
  msg.error ? p.reject(new Error(JSON.stringify(msg.error))) : p.resolve(msg.result);
};
ws.onclose = () => {
  for (const p of pending.values()) p.reject(new Error("socket closed"));
  pending.clear();
};

function send(method: string, params: object = {}): Promise<any> {
  return new Promise((resolve, reject) => {
    const id = ++nextId;
    pending.set(id, { resolve, reject });
    ws.send(JSON.stringify({ id, method, params }));
  });
}

await send("Page.enable");
await send("Runtime.enable");

Navigations destroy execution contexts and can invalidate in-flight Runtime.evaluate calls; retry after observing the new document.

Inspecting the page

Start with a concise UI inventory:

ts
const result = await send("Runtime.evaluate", {
  expression: `JSON.stringify({
    buttons: [...document.querySelectorAll('button')].map((el) => ({
      text: el.innerText.trim(), aria: el.getAttribute('aria-label'), title: el.title
    })).filter((x) => x.text || x.aria || x.title),
    inputs: [...document.querySelectorAll('input, textarea, [contenteditable=true]')].map((el) => ({
      tag: el.tagName, type: el.type, placeholder: el.placeholder,
      aria: el.getAttribute('aria-label'), value: el.value
    }))
  })`,
  returnByValue: true,
});

Use awaitPromise: true for async expressions and userGesture: true when the page requires user activation. Treat exceptionDetails in the result as an error even though the CDP command itself succeeded.

document.querySelector does not cross shadow boundaries — traverse open shadow roots explicitly; for closed shadow roots or remote-object work use the DOM domain (DOM.getDocument, DOM.querySelector, DOM.getBoxModel).

Clicking and typing

Compute coordinates in CSS pixels immediately before acting, then send native input events:

ts
async function point(expr: string) {
  const r = await send("Runtime.evaluate", {
    expression: `(() => {
      const el = ${expr};
      if (!el) return null;
      el.scrollIntoView({ block: 'center', inline: 'center' });
      const b = el.getBoundingClientRect();
      return { x: b.left + b.width / 2, y: b.top + b.height / 2 };
    })()`,
    returnByValue: true,
  });
  if (!r.result.value) throw new Error(`Element not found: ${expr}`);
  return r.result.value;
}

async function click(expr: string) {
  const { x, y } = await point(expr);
  await send("Input.dispatchMouseEvent", { type: "mouseMoved", x, y });
  await send("Input.dispatchMouseEvent", { type: "mousePressed", x, y, button: "left", buttons: 1, clickCount: 1 });
  await send("Input.dispatchMouseEvent", { type: "mouseReleased", x, y, button: "left", buttons: 0, clickCount: 1 });
}

Focus an editable element (click it), then insert text:

ts
await click(`document.querySelector('input[aria-label="Search"]')`);
await send("Input.insertText", { text: "search terms" });

Use Input.insertText for text and Unicode; use paired Input.dispatchKeyEvent (keyDown + keyUp with key, code, windowsVirtualKeyCode) for Enter, Escape, arrows, Tab, and shortcuts. Modifier bits: Alt=1, Ctrl=2, Meta=4, Shift=8.

Native <select> and framework-controlled inputs may need the prototype setter plus bubbling events:

ts
const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value").set;
setter.call(input, "new value");
input.dispatchEvent(new Event("input", { bubbles: true }));
input.dispatchEvent(new Event("change", { bubbles: true }));

Prefer real Input.* events for the behavior being demonstrated or tested; direct DOM mutation is fine for deterministic setup and inspection.

Waiting reliably

A returned command does not mean the action completed. Poll the state that proves completion:

ts
async function waitFor(expr: string, timeoutMs = 30_000) {
  const start = Date.now();
  while (Date.now() - start < timeoutMs) {
    const r = await send("Runtime.evaluate", { expression: `Boolean(${expr})`, returnByValue: true });
    if (r.result.value) return;
    await new Promise((res) => setTimeout(res, 250));
  }
  throw new Error(`Timed out waiting for ${expr}`);
}

await waitFor(`document.body.innerText.includes('Saved')`);

For navigation, wait on Page.loadEventFired or a lifecycle networkIdle event — but SPA route changes may emit neither, so prefer the UI condition that actually matters.

Screenshots, PDF, and video

ts
const shot = await send("Page.captureScreenshot", { format: "png" });
await Bun.write("screenshot.png", Buffer.from(shot.data, "base64"));

captureBeyondViewport: true for full-page; Page.getLayoutMetrics + clip for exact regions; Page.printToPDF for PDFs. For video recording with Page.startScreencast and demo-polish tips, read references/recording.md.

Debugging failures

Enable Network and Log, then watch Network.requestWillBeSent, Network.responseReceived, Network.loadingFailed, Runtime.consoleAPICalled, Runtime.exceptionThrown, and Log.entryAdded. Fetch bodies with Network.getResponseBody. Never log authorization headers, cookies, API keys, passwords, or response bodies containing secrets — scrub before returning output to context.

Common failure modes:

  • ECONNREFUSED on the port: browser exited, wrong port, or debugging not enabled — check /json/version first.
  • No matching target: inspect /json/list; match by URL/title, don't take the first page blindly.
  • Execution context destroyed: the page navigated; wait for the new document and re-evaluate.
  • Click misses an existing element: scroll into view and recalculate the box immediately before dispatching.
  • Typed text doesn't stick in a controlled input: focus + Input.insertText, or the prototype-setter pattern above.
  • Opening DevTools disconnects automation: embedded DevTools can detach other clients — don't open DevTools during a run.
  • Page commands fail on the browser endpoint: attach to the page target.

Safety

Browser automation acts with the user's browser authority.

  • Use a disposable profile by default.
  • Do not submit purchases, publish content, send messages, delete data, or accept consequential dialogs without explicit authorization.
  • Do not extract saved passwords, tokens, cookies, or unrelated browsing data.
  • Stay within the requested origin and workflow.
  • Keep the remote-debugging listener on loopback (127.0.0.1) unless the user explicitly needs remote access and has authentication in place.

© letta-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in src/skills/builtin/browser-use of letta-ai/letta-code.

  • SKILL.md
  • references/recording.md

Open the folder on GitHubat commit 253a3bc

Compare with similar skills

Browser Use next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Browser Use compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Browser Use this skillletta-ai/letta-code3.6k—~3.3kAutomated safety check: PassApache-2.0
C Browserdaxaur/openpaw174—~383Automated safety check: PassMIT
Browser Automationaiskillstore/marketplace430—~1.5kAutomated safety check: NotesNone
Browserwingbrowserwing/browserwing1.4k—~1.8kAutomated safety check: PassMIT
Actionbookactionbook/actionbook1.6k—~1.5kAutomated safety check: PassApache-2.0
Gsd Browsergsd-build/gsd-browser268—~1.3kAutomated safety check: PassApache-2.0

Similar skills

  • C Browser

    daxaur/openpaw

    Headless browser automation — navigate pages, click elements, fill forms, take screenshots, scrape content using agent-browser or playwright-cli.

    174 GitHub stars~383 tokensUpdated 4 mo ago
    Productivity & AutomationAuto-check passed
  • Browser Automation

    aiskillstore/marketplace

    Enterprise-grade browser automation using WebDriver protocol.

    430 GitHub stars~1.5k tokensUpdated today
    Productivity & AutomationAuto-check: notes
  • Browserwing

    browserwing/browserwing

    Browser automation platform with 78 built-in scripts and full CLI.

    1.4k GitHub stars~1.8k tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed
  • Actionbook

    actionbook/actionbook

    Activate when the user needs to interact with any website — browser automation, web scraping, screenshots, form filling, UI testing, monitoring, or building AI agents.

    1.6k GitHub stars~1.5k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Gsd Browser

    gsd-build/gsd-browser

    Native Rust browser automation CLI for AI agents. An agent skill from gsd-build/gsd-browser.

    268 GitHub stars~1.3k tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check passed
  • Kuri Server

    justrach/kuri

    Use kuri-server to automate Chrome via HTTP API — navigate pages, get a11y snapshots, interact with elements, capture network traffic (HAR), extract cookies, and bypass bot protection.

    365 GitHub stars~6.2k tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check: notes

More from letta-ai/letta-code

All 25 skills in this repo
  • Creating Skills

    letta-ai/letta-code

    Guide for creating effective skills. An agent skill from letta-ai/letta-code.

    3.6k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Generating Mod Envs

    letta-ai/letta-code

    Generates and reviews mod learning env JSON files for Letta Code local mods.

    3.6k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Initializing Memory

    letta-ai/letta-code

    Comprehensive guide for initializing or reorganizing agent memory.

    3.6k GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Self Configuration

    letta-ai/letta-code

    Inspect or modify Letta Code's own memory, model, context window, system prompt, compaction, permissions, toolsets, mods, skills, channels, schedules, agent secrets, and local runtime settings.

    3.6k GitHub stars~7k tokensUpdated today
    Auto-check passed
  • Creating Mods

    letta-ai/letta-code

    Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle/turn events, scoped conversation helpers, panels, and capability-gated behavior.

    3.6k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Customizing Statusline

    letta-ai/letta-code

    Creates, edits, and migrates Letta Code statusline mods. An agent skill from letta-ai/letta-code.

    3.6k GitHub stars~834 tokensUpdated today
    Auto-check passed

Questions about Browser Use

What does Browser Use do?

Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video. Browser Use is an agent skill from letta-ai/letta-code. Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video.

When should I use Browser Use?

Browser Use fits situations like: automate a browser; test rendered page UI; scrape a site that needs browser execution; capture a browser screenshot.

How do I install Browser Use in Claude Code?

Run `npx skills add letta-ai/letta-code --skill browser-use -a claude-code`. Or copy the skill folder (src/skills/builtin/browser-use in letta-ai/letta-code) into .claude/skills/browser-use in your project. Claude Code loads it when a task matches its description.

How do I install Browser Use in Codex?

Run `npx skills add letta-ai/letta-code --skill browser-use -a codex`. Or copy the skill folder (src/skills/builtin/browser-use in letta-ai/letta-code) into .agents/skills/browser-use in your project. Codex loads it when a task matches its description.

Can I use Browser Use in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add letta-ai/letta-code --skill browser-use -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/browser-use, .gemini/skills/browser-use, .github/skills/browser-use and .opencode/skills/browser-use in your project.

What does Browser Use need to run?

SKILL.md names no scripts, command-line tools or credentials: Browser Use is instructions for the agent only.

Does Browser Use access the network?

SKILL.md names 1 domain. As links in the text: chromedevtools.github.io. This is read from the text; nothing was executed.

Is Browser Use safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Browser Use use?

Browser Use is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Browser Use use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 494 tokens, read only when the agent opens those files.

What are the alternatives to Browser Use?

Skills that share tags, products or a category with Browser Use: C Browser (daxaur/openpaw, 174 stars), Browser Automation (aiskillstore/marketplace, 430 stars), Browserwing (browserwing/browserwing, 1.4k stars) and Actionbook (actionbook/actionbook, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Browser Use?

letta-ai (a GitHub organization) maintains it in letta-ai/letta-code, which has 3,552 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 9, 2026.

Source: letta-ai/letta-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.