360 Secure SkillHub
360 安全技能中心

Browser Read

面向网页抓取失败或需要登录态的页面:先用宿主浏览器导航到目标 URL,再读取本地 extract.js 并以 evaluate 方式注入执行,返回标题、markdown 正文、摘要、作者和站点名,失败时回退为页面纯文本。

bill492
bill492
热度 54.51
最近更新 2026-05-11 17:33:05
分类:自动化依赖:联网浏览搜索 / 读写文件应用场景:工作流 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add browser-read
Metadata
name
browser-read
description
Extract readable content from browser pages as markdown. Use when web_fetch fails (bot protection, auth-required pages, Twitter/X, LinkedIn) and you already have the page open in the browser.

browser-read

Extract readable text from an already-open browser page and return markdown, suitable for pages where web_fetch is blocked or missing auth context.

When to use

  • web_fetch returned an error or empty content.
  • Page requires authentication/cookies/session state available only in the browser.
  • You need text extraction from Twitter/X or LinkedIn timelines/articles where screenshot/OCR was previously used.

When NOT to use

  • web_fetch already returns good markdown/text (faster and cheaper).
  • Purely static pages where normal fetch is sufficient.

Steps

  1. Navigate to the URL with browser navigate.
  2. Read extraction script from ~/clawd/skills/browser-read/extract.js.
  3. Run browser act with kind=evaluate and pass the script contents as fn.
  4. Script returns {title, content, excerpt, byline, siteName, length} where content is markdown.
  5. If extraction fails or returns empty content, script falls back to document.body.innerText.

Example (tool calls)

{
  "action": "navigate",
  "targetId": "...", 
  "url": "https://example.com"
}
{
  "action": "act",
  "targetId": "...",
  "kind": "evaluate",
  "fn": "(() => { ... return {title, content, excerpt, byline, siteName, length}; })()"
}

Notes

  • extract.js is a self-contained IIFE so it can be passed directly as the fn value to browser act.
  • Keep in mind this is a lightweight extractor; it intentionally strips script/style/nav/header/footer/aside/cookie/ad elements before conversion.