Agent SkillsTencent/BrowserSkill › browser-skill

browser-skill

GitHub

通过注入的六个结构化工具自动化控制用户登录的 Chromium 浏览器,支持会话管理、页面导航、状态检查及交互操作。遵循观察-行动循环,确保自动化隔离与资源安全释放。

packages/dsh-plugin-browserskill/skill/SKILL.md Tencent/BrowserSkill

Trigger Scenarios

需要自动化执行网页浏览任务 需要模拟用户在浏览器中的点击、输入和滚动操作 需要抓取或验证网页上的特定元素状态

Install

npx skills add Tencent/BrowserSkill --skill browser-skill -g -y
More Options

Non-standard path

npx skills add https://github.com/Tencent/BrowserSkill/tree/main/packages/dsh-plugin-browserskill/skill -g -y

Use without installing

npx skills use Tencent/BrowserSkill@browser-skill

指定 Agent (Claude Code)

npx skills add Tencent/BrowserSkill --skill browser-skill -a claude-code -g -y

安装 repo 全部 skill

npx skills add Tencent/BrowserSkill --all -g -y

预览 repo 内 skill

npx skills add Tencent/BrowserSkill --list

SKILL.md

Frontmatter
{
    "name": "browser-skill",
    "description": "Browser automation through six injected domain tools."
}

browser-skill for DeepSeek Harness

Drive the user's logged-in Chromium through this plugin's structured browser tools. Automation is isolated in an Agent Window; user-window tabs remain protected unless explicitly borrowed.

Loading this skill reveals six tools for the rest of the conversation:

  • browser_session owns session lifecycle.
  • browser_page handles navigation and lifecycle waits.
  • browser_inspect reads semantic, visual, console, and network state.
  • browser_interact performs normal page interactions.
  • browser_tabs manages Agent Window tabs and temporary user-tab borrowing.
  • browser_assist handles human help, window size, and device emulation.

Every call includes an action. Treat each loaded tool schema as authoritative for its actions and parameters; do not guess fields. All browser work must use the injected tools directly so session ownership, cancellation, attachments, observation UI, and cleanup remain intact. Do not invoke another process to control the browser.

Mandatory workflow

Every task owns a bounded plugin session:

browser_session({ action: "start", ... })
... use the returned sessionId for browser work ...
browser_session({ action: "stop", session: sessionId })

Pass the session explicitly when more than one exists. Never guess or reuse an id owned by another program. Stop in a finally-style path on success and failure unless the user explicitly asks to keep the session open. Stopping also returns borrowed tabs.

Work toward one observable goal

  • Derive a concrete success condition from the user's request.
  • Take the shortest purposeful path: observe, act, then make at most one observation to confirm an ambiguous result.
  • Once success is visible, do not click, refresh, navigate, switch tabs, or perform extra checks.
  • If a human-only step appears or two attempts make no progress, request help instead of brute-forcing.

Observe, act, observe

Use browser_inspect action observe as the primary semantic page view. It returns roles, states, text, and @eN refs. Prefer fresh refs over raw selectors. Refs invalidate after navigation and may also become stale after large DOM changes, so observe again before the next interaction.

Use browser_interact for click, hover, scroll-to, focus, blur, fill, select, press and wheel. scroll-to reveals a target and returns its visible border-box bounds in top-level viewport CSS pixels, clipped by ancestors. Partial visibility suffices; hidden/fully clipped targets fail. This does not test occlusion. Use refs for iframe/shadow-root targets; selectors search the main document.

wheel takes signed deltaX/deltaY (one nonzero). Optional target is scrolled into view first; otherwise input lands at the viewport centre. Results echo input, not completed scrolling; observe afterwards.

focus/blur enter or leave focus-triggered states. Hover-only surfaces appear as @e1 button "Products" [hover first: Shoes | Bags]. Items are labels, not refs: hover the trigger, observe, then use the revealed item's ref. Click the trigger only if its action is wanted.

Escalate reading only as needed:

  1. observe for normal understanding and interaction refs.
  2. snapshot when a stricter static accessibility tree is more useful.
  3. html for exact markup or hidden metadata that semantic views cannot provide.
  4. screenshot for layout, styling, canvas, images, or requested visual evidence.

Do not start with raw HTML or screenshots merely to discover ordinary controls. When interaction is needed, obtain a fresh observation before acting on screenshot or HTML findings.

Use browser_page for purposeful navigation, history, reload, or a lifecycle wait. Avoid speculative waits when no navigation is expected. After any page change, discard old refs and observe again.

Respect the Agent Window boundary

Use browser_tabs to list returned tab ids before selecting, closing, borrowing, or returning tabs. Borrow a user tab only for the immediate task, and return it as soon as that step is complete. Never invent a tab id or keep a personal tab borrowed across unrelated work.

Ask the human when needed

Use browser_assist action request-help for login, captcha, OTP, payment confirmation, consent, or another step the user must complete. Give a precise prompt and highlight fresh targets when concrete controls are involved. Use completion criteria only for a clear stable success signal.

Resume only after the user continues or the criteria complete. Treat cancellation as rejection and timeout as a blocker rather than retrying. Observe again after control returns before reasoning about the new state or using refs.

The same tool can resize the Agent Window or emulate a device when the task requires visual or responsive testing. Emulation is scoped to one tab.

Debug and recover without wandering

Use browser_inspect console or network actions only for relevant, bounded, read-only diagnostics. Continue from returned sequence cursors instead of rereading the same buffer.

  • Stale ref: observe again and retry the intended action once.
  • Unknown tab: list tabs instead of guessing.
  • Unknown session: list owned sessions or start one; never try foreign ids.
  • Timeout: inspect current state before deciding whether one longer purposeful wait is useful.
  • Fill result unconfirmed: observe the field first; the page may have formatted the value. Continue if the visible result satisfies the user's intent. Otherwise correct the remaining difference; do not blindly repeat fill or immediately request human help. For other fill errors, follow the returned hint and inspect current state before retrying.
  • Unrecoverable failure: report the blocker and stop the owned session.

Arbitrary page-script evaluation and interaction recording are intentionally unsupported. Do not invent tools or route around those limits.

Version History

  • 7dc8b01 Current 2026-09-11 20:21

    修复 wheel 输入的健壮性并暴露插件 action;新增 scroll-to、focus 和 blur 动作;增强对取消和截止时间的保护。

  • 020fb32 2026-09-08 20:57

    修复填充功能:支持背景输入和自动追加内容

  • 945bf15 2026-09-02 23:02

    精简 Agent 指令,移除冗余的 CLI 命令表与标志目录,降低 Token 消耗;明确会话生命周期、核心工作流及关键标志绑定规则,提升执行效率与准确性。

  • 554861d 2026-08-27 23:26

Same Skill Collection

crates/bsk-cli/skill/SKILL.md
skill/SKILL.md

Metadata

Files
0
Version
7dc8b01
Hash
ad4f3bbf
Indexed
2026-08-27 23:26

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-21 10:13
浙ICP备14020137号-1