← Back to Skills Marketplace
meta-evo-creator

Babata Browser

by Meta-Evo · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ⚠ suspicious
38
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install babata-browser
Description
巴巴塔浏览器控制技能 v2.0 — 基于 Playwright 的轻量浏览器自动化,自然语言控制,Accessibility Tree优先,零额外AI依赖
README (SKILL.md)

Babata Browser 🦞 v2.0

轻量浏览器自动化技能。给巴巴塔装一双"网页上的手"——打开网页、填写表单、点击按钮、提取数据、截图保存。

架构概览

信息获取优先级:
  验证/事实查询 → API/CLI(最快,不走浏览器)
  探索/开放搜索 → web_search(Tavily,多角度)
  JS渲染/交互/截图 → babata-browser(兜底)

浏览器操作策略(v2.0 升级):
  获取结构 + 可交互元素 → Accessibility Snapshot(首选,Token高效)
  提取页面文字 → get_text(结构化)
  获取页面视觉状态 → screenshot(兜底)

对比 browser-use

browser-use babata-browser v2.0
依赖 50+包 仅 Playwright
安装 300MB+/20min 100MB/2min
控浏览器
AI决策 内置LLM 巴巴塔LLM直接决策
页面交互策略 视觉模型驱动 Accessibility Tree优先
Token效率 低(截图+视觉AI) 高(结构化数据)
中文任务 一般 ✅ 原生中文

核心设计原则

1. Accessibility Tree 优先

源自 Playwright MCP 设计模式。优先使用Playwright的Accessibility Tree快照获取页面结构和可交互元素,而不是视觉模型/截图。Token效率更高,且不需要额外AI视觉能力。

场景 首选方式 兜底
获取页面结构和可交互元素 Accessibility Snapshot
提取页面文字 get_text / get_html
获取页面视觉状态 screenshot

2. CLI 轻量 > MCP 深度

微软Playwright团队已验证:CLI模式Token效率高于MCP。巴巴塔遵循同样原则:

  • 高频操作(导航/点击/提取)→ 直接Playwright CLI API(轻量快速)
  • 长周期/多步骤/需持久化状态 → MCP协议(富状态编排)

3. 巴巴塔LLM直接决策

不内嵌LLM,所有操作决策由巴巴塔的DeepSeek模型完成。优势:

  • 统一上下文(不用切AI)
  • 统一记忆(操作历史可追踪)
  • 统一安全(Guardrails覆盖所有操作路径)

安装

前置依赖

pip install playwright
python -m playwright install chromium

安装本包(全局可导入)

# 从 babata-browser 目录执行
cd skills/babata-browser
pip install -e .

安装后可从任意目录 import,包括 cron 隔离会话。

使用

from scripts.babata_browser import execute_task

# 一句话操控浏览器
execute_task("打开卫健委官网,搜索最新政策,提取前5条标题")
execute_task("打开 https://example.com,搜索 医疗AI,提取结果")
execute_task("打开登录页,填表提交,截图保存")

CLI 模式

babata-browser '打开 GitHub Trending,提取热门项目' --json

内置能力

动作 说明 策略
goto 导航到URL CLI
get_text 提取页面文字(Accessibility Tree优先) CLI
get_html 获取HTML CLI
click 点击元素(文本/CSS) CLI
fill 填写表单 CLI
get_links 提取所有链接 CLI
screenshot 全页截图(Accessibility Tree不可用时兜底) CLI
scroll 滚动页面 CLI
execute_js 执行JavaScript CLI
extract_table 智能提取表格 CLI
search_and_extract 搜索+提取 CLI
login_if_needed 自动登录 CLI/MCP双模式
accessibility_snapshot 获取Accessibility Tree快照(v2.0新增) CLI

应用场景

  • 卫健委/医保局/中纪委官网动态政策抓取
  • 政府监管系统自动填报
  • JS渲染页面数据采集
  • 网页内容变化监控
  • 自动化表单提交

变更日志

版本 日期 改动
v2.0 2026-05-07 新增Accessibility Tree优先策略、CLI/MCP双模式选择、策略表。来源:Playwright MCP设计模式
v1.0 初始版本
Usage Guidance
Review carefully before installing. Use it only in an isolated environment, avoid production or government/account workflows unless you add confirmations, remove the default --no-sandbox behavior where possible, and do not enter passwords or sensitive form data unless outputs are redacted.
Capability Analysis
Type: OpenClaw Skill Name: babata-browser Version: 2.0.0 The babata-browser skill is a legitimate lightweight wrapper for Playwright automation, designed to allow an AI agent to interact with web pages. It provides standard automation capabilities such as navigation, text/table extraction, form filling, and JavaScript execution within the browser context. While it includes high-risk functions like 'execute_js' and 'login_if_needed', these are standard for browser automation tools and show no evidence of malicious intent, data exfiltration, or host-level persistence. The code in scripts/babata_browser.py is transparent and aligns with the documentation in SKILL.md.
Capability Assessment
Purpose & Capability
The browser-automation purpose matches the code, and there is no clear exfiltration or hidden endpoint. However, the declared capabilities include high-impact actions such as login, form filling/submission, arbitrary page JavaScript, and use on government reporting systems without clear built-in boundaries.
Instruction Scope
The instructions and examples encourage automated website interaction, including form submission, but do not describe confirmation checkpoints, domain allowlists, dry-run previews, or rollback guidance for sensitive actions.
Install Mechanism
The registry says there is no install spec, while SKILL.md instructs users to install Playwright, download Chromium, and install the package with pip. This is expected for a Playwright tool but should be done in a trusted, isolated Python environment.
Credentials
The included code launches Chromium with --no-sandbox by default while the tool is intended to open arbitrary webpages, which reduces browser containment.
Persistence & Privilege
No background persistence or local browser-profile reuse is shown, but the skill can handle website credentials and form values, and its generic fill helper returns entered values that may include secrets or personal data.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install babata-browser
  3. After installation, invoke the skill by name or use /babata-browser
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.0.0
v2.0: Accessibility Tree优先策略, CLI/MCP双模式, pip install -e . 全局可导入, 修复cron隔离会话import失败问题
Metadata
Slug babata-browser
Version 2.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Babata Browser?

巴巴塔浏览器控制技能 v2.0 — 基于 Playwright 的轻量浏览器自动化,自然语言控制,Accessibility Tree优先,零额外AI依赖. It is an AI Agent Skill for Claude Code / OpenClaw, with 38 downloads so far.

How do I install Babata Browser?

Run "/install babata-browser" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Babata Browser free?

Yes, Babata Browser is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Babata Browser support?

Babata Browser is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Babata Browser?

It is built and maintained by Meta-Evo (@meta-evo-creator); the current version is v2.0.0.

💬 Comments