# Browser Use To Stagehand

Migrate browser-use (Python) browser-automation scripts to Stagehand v3 (TypeScript) on...

- Repository: https://github.com/browserbase/skills (3748 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-27
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add browserbase/skills --skill browser-use-to-stagehand -g -a claude-code -y`
Codex: `npx skills add browserbase/skills --skill browser-use-to-stagehand -g -a codex -y`
Cursor: `npx skills add browserbase/skills --skill browser-use-to-stagehand -g -a cursor -y`
Gemini CLI: `npx skills add browserbase/skills --skill browser-use-to-stagehand -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add browserbase/skills`

## Description

Migrate browser-use (Python) browser-automation scripts to Stagehand v3 (TypeScript) on Browserbase. Use when the user wants to convert, port, rewrite, or migrate a browser-use Agent script to Stagehand, map browser-use features/APIs to Stagehand primitives (act/extract/observe/agent), or move agentic browser automation onto Browserbase with more determinism. Triggers on "browser-use", "browser_use", or "Agent(task=...)".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# browser-use → Stagehand on Browserbase (`/browser-use-to-stagehand`)

Convert a browser-use (Python) script into an idiomatic **Stagehand v3 (TypeScript)** script on
**Browserbase**, choosing the right level of determinism at each step rather than producing a
one-to-one agentic copy.

**Core principle:** browser-use is agentic-by-default (the LLM decides every action). Stagehand
lets you choose how much AI to use. A good migration replaces opaque agent loops with an
inspectable, mostly-deterministic pipeline, using AI only where the page is genuinely
unpredictable. This is a refactor with judgment, not a transpile.

> **Source of truth & versions.** This skill's durable value is the *judgment*, the determinism
> spectrum and the decompose-vs-agent decision, not the API specifics, which drift every release.
> The code mappings here are a **snapshot validated against `@browserbasehq/stagehand` 3.6.x and
> browser-use 0.13.x (2026-06)**. On any conflict, the **live docs win**, always verify against the
> installed package and these sources before emitting code:
> - Stagehand v3: <https://docs.stagehand.dev/v3>  ·  installed types: `node_modules/@browserbasehq/stagehand`
> - Browserbase: <https://docs.browserbase.com>
> - browser-use: <https://docs.browser-use.com>
>
> If the installed Stagehand major is **not 3**, treat this skill as conceptual only and follow the
> live docs for every signature.

## Reference files (read as needed)

The rest: https://github.com/browserbase/skills/blob/HEAD/skills/browser-use-to-stagehand/SKILL.md
