Skip to content

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

fix: generate OpenClaw skill metadata

MagMuellera5d57d48dd3b
diff --git a/browser_use/skills/browser-use/SKILL.md b/browser_use/skills/browser-use/SKILL.md
index e779fad1b..a0aa3e585 100644
--- a/browser_use/skills/browser-use/SKILL.md
+++ b/browser_use/skills/browser-use/SKILL.md
@@ -13,7 +13,7 @@ metadata:
{
"id": "uv",
"kind": "uv",
- "package": "browser-use==0.13.7",
+ "package": "browser-use",
"bins": ["browser-use"],
"label": "Install Browser Use CLI (uv)",
},
diff --git a/browser_use/skills/browser_use.py b/browser_use/skills/browser_use.py
index 9b364adca..03001fced 100644
--- a/browser_use/skills/browser_use.py
+++ b/browser_use/skills/browser_use.py
@@ -6,6 +6,27 @@ import re
from importlib import resources
from pathlib import Path
+OPENCLAW_METADATA = (
+ 'metadata:\n'
+ ' {\n'
+ ' "openclaw":\n'
+ ' {\n'
+ ' "emoji": "🌐",\n'
+ ' "requires": { "bins": ["browser-use"] },\n'
+ ' "install":\n'
+ ' [\n'
+ ' {\n'
+ ' "id": "uv",\n'
+ ' "kind": "uv",\n'
+ ' "package": "browser-use",\n'
+ ' "bins": ["browser-use"],\n'
+ ' "label": "Install Browser Use CLI (uv)",\n'
+ ' },\n'
+ ' ],\n'
+ ' },\n'
+ ' }'
+)
+
def as_browser_use_skill(text: str) -> str:
"""Expose the Browser Harness skill under the Browser Use skill identity."""
@@ -39,6 +60,10 @@ def as_browser_use_skill(text: str) -> str:
1,
'description: "Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work."',
)
+ if not any(line.startswith('homepage:') for line in lines):
+ lines.append('homepage: https://browser-use.com')
+ if not any(line.startswith('metadata:') for line in lines):
+ lines.extend(OPENCLAW_METADATA.splitlines())
body = body.replace('# browser-harness', '# Browser Use', 1).replace('# Browser Harness', '# Browser Use', 1)
# Rebrand every mention except repo URLs (github.com/browser-use/browser-harness/...)
diff --git a/browser_use/skills/install.py b/browser_use/skills/install.py
index 5997e12ac..6b44d806f 100644
--- a/browser_use/skills/install.py
+++ b/browser_use/skills/install.py
@@ -148,6 +148,18 @@ def _validate_output_paths(output_paths: list[Path]) -> None:
raise RuntimeError(f'{ancestor} is not a directory.')
+def _print_skill_text(text: str) -> None:
+ # Windows consoles commonly default to cp1252, which cannot encode the emoji
+ # in OpenClaw skill metadata. Prefer UTF-8 when stdout supports reconfiguration.
+ reconfigure = getattr(sys.stdout, 'reconfigure', None)
+ if callable(reconfigure):
+ try:
+ reconfigure(encoding='utf-8')
+ except OSError:
+ pass
+ print(text, end='')
+
+
def handle(argv: list[str]) -> int:
parser = _build_parser()
args = parser.parse_args(argv)
@@ -160,7 +172,7 @@ def handle(argv: list[str]) -> int:
except RuntimeError as exc:
print(f'Error: {exc}', file=sys.stderr)
return 1
- print(text, end='')
+ _print_skill_text(text)
return 0
if command == 'install':
diff --git a/skills/browser-use/SKILL.md b/skills/browser-use/SKILL.md
index e779fad1b..a0aa3e585 100644
--- a/skills/browser-use/SKILL.md
+++ b/skills/browser-use/SKILL.md
@@ -13,7 +13,7 @@ metadata:
{
"id": "uv",
"kind": "uv",
- "package": "browser-use==0.13.7",
+ "package": "browser-use",
"bins": ["browser-use"],
"label": "Install Browser Use CLI (uv)",
},
diff --git a/tests/ci/test_browser_use_skill_install_docs.py b/tests/ci/test_browser_use_skill_install_docs.py
index d7f1246aa..562fc9c09 100644
--- a/tests/ci/test_browser_use_skill_install_docs.py
+++ b/tests/ci/test_browser_use_skill_install_docs.py
@@ -1,6 +1,7 @@
import os
import subprocess
import sys
+from io import BytesIO, TextIOWrapper
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
@@ -87,6 +88,25 @@ def test_browser_use_cli_installs_browser_harness_package_skill(tmp_path):
'---\n'
'name: browser-use\n'
'description: "Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work."\n'
+ 'homepage: https://browser-use.com\n'
+ 'metadata:\n'
+ ' {\n'
+ ' "openclaw":\n'
+ ' {\n'
+ ' "emoji": "🌐",\n'
+ ' "requires": { "bins": ["browser-use"] },\n'
+ ' "install":\n'
+ ' [\n'
+ ' {\n'
+ ' "id": "uv",\n'
+ ' "kind": "uv",\n'
+ ' "package": "browser-use",\n'
+ ' "bins": ["browser-use"],\n'
+ ' "label": "Install Browser Use CLI (uv)",\n'
+ ' },\n'
+ ' ],\n'
+ ' },\n'
+ ' }\n'
'---\n\n'
'# Browser Use\n'
)
@@ -118,3 +138,15 @@ def test_browser_use_cli_validates_destination_before_installing_harness(tmp_pat
assert result.returncode == 1
assert 'is not a directory' in result.stderr
assert not uv_args.exists()
+
+
+def test_skill_show_reconfigures_windows_stdout_to_utf8(monkeypatch):
+ from browser_use.skills import install
+
+ buffer = BytesIO()
+ windows_stdout = TextIOWrapper(buffer, encoding='cp1252')
+ monkeypatch.setattr(sys, 'stdout', windows_stdout)
+ install._print_skill_text('Browser Use 🌐\n')
+ windows_stdout.flush()
+
+ assert buffer.getvalue().decode('utf-8') == 'Browser Use 🌐\n'