browser-automation

browser-automation is a skill for Claude Code, Codex from ntygod/ZhiWei. It costs 30 tokens per session (617 once invoked), scanned A, original, MIT.

A browser-control guide for websites that need JavaScript to load, require a login, or involve actions such as clicking, typing, and submitting forms.

In plain words
What is it for?
Use it to collect data from dynamic websites, access logged-in pages, fill in forms, complete interactive workflows, and capture screenshots for visual checks.
Why use it?
It handles web tasks that a simple page download cannot complete, while reusing the same login session during a multi-step task. It also provides a way for the user to take over when a password or CAPTCHA is needed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to collect data from dynamic websites, access logged-in pages, fill in forms, complete interactive workflows, and capture screenshots for visual checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ntygod/zhiwei/browser-automation
Install

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.

Any agent
npx skills add ntygod/ZhiWei --skill browser-automation
Clone the repo
git clone --depth 1 https://github.com/ntygod/ZhiWei

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for browser-automation

README.md
[![agentmods](https://agentmods.dev/badge/skills/ntygod/zhiwei/browser-automation/github.svg)](https://agentmods.dev/skills/ntygod/zhiwei/browser-automation)
Your own site
<a href="https://agentmods.dev/skills/ntygod/zhiwei/browser-automation"><img src="https://agentmods.dev/badge/skills/ntygod/zhiwei/browser-automation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for browser-automation

Your own site · 80×15
<a href="https://agentmods.dev/skills/ntygod/zhiwei/browser-automation"><img src="https://agentmods.dev/badge/skills/ntygod/zhiwei/browser-automation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 617 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.00617
Opus 5 $0.00015 $0.00309
Sonnet 5 $0.00006 $0.00123
Haiku 4.5 $0.00003 $0.00062

Measured 9d ago against content hash 9c97040601ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

browser-automation scanned grade A with 0 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 9d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/main/resources/skills/browser-automation/SKILL.md · 52 lines

What it actually says

浏览器自动化指南

browser 工具基于 Playwright,做需要 JS 渲染、登录态或交互的网页任务。核心约束:能 web_fetch 搞定的不用 browser;不能交互的用 web_fetch。

适用场景

  • 动态页面抓取(SPA、电商搜索结果、需要 JS 渲染)
  • 登录后才能访问的页面
  • 表单填写与提交
  • 网页截图 / 视觉验证
  • 多步交互流程(点 → 等加载 → 再点)

不适用场景

  • 静态页面抓取(文档 / 博客 / 新闻)→ web_fetch
  • API 接口测试 → api-debugger
  • 桌面应用操作 → desktop-automation
  • 多源搜索 → web_search

工作流

  1. 先判:能 web_fetch 拿到正文 → 用 fetch;JS 渲染 / 登录 / 多步交互 → 用 browser
  2. navigate 开会话:同一任务用相同 sessionId 复用 cookie,避免每次重登
  3. 快照定位snapshot 一次拿截图 + 可交互元素编号;后续 click / input / hover 优先用 index 而非 selector(layout 抖动也稳)
  4. 页面变化后重新 snapshot:导航 / 弹窗 / 异步渲染会让旧 index 失效,必须重新拿
  5. 失败 2 次切策略index 失败 → 改 selector;selector 失败 → 退 web_fetch;fetch 失败 → 让用户接管
  6. 登录墙 / 验证码:观察到 password input、login URL 或人机验证截图时,调 requestHumanTakeover 让用户接管,不要让 LLM 假装填密码
  7. 结束:关键产出 file_write 落盘后 close 释放浏览器资源

详细参考

  • 完整 action 清单(snapshot / requestHumanTakeover)、index/selector fallback、登录墙触发条件、会话模式(LAUNCH/CDP/PERSISTENT)、常见错误:{skill_dir}/references/browser-actions.md
Files

What ships with it

1 file 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.

Changes

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.

  1. 9d ago First seen · 52 lines · 30 tokens per session scan A 9c97040601ec

Subscribe to this mod's changes

browser-automation is a skill published in the GitHub repository ntygod/ZhiWei (138 stars, last pushed 29d ago), licensed MIT. It adds 30 tokens to every session and 617 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.