Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/magic3007/dotfiles/web-accessnpx skills add magic3007/dotfiles --skill web-accessgit clone --depth 1 https://github.com/magic3007/dotfilesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/magic3007/dotfiles/web-access)<a href="https://agentmods.dev/skills/magic3007/dotfiles/web-access"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/web-access.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00089 | $0.04628 |
| Opus 5 | $0.00044 | $0.02314 |
| Sonnet 5 | $0.00018 | $0.00926 |
| Haiku 4.5 | $0.00009 | $0.00463 |
Grade B, and why
web-access scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
curl -s -X POST --data-raw 'https://example.com' http://localhost:3456/new Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
| URL 已知,需要原始 HTML 源码(meta、JSON-LD 等结构化字段) | **curl** | This is a copy
95% identical to web-access — 534 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 266 lines — stays where its author put it; the contents beside it link to each section on GitHub.
web-access Skill
前置检查
在开始联网操作前,先检查 CDP 模式可用性:
node "${CLAUDE_SKILL_DIR}/scripts/check-deps.mjs"
Node.js 22+ 必需(使用原生 WebSocket)。
按脚本输出处理:
exit 0→ 继续exit 2→ 需询问用户偏好,写入${CLAUDE_SKILL_DIR}/config.env的WEB_ACCESS_BROWSERexit 1→ 按 stdout 错误信息处理。若提示包含「Agent 处理顺序」,按其步骤执行(如先用系统命令打开浏览器后重跑),自动可解则不打扰用户;仍失败再向用户求助
支持参数 --browser <chrome|edge> 表达本次临时覆盖(不写 config.env)。
切换浏览器时,proxy 是长驻进程,需先 pkill -f cdp-proxy.mjs 再重跑 check-deps。
检查通过后并必须在回复中向用户直接展示以下须知,再启动 CDP Proxy 执行操作:
温馨提示:部分站点对浏览器自动化操作检测严格,存在账号封禁风险。已内置防护措施但无法完全避免,Agent 继续操作即视为接受。
浏览哲学
像人一样思考,兼顾高效与适应性的完成任务。
执行任务时不会过度依赖固有印象所规划的步骤,而是带着目标进入,边看边判断,遇到阻碍就解决,发现内容不够就深入——全程围绕「我要达成什么」做决策。这个 skill 的所有行为都应遵循这个逻辑。
① 拿到请求 — 先明确用户要做什么,定义成功标准:什么算完成了?需要获取什么信息、执行什么操作、达到什么结果?这是后续所有判断的锚点。
② 选择起点 — 根据任务性质、平台特征、达成条件,选一个最可能直达的方式作为第一步去验证。一次成功当然最好;不成功则在③中调整。比如,需要操作页面、需要登录态、已知静态方式不可达的平台(小红书、微信公众号等)→ 直接 CDP
③ 过程校验 — 每一步的结果都是证据,不只是成功或失败的二元信号。用结果对照①的成功标准,更新你对目标的判断:路径在推进吗?结果的整体面貌(质量、相关度、量级)是否指向目标可达?发现方向错了立即调整,不在同一个方式上反复重试——搜索没命中不等于"还没找对方法",也可能是"目标不存在";API 报错、页面缺少预期元素、重试无改善,都是在告诉你该重新评估方向。遇到弹窗、登录墙等障碍,判断它是否真的挡住了目标:挡住了就处理,没挡住就绕过——内容可能已在页面 DOM 中,交互只是展示手段。
④ 完成判断 — 对照定义的任务成功标准,确认任务完成后才停止,但也不要过度操作,不为了"完整"而浪费代价。
联网工具选择
- 确保信息的真实性,一手信息优于二手信息:搜索引擎和聚合平台是信息发现入口。当多次搜索尝试后没有质的改进时,升级到更根本的获取方式:定位一手来源(官网、官方平台、原始页面)。
| 场景 | 工具 |
|---|---|
| 搜索摘要或关键词结果,发现信息来源 | WebSearch |
| URL 已知,需要从页面定向提取特定信息 | WebFetch(拉取网页内容,由小模型根据 prompt 提取,返回处理后结果) |
| URL 已知,需要原始 HTML 源码(meta、JSON-LD 等结构化字段) | curl |
| 非公开内容,或已知静态层无效的平台(小红书、微信公众号等公开内容也被反爬限制) | 浏览器 CDP(直接,跳过静态层) |
| 需要登录态、交互操作,或需要像人一样在浏览器内自由导航探索 | 浏览器 CDP |
浏览器 CDP 不要求 URL 已知——可从任意入口出发,通过页面内搜索、点击、跳转等方式找到目标内容。WebSearch、WebFetch、curl 均不处理登录态。
Jina(可选预处理层,可与 WebFetch/curl 组合使用,由于其特性可节省 tokens 消耗,请积极在任务合适时组合使用):第三方网络服务,可将网页转为 Markdown,大幅节省 token 但可能有信息损耗。调用方式为 r.jina.ai/example.com(URL 前加前缀,不保留原网址 http 前缀),限 20 RPM。适合文章、博客、文档、PDF 等以正文为核心的页面;对数据面板、商品页等非文章结构页面可能提取到错误区块。
进入浏览器层后,/eval 就是你的眼睛和手:
- 看:用
/eval查询 DOM,发现页面上的链接、按钮、表单、文本内容——相当于「看看这个页面有什么」 - 做:用
/click点击元素、/scroll滚动加载、/eval填表提交——像人一样在页面内自然导航 - 读:用
/eval提取文字内容,判断图片/视频是否承载核心信息——是则提取媒体 URL 定向读取或/screenshot视觉识别
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- .claude-plugin/marketplace.json 463 B
- .claude-plugin/plugin.json 474 B
- .gitignore 66 B
- README.md 10 KB
- references/cdp-api.md 4.4 KB
- references/migration-2.5.3.md 4.4 KB
- references/site-patterns/.gitkeep 0 B
- scripts/browser-discovery.mjs 6.1 KB runs code
- scripts/cdp-proxy.mjs 25 KB runs code
- scripts/check-deps.mjs 8.2 KB runs code
- scripts/find-url.mjs 11 KB runs code
- scripts/match-site.mjs 1.6 KB runs code
- templates/config.env.template 390 B
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 266 lines · 89 tokens per session scan B 3c8ec65ec678
web-access is a skill published in the GitHub repository magic3007/dotfiles (11 stars, last pushed yesterday), licensed MIT. It adds 89 tokens to every session and 4,628 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). It is 95% identical to web-access, differing in 534 lines, and is treated as a copy.
Other skills, from other repositories
walkthrough
Generate a hands-on browser walkthrough of a PR's user-facing changes to exercise before review; --publish posts the final version to the PR for QA.
git-commit
Create a new git commit for staged changes. Use when the user asks to commit staged changes with an auto-generated Conventional Commits message, or when Claude Code itself wants to run git commit.
distill-page
Extract distilled page content as Markdown using Chromium's on-device ML page content annotation.
github-pr-create
Create a pull request with an auto-generated description. Use when the user asks to open a PR for the current branch's changes.
inspect-malicious-code
Inspect a project for potentially malicious code (malware, spyware, etc.) using static analysis only. Use when the user asks to audit a project or dependency for malicious or suspicious code.
verify-git-command-location
Verify that the correct git binary is in use, especially when running under WSL with a Windows filesystem. Use the first time a git command is executed in a session.