claude-code-best-practice-zh: Skill for Claude Code

.claude/skills/agent-browser/SKILL.md

agent-browser is a skill for Claude Code from BuaaJoseph/claude-code-best-practice-zh. It costs 113 tokens per session (1,921 once invoked), scanned A, a copy of agent-browser, MIT.

A command-line skill for controlling a web browser through an AI agent. It can navigate pages, inspect interactive elements, enter text, click controls, take screenshots, extract information, and test web applications.

In plain words
What is it for?
Use it for browser-based tasks such as opening sites, filling forms, selecting options, clicking buttons, checking results, collecting page data, and testing interfaces.
Why use it?
It replaces manual browser steps with repeatable commands and element references. Snapshots after page changes help the agent confirm that the intended page state was reached.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is BuaaJoseph/claude-code-best-practice-zh's own configuration. It tells Claude Code how to work on claude-code-best-practice-zh itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-best-practice-zh configures →

Reuse

Borrowing it

Nothing to install: this file belongs to BuaaJoseph/claude-code-best-practice-zh. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/BuaaJoseph/claude-code-best-practice-zh/master/.claude/skills/agent-browser/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/BuaaJoseph/claude-code-best-practice-zh

Made for: Claude Code.

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 agent-browser

README.md
[![agentmods](https://agentmods.dev/badge/skills/buaajoseph/claude-code-best-practice-zh/agent-browser.svg)](https://agentmods.dev/skills/buaajoseph/claude-code-best-practice-zh/agent-browser)
Your own site
<a href="https://agentmods.dev/skills/buaajoseph/claude-code-best-practice-zh/agent-browser"><img src="https://agentmods.dev/badge/skills/buaajoseph/claude-code-best-practice-zh/agent-browser.svg" alt="Measured on agentmods" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,921 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.
Origin 94% copy Near-identical to another mod 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.00113 $0.01921
Opus 5 $0.00056 $0.00960
Sonnet 5 $0.00023 $0.00384
Haiku 4.5 $0.00011 $0.00192

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

Security

Grade A, and why

agent-browser 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 7d 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.

Origin

This is a copy

94% identical to agent-browser — 88 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.

.claude/skills/agent-browser/SKILL.md · 218 lines

How it starts

The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.

使用 agent-browser 进行浏览器自动化

核心工作流

每个浏览器自动化都遵循以下模式:

  1. 导航agent-browser open <url>
  2. 快照agent-browser snapshot -i(获取元素引用如 @e1@e2
  3. 交互:使用引用进行点击、填充、选择
  4. 重新快照:导航或DOM变化后,获取新的引用
agent-browser open https://example.com/form
agent-browser snapshot -i
# 输出: @e1 [input type="email"], @e2 [input type="password"], @e3 [button] "Submit"

agent-browser fill @e1 "[email protected]"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -i  # 检查结果

常用命令

# 导航
agent-browser open <url>              # 导航(别名:goto, navigate)
agent-browser close                   # 关闭浏览器

# 快照
agent-browser snapshot -i             # 带引用的交互元素(推荐)
agent-browser snapshot -i -C          # 包含光标交互元素(带有onclick、cursor:pointer的div)
agent-browser snapshot -i -C          # 包含光标交互元素(带有onclick、cursor:pointer的div)
agent-browser snapshot -s "#selector" # 限定在CSS选择器范围内

# 交互(使用快照中的 @ref)
agent-browser click @e1               # 点击元素
agent-browser fill @e2 "text"           # 清除并输入文本
agent-browser type @e2 "text"          # 输入文本不清除
agent-browser select @e1 "option"      # 选择下拉选项
agent-browser check @e1                # 勾选复选框
agent-browser press Enter             # 按键
agent-browser scroll down 500          # 滚动页面

# 获取信息
agent-browser get text @e1            # 获取元素文本
agent-browser get url                 # 获取当前URL
agent-browser get title               # 获取页面标题

# 等待
agent-browser wait @e1                # 等待元素
agent-browser wait --load networkidle # 等待网络空闲
agent-browser wait --url "**/page"    # 等待URL模式
agent-browser wait 2000               # 等待毫秒数

# 捕获
agent-browser screenshot              # 截图到临时目录
agent-browser screenshot --full       # 整页截图
agent-browser pdf output.pdf          # 保存为PDF

常见模式

表单提交

agent-browser open https://example.com/signup
agent-browser snapshot -i
agent-browser fill @e1 "Jane Doe"
agent-browser fill @e2 "[email protected]"
agent-browser select @e3 "California"
agent-browser check @e4
agent-browser click @e5
agent-browser wait --load networkidle

Read the full file on GitHub · 218 lines

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. 7d ago First seen · 218 lines · 113 tokens per session scan A a9e0dc121194

Subscribe to this mod's changes

agent-browser is a skill published in the GitHub repository BuaaJoseph/claude-code-best-practice-zh (2 stars, last pushed 4mo ago), licensed MIT. It adds 113 tokens to every session and 1,921 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to agent-browser, differing in 88 lines, and is treated as a copy.

Related

Other skills, from other repositories

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

interactive-login

How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.

yc-software/qm · 46 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

azure-messaging-webpubsub-java

Build real-time web applications with Azure Web PubSub SDK for Java. Use when implementing WebSocket-based messaging, live updates, chat applications, or server-to-client push notifications.

microsoft/skills · 43 tokens

google-safe-browsing

Prevent and fix Google Safe Browsing "Dangerous site" flags. Use when launching a public web app, buying/picking a domain, building a login or signup page, or when any site shows a red "Dangerous site" / "Deceptive site" warning in Chrome, Brave, Safari, Firefox, or Edge. Triggers on "dangerous site", "deceptive…

davidondrej/skills · 105 tokens