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

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

agent-browser is a skill for Claude Code from clxzl/claude-code-best-practice-cn. It costs 125 tokens per session (1,966 once invoked), scanned A, original, MIT.

A command-line browser automation skill for navigating websites, interacting with page controls, taking screenshots, extracting data, and testing web apps. A command-line tool is operated through typed terminal commands.

In plain words
What is it for?
Use it to open pages, inspect interactive elements, fill fields, click buttons, choose options, press keys, scroll, wait for page loads, and check the resulting page.
Why use it?
It replaces repetitive manual browser actions with a repeatable process based on page snapshots and element references. This helps agents interact with changing pages more reliably.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is clxzl/claude-code-best-practice-cn's own configuration. It tells Claude Code how to work on claude-code-best-practice-cn 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-cn configures →

Reuse

Borrowing it

Nothing to install: this file belongs to clxzl/claude-code-best-practice-cn. 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/clxzl/claude-code-best-practice-cn/main/.claude/skills/agent-browser/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/clxzl/claude-code-best-practice-cn

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/clxzl/claude-code-best-practice-cn/agent-browser.svg)](https://agentmods.dev/skills/clxzl/claude-code-best-practice-cn/agent-browser)
Your own site
<a href="https://agentmods.dev/skills/clxzl/claude-code-best-practice-cn/agent-browser"><img src="https://agentmods.dev/badge/skills/clxzl/claude-code-best-practice-cn/agent-browser.svg" alt="Measured on agentmods" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,966 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 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.00125 $0.01966
Opus 5 $0.00063 $0.00983
Sonnet 5 $0.00025 $0.00393
Haiku 4.5 $0.00013 $0.00197

Measured 7d ago against content hash 58e028de6320, 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.

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

How it starts

The opening of the file, as written. The whole thing — 219 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 # 检查结果


## 基本命令

```bash
# 导航
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 -s "#selector" # 限定到 CSS 选择器范围

# 交互(使用快照中的 @引用)
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 打开 https://example.com/signup
agent-browser 截图 -i
agent-browser 填写 @e1 "Jane Doe"
agent-browser 填写 @e2 "[email protected]"
agent-browser 选择 @e3 "California"
agent-browser 勾选 @e4
agent-browser 点击 @e5
agent-browser 等待网络空闲 --load networkidle

带状态持久化的身份验证

Read the full file on GitHub · 219 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 · 219 lines · 125 tokens per session scan A 58e028de6320

Subscribe to this mod's changes

agent-browser is a skill published in the GitHub repository clxzl/claude-code-best-practice-cn (127 stars, last pushed 3mo ago), licensed MIT. It adds 125 tokens to every session and 1,966 once invoked, about $0.0006 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.

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