AgentSkillsCN

browser-task

统筹协调多工具协作的浏览器任务:先搜索再导航、先登录再下载、跨多页交互等。当代理需要执行以下操作时可派上用场:(1) 先搜索目标网站并与其互动;(2) 登录或填写表单;(3) 在多页间穿梭,精准定位目标内容;(4) 从动态页面中提取下载链接。对于简单场景:静态页面可使用 webfetch,已知文件 URL 则可直接调用 curl。

SKILL.md
--- frontmatter
name: browser-task
description: "Orchestrates browser tasks requiring multi-tool coordination: search-then-navigate, login-then-download, multi-page interactions. Use when the agent needs to: (1) Search for a website then interact with it, (2) Login or fill forms, (3) Navigate multiple pages to find a target, (4) Extract download links from dynamic pages. For simple cases: use webfetch for static pages, curl for known file URLs."

BrowserTask

Complete complex browser tasks requiring multi-step, multi-tool coordination.

Available Tools

ToolCapabilityUse When
Search toolsFind trusted URLsTarget website unknown
webfetchFetch page content/HTMLStatic pages, parse links
agent-browserBrowser interactionClick, fill forms, login, dynamic content
curlDownload filesFile URL is known

Core Principles

  1. Search first, never guess URLs - Use search tools to get trusted URLs
  2. Right tool for the job - agent-browser for interaction, curl for download
  3. Extract link then download - agent-browser cannot download files directly; extract href then use curl

Standard Download Pattern

code
Search/known URL -> agent-browser navigate to download page -> get download button href -> curl download

Key commands:

bash
# Get download button's link
agent-browser get attr @download-button href

# Or use webfetch to get HTML and parse
webfetch <url> --format html

agent-browser Key Points

For detailed commands, load agent-browser skill. Common usage:

  • agent-browser open <url> - Open page
  • agent-browser snapshot -i - Get interactive elements
  • agent-browser click @e1 - Click element
  • agent-browser get attr @e1 href - Get link attribute

Important Notes

  • agent-browser is slow to start; use webfetch/curl when possible
  • Search results are more reliable than guessed URLs
  • Always use curl for file downloads, never attempt with agent-browser