BrowserSkill Browser Auto-launcher: Auto-launching Edge for bsk Crawling Tasks

Preface

When using BrowserSkill (bsk) for web scraping or browser automation, the prerequisites are usually: the local Microsoft Edge is open, and the BrowserSkill extension is connected to the local daemon. Scheduled scripts, pipelines, or unattended tasks cannot rely on a human to manually open the browser before each run; once disconnected, common errors include “no browser is connected to the daemon” or browsers connected 0, after which commands such as bsk navigate and bsk snapshot cannot proceed.

BrowserSkill itself focuses on in-browser capabilities and does not handle launching the browser process across environments. Below we introduce the BrowserSkill Browser Auto-Launcher on SkillHub (coordinate @user_656c2e70/bsk-browser-launcher): it performs connection self-checks on the task side, launches Edge on demand, and defines exit codes for reuse by various bsk scraping skills.

What Is This

The BrowserSkill Browser Auto-Launcher (bsk-browser-launcher, v1.0.0) is a community-sourced Agent Skill categorized under data-analysis, published by SkillHub user user_656c2e70; the tag requires_api_key=false indicates no additional API key is required.

One-sentence summary: it automatically launches the local Edge and the BrowserSkill extension in automation/scraping tasks and ensures the daemon is connected. It is a general-purpose foundational component responsible only for “making the browser available” and does not include business logic such as login, data processing, or publishing.

Official page: SkillHub - BrowserSkill Browser Auto-Launcher. API entry: https://api.skillhub.cn/user_656c2e70/bsk-browser-launcher.

Core Features

Based on the SKILL.md and scripts/launch_browser.py in the Skill package, the verified capabilities are as follows.

Connection Self-Check and Auto-Launch

The core script is scripts/launch_browser.py, with the following flow:

  1. Run bsk status to determine whether a browser is already connected to the daemon;
  2. If not connected, launch the local Edge (the extension starts with the browser and attempts to connect to the daemon);
  3. Poll and wait for the connection (default maximum 40 seconds, adjustable via --wait);
  4. On successful connection, exit with code 0 and print a confirmation message.

Exit Code Conventions

Code Meaning Recommended Handling
0 Browser is connected to the daemon; with --start-session, it also outputs SESSION=<id> Proceed with scraping
3 Connection never established within the wait period Degrade (e.g., WebFetch) or mark for later re-scraping to avoid blocking the entire pipeline
4 Session creation failed or timed out under --start-session Retry or degrade

Session Creation Helper

The optional parameter --start-session: after the connection is ready, it runs bsk session start (with a timeout in the script) and prints SESSION=<id>, allowing downstream steps to directly use bsk navigate --session <id> and similar operations. The package’s references/bsk_notes.md also summarizes notes related to bsk automation, such as the daemon/extension architecture, the ability to snapshot even after SPA navigation timeouts, and Chinese encoding issues on Windows.

Installation and Activation

SkillHub officially recommends letting the Agent handle installation according to the documentation, or using the local skillhub CLI. Before installing, you can check the CLI first:

command -v skillhub && skillhub --version

If not installed, follow the SkillHub installation documentation to perform a full installation or CLI-only installation:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
# CLI only:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

When installing this Skill, you must use --dir to point to the current Agent’s skills directory (otherwise it defaults to ./skills/ and may not be recognized). Example:

skillhub install @user_656c2e70/bsk-browser-launcher --dir <skills directory>

You can also pass the following prompt to an AI to have it complete the installation according to the same documentation:

Please install @user_656c2e70/bsk-browser-launcher according to https://skillhub.cn/install/skillhub.md.

Common skills directories (excerpted from the SkillHub installation documentation; check your local Agent for specifics):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

This Skill is based on the general SKILL.md format; after installation, the Agent can read the Skill and call scripts/launch_browser.py according to the documentation.

Typical Usage

After entering the Skill directory (or referencing the script path in the workspace), first perform a connection self-check:

python scripts/launch_browser.py

If you want to create a session and obtain the session ID after connection, run:

python scripts/launch_browser.py --start-session

When a longer wait time is needed (in seconds):

python scripts/launch_browser.py --wait 60

A minimal automation skeleton with sessions (consistent with the official SKILL.md):

python scripts/launch_browser.py --start-session   # outputs SESSION=xxxx
# After parsing out the id:
bsk navigate --session <id> "https://example.com/..."
bsk snapshot --session <id> > snap.txt
# ... scraping and processing ...
bsk session stop <id>

When creating new skills or scripts that run bsk navigate, bsk snapshot, bsk click, etc., it is advisable to run the above startup steps before the business logic.

Use Cases and Notes

Who It Is For

  • Users already using BrowserSkill for scraping or UI automation whose tasks require unattended operation or batch scheduling;
  • Multiple scraping skills sharing the same “browser ready” prerequisite, wanting to abstract it into an independent component;
  • Situations where the daemon is running but browsers connected 0 appears, requiring a scriptable launch-and-retry strategy.

Limitations and Notes

  • The script resolves paths via USERPROFILE and by default looks for ~/.local/bin/bsk.exe and common Windows Edge installation paths (C:/Program Files (x86)/Microsoft/Edge/..., etc.). For non-standard installation locations, verify the executable exists yourself.
  • The current implementation targets the typical Windows + Edge + bsk.exe layout; on Linux/macOS, if the paths differ, adjust according to the environment or manually ensure the browser and extension are connected.
  • Extension connection is asynchronous and should be handled by polling in launch_browser.py; callers do not need to add fixed sleep calls.
  • The Skill does not contain business credentials; it only manages browser lifecycle and connections. Scraping and publishing should remain separate (e.g., when publishing via open APIs, there is no strong dependency on browser login state).

SkillHub statistics (based on the retrieved data): rating 100000, 18303 downloads, installation count 0; version 1.0.0.

Closing Remarks

The BrowserSkill Browser Auto-Launcher turns the manual prerequisite of “Edge is open, extension is connected to the daemon” into a scriptable step, and aligns with downstream bsk commands through exit codes and optional SESSION= output. If your Agent workflow already includes BrowserSkill scraping tasks, you can install this Skill first and call launch_browser.py at the beginning of the task.

Official URL: https://www.skillhub.cn/skills/user_656c2e70/bsk-browser-launcher

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye