Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fix skill install targets, and sync harness docs

Laith Weinberger47227e63ffbf
diff --git a/browser_use/skills/browser-use/SKILL.md b/browser_use/skills/browser-use/SKILL.md
index d81877923..994aade1e 100644
--- a/browser_use/skills/browser-use/SKILL.md
+++ b/browser_use/skills/browser-use/SKILL.md
@@ -20,7 +20,7 @@ PY
```
- Invoke as `browser-use`. Use heredocs for multi-line commands.
-- Helpers are pre-imported and the CLI starts or connects to the Browser Harness daemon before running your code.
+- Helpers are pre-imported. `run.py` calls `ensure_daemon()` before `exec`.
- First navigation is `new_tab(url)`, not `goto_url(url)`.
- The normal local flow attaches to the running Chrome/Chromium CDP endpoint. No browser ids or local profile selection.
@@ -48,11 +48,10 @@ Use Browser Use cloud for headless servers, parallel sub-agents, or isolated wor
browser-use auth login
```
-Or use an API key in a noninteractive shell:
+Or import a key safely:
```bash
-export BROWSER_USE_API_KEY=bu_...
-browser-use auth status
+browser-use auth login --api-key-stdin
```
Pick a short made-up name; `r7k2` below is just a placeholder:
diff --git a/browser_use/skills/install.py b/browser_use/skills/install.py
index 910a0a8e4..5e96fbf5c 100644
--- a/browser_use/skills/install.py
+++ b/browser_use/skills/install.py
@@ -12,22 +12,27 @@ DEFAULT_TARGET = 'all'
def _xdg_config_home() -> Path:
- return Path(os.environ.get('XDG_CONFIG_HOME', Path.home() / '.config')).expanduser()
+ config_home = os.environ.get('XDG_CONFIG_HOME')
+ if config_home:
+ return Path(config_home).expanduser()
+ return Path.home() / '.config'
-def _target_dirs() -> dict[str, Path]:
- return {
- 'agents': Path.home() / '.agents' / 'skills' / SKILL_NAME,
- 'claude': Path.home() / '.claude' / 'skills' / SKILL_NAME,
- 'codex': Path.home() / '.codex' / 'skills' / SKILL_NAME,
- 'copilot': Path.home() / '.copilot' / 'skills' / SKILL_NAME,
- 'cursor': Path.home() / '.cursor' / 'skills' / SKILL_NAME,
- 'gemini': Path.home() / '.gemini' / 'skills' / SKILL_NAME,
- 'opencode': _xdg_config_home() / 'opencode' / 'skills' / SKILL_NAME,
- }
+def _home_skill_dir(assistant: str) -> Path:
+ return Path.home() / f'.{assistant}' / 'skills' / SKILL_NAME
-TARGET_NAMES = ('agents', 'claude', 'codex', 'copilot', 'cursor', 'gemini', 'opencode')
+TARGET_DIR_BUILDERS = {
+ 'agents': lambda: _home_skill_dir('agents'),
+ 'claude': lambda: _home_skill_dir('claude'),
+ 'codex': lambda: _home_skill_dir('codex'),
+ 'copilot': lambda: _home_skill_dir('copilot'),
+ 'cursor': lambda: _home_skill_dir('cursor'),
+ 'gemini': lambda: _home_skill_dir('gemini'),
+ 'opencode': lambda: _xdg_config_home() / 'opencode' / 'skills' / SKILL_NAME,
+}
+
+TARGET_NAMES = tuple(TARGET_DIR_BUILDERS)
def _load_skill_text_from_package() -> str:
@@ -111,10 +116,9 @@ def _build_parser() -> argparse.ArgumentParser:
def _resolve_output_paths(target: str, custom_path: Path | None) -> list[Path]:
if custom_path is None:
- target_dirs = _target_dirs()
if target == 'all':
- return [path / 'SKILL.md' for path in target_dirs.values()]
- return [target_dirs[target] / 'SKILL.md']
+ return [build_dir() / 'SKILL.md' for build_dir in TARGET_DIR_BUILDERS.values()]
+ return [TARGET_DIR_BUILDERS[target]() / 'SKILL.md']
path = custom_path.expanduser()
if path.name == 'SKILL.md':