SuperAPI AI Directory

mearl-bbrowser

General & other

View repository

Updated 11-16 16:13

About this skill

Mearl bb-browser site adapters

Run original adapters via mearl bbrowser site ... without installing the bb-browser CLI, extension, or daemon. Browser operations go through Mearl, with support for both the extension and direct CDP; page cookies and site JS context belong to the selected browser.

Commands

mearl bbrowser site list
mearl bbrowser site search 示例
mearl bbrowser site info example-shop/whoami
mearl bbrowser site example-shop/whoami
mearl bbrowser site zhihu/hot 10
mearl bbrowser site run zhihu/hot --count 10
mearl bbrowser site update

When unsure about parameters, first query site info <name>. When the adapter name is known, call it directly; only run as needed when the community library is missing site update. Perform operations according to the user's request; the adapter's readOnly and capabilities are descriptive information and do not replace user authorization or Mearl permission checks.

If the plugin is not yet registered or the entry is missing, register the current Skill directory:

npx @mearl/setup plugin "$SKILL_DIR"

Sources and parameters

By default, read in the following order; adapters with the same name are overridden by later directories:

  1. ~/.bb-browser/bb-sites: existing bb-browser community library.
  2. ~/.mearl/bbrowser/bb-sites: community library managed by Mearl.
  3. ~/.bb-browser/sites: existing bb-browser private adapters.
  4. ~/.mearl/bbrowser/sites: Mearl private adapters.

When executing or viewing info , first check the adapter files in the current working directory; if present, use them first, then query the above directories. Supports relative paths, absolute paths, and omitting the .js suffix, for example, executing from the project root:

# 加载当前项目的 example-shop/ai-agent.js
mearl bbrowser site example-shop/ai-agent
mearl bbrowser site ./example-shop/ai-agent.js
mearl bbrowser site info ./example-shop/ai-agent.js

In the same directory, _helper.js is loaded together with the adapter;list and search query adapters in the agreed directories.site update fixedly clones or fast-forwards from epiral/bb-sites to ~/.mearl/bbrowser/bb-sites, and stops when there are local modifications. Place private adapters in the project or the sites directory, not in the community library.

Compatible with @meta JSON, legacy // @tag, extra fields in metadata, same-directory _helper.js and async function(args)。@meta.args parameter definitions supporting description strings and objects. Positional arguments are filled in declaration order of @meta.args into parameters not yet assigned by name; numbers and booleans are converted to strings, consistent with the bb-browser CLI. Underscore-named parameters can be passed directly; other names or parameters that conflict with host options go into the structured args object.

For SDK/MCP use plugin name bbrowser, command site, input example:

{
  "tokens": ["zhihu/hot"],
  "args": { "count": "10" },
  "tab": 12345
}

CLI corresponds to mearl bbrowser --payload '{"command":"site","input":{"tokens":["zhihu/hot"],"args":{"count":"10"}}}'。tokens holding management subcommands, adapter names or file paths, and positional arguments,args holding adapter parameters;tab specifies the target tab.

Browser and results

  • --browser、--session、--cdp、--timeout、--output uses Mearl host semantics.--tab uses Mearl's numeric tabId.
  • When a domain is present, reuse a page for that domain in the background or create a new page; an explicit tab must match the adapter domain. When there is no domain, use the current active page or the first page. By default, keep the page and do not proactively refresh the user's page.
  • The script runs in the page's main world, preserving helpers and page global state, and waits for asynchronous results. Do not automatically retry adapters that fail to execute.
  • Returns { "result": ... }on success; when a JSON string is returned, parse it as JSON. When the adapter returns an error, output success:false、error.message, the original result , and optional hint, with CLI exit code 1. Session results also include Mearl's session, after creating a new session, use its sessionId to continue operations or release it.
  • Check login, CAPTCHA, page initialization, and site redesign issues against the returned error. The bb-browser operation prompts in the adapter can be completed using the corresponding Mearl capabilities; manual browser handover and session wrap-up follow the Mearl workflow.

The plugin outputs JSON by default. This plugin is compatible with site adapter execution and the above management commands; the OpenClaw bridge and --jq are not implemented in this entry point; result filtering can use the system's jq。