返回 Skill 列表
extension
分类: 开发与工程无需 API Key

Skill Demo

根据用户输入的URL打开浏览器窗口。用于打开网站、快速启动链接或验证浏览器自动化。

person作者: luoqianchenguni-maxhubclawhub

Skill Demo

Open a local browser window with a normalized URL.

This skill is designed for deterministic browser-launch behavior in local workflows.

Steps

  1. Read the user input as a URL candidate.
  2. Normalize whitespace and trim both ends.
  3. If the URL has no scheme, prepend https://.
  4. Allow only http and https.
  5. If input is empty, use default URL:
    • https://www.openclaw.ai
  6. Open a new browser window.
  7. Return one line of status.

Response Rules

  • Return a single plain-text status line.
  • Do not include markdown wrappers.
  • On success:
    • Opened browser window: <normalized_url>
  • If the browser reports blocked open:
    • Browser open was requested but may have been blocked. URL: <normalized_url>
  • On invalid URL/scheme:
    • return an explicit error message.

Test Cases

Input: openclaw.ai Output: Opened browser window: https://openclaw.ai

Input: https://docs.openclaw.ai Output: Opened browser window: https://docs.openclaw.ai

Input: `` Output: Opened browser window: https://www.openclaw.ai

Integration Notes

  • Use this skill for quick browser-open automation checks.
  • Keep URL normalization deterministic so tests can assert exact output text.
  • Keep scheme restrictions to avoid unsafe local protocol launches.

Output

Use the format:

Opened browser window: <normalized_url>