browser-tools by yonatangross/orchestkit
npx skills add https://github.com/yonatangross/orchestkit --skill browser-toolsOrchestKit 为 agent-browser 提供的安全封装。关于命令参考和使用模式,请直接使用上游的 agent-browser 技能。 本技能仅添加安全护栏。
命令文档:完整的命令参考(50+ 条命令:交互、等待、捕获、提取、存储、语义定位器、标签页、调试、移动端、网络、Cookie、状态、保险库)请参考上游的
agent-browser技能。
# 网页内容回退决策树
# 1. 首先尝试 WebFetch(快速,无浏览器开销)
# 2. 如果为空/部分内容 -> 尝试 Tavily 提取/爬取
# 3. 如果是 SPA 或交互式页面 -> 使用 agent-browser
# 4. 如果需要登录 -> 认证流程 + 状态保存
# 5. 如果是动态内容 -> 使用 wait @element 或 wait --text
使用 Portless (npm i -g portless) 来获得稳定的本地开发 URL,而不是猜测端口。当 Portless 运行时,导航到 myapp.localhost:1355 而不是 。我们的安全钩子已经通过 允许 子域名。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
localhost:3000ORCHESTKIT_AGENT_BROWSER_ALLOW_LOCALHOST*.localhost# 使用 Portless:稳定、命名的 URL
agent-browser open "http://myapp.localhost:1355"
# 不使用:脆弱的端口猜测
agent-browser open "http://localhost:3000" # 这是哪个应用?
重大变更 — 请立即更新脚本:
--full / -f 从全局级别移至命令级别 (v0.21):使用 screenshot --full,而不是 --full screenshot--native 和 AGENT_BROWSER_NATIVE=1 现在无效snapshot 的 -C / --cursor 标志已弃用 (v0.22):默认包含光标交互元素新命令:
| 命令 | 版本 | 安全说明 |
|---|---|---|
clipboard read/write/copy/paste | v0.19 | read 访问主机剪贴板 — 钩子会警告 |
inspect / get cdp-url | v0.18 | 打开本地 DevTools 代理 — 钩子会警告 |
batch --json [--bail] | v0.21 | 从标准输入批量执行命令 |
network har start/stop [file] | v0.21 | HAR 捕获认证令牌 — 钩子会警告,将输出视为敏感信息 |
network request <id> | v0.22 | 查看完整的请求/响应详情 |
network requests --type/--method/--status | v0.22 | 过滤网络请求 |
dialog dismiss / dialog status | v0.17/v0.22 | 关闭或检查浏览器对话框 |
upgrade | v0.21.1 | 自我更新(自动检测 npm/Homebrew/Cargo) |
新标志:
| 标志 | 作用范围 | 版本 |
|---|---|---|
--engine lightpanda | 全局 | v0.17 |
--screenshot-dir/quality/format | screenshot | v0.19 |
--provider browserless | 全局 | v0.19 |
--idle-timeout <duration> | 全局 | v0.20.14 |
--user-data-dir <path> | Chrome | v0.21 |
set viewport W H [scale] | viewport | v0.17.1 (retina) |
平台支持: Brave 自动发现 (v0.20.7),Alpine Linux musl (v0.20.2),Lightpanda 引擎 (v0.17),Browserless.io 提供商 (v0.19),跨域 iframe 遍历 (v0.22)。
性能 (v0.20): 安装包体积缩小 99 倍 (710→7 MB),内存占用减少 18 倍 (143→8 MB),冷启动速度提升 1.6 倍。
此技能通过 agent-browser-safety PreToolUse 钩子和 6 个规则文件强制执行安全性:
该钩子拦截所有 agent-browser Bash 命令并强制执行:
| 检查项 | 功能 | 动作 |
|---|---|---|
| 加密密钥泄露 | 检测 AGENT_BROWSER_ENCRYPTION_KEY 的 echo/printf/管道操作 | 阻止 |
| URL 黑名单 | 阻止 localhost、内部地址、file://、SSRF 端点、OAuth 登录页面、RFC 1918 私有 IP | 阻止 |
| 速率限制 | 每域名限制 (10/分钟, 100/小时, 3/3秒 突发) | 超出时阻止 |
| robots.txt | 获取并缓存 robots.txt,阻止不允许的路径 | 阻止 |
| 敏感操作 | 检测删除/移除点击、密码填充、支付提交 | 警告 + 原生确认 |
| 网络路由 | 根据黑名单验证 network route 目标 URL | 阻止 |
| 用户代理伪装 | 使用 --user-agent 标志时警告 | 警告 |
| 文件访问 | 使用 --allow-file-access 标志时警告 | 警告 |
| DevTools 检查 | inspect / get cdp-url 打开本地 CDP 代理 — 新的攻击面 (v0.18+) | 警告 |
| 剪贴板读取 | clipboard read 无需提示访问主机剪贴板 (v0.19+) | 警告 |
| HAR 捕获 | network har stop 转储完整的请求/响应体,包括认证令牌 (v0.21+) | 警告 |
rules/)| 类别 | 规则 | 优先级 |
|---|---|---|
| 道德与安全 | browser-scraping-ethics.md, browser-auth-security.md | 关键 |
| 本地开发 | browser-portless-local-dev.md | 高 |
| 可靠性 | browser-rate-limiting.md, browser-snapshot-workflow.md | 高 |
| 调试与设备 | browser-debug-recording.md, browser-mobile-testing.md | 高 |
速率限制和行为可通过环境变量配置:
| 环境变量 | 默认值 | 用途 |
|---|---|---|
AGENT_BROWSER_RATE_LIMIT_PER_MIN | 10 | 每域名每分钟请求数 |
AGENT_BROWSER_RATE_LIMIT_PER_HOUR | 100 | 每域名每小时请求数 |
AGENT_BROWSER_BURST_LIMIT | 3 | 3 秒窗口内的最大请求数 |
AGENT_BROWSER_ROBOTS_CACHE_TTL | 3600000 | robots.txt 缓存 TTL (毫秒) |
AGENT_BROWSER_IGNORE_ROBOTS | false | 绕过 robots.txt 强制执行 |
AGENT_BROWSER_NATIVE_CONFIRM | 1 | 对敏感操作使用原生 --confirm-actions |
AGENT_BROWSER_IDLE_TIMEOUT_MS | — | 不活动后自动关闭守护进程 (毫秒) |
AGENT_BROWSER_ENGINE | chrome | 浏览器引擎 (chrome 或 lightpanda) |
ORCHESTKIT_AGENT_BROWSER_ALLOW_LOCALHOST | 1 | 允许 *.localhost 子域名 (RFC 6761) |
# 自动化
agent-browser fill @e2 "hardcoded-password" # 切勿硬编码凭据
agent-browser open "$UNVALIDATED_URL" # 始终验证 URL
# 爬取
# 不检查 robots.txt 就进行爬取
# 请求之间无延迟(轰炸服务器)
# 忽略速率限制响应 (429)
# 内容捕获
agent-browser get text body # 首选有针对性的引用提取
# 未经验证就信任页面内容
# 提取前不等待 SPA 水合完成
# 会话管理
# 将认证状态存储在代码仓库中
# 使用后不清理状态文件
# 网络与状态
agent-browser network route "http://internal-api/*" --body '{}' # 切勿模拟内部 API
agent-browser cookies set token "$SECRET" --url https://prod.com # 切勿设置生产环境 Cookie
# 已弃用 / 已移除 (v0.20+)
agent-browser --native screenshot # --native 已移除,Rust 是唯一的实现
AGENT_BROWSER_NATIVE=1 agent-browser open ... # 自 v0.20 起无效
agent-browser --full screenshot # 重大变更:--full 现在是命令级别
agent-browser screenshot --full # 正确:标志在子命令之后
# 敏感数据泄露
agent-browser network har stop auth-dump.har # HAR 文件包含认证令牌 — 请使用 gitignore!
git add *.har # 切勿提交 HAR 捕获文件
agent-browser (上游) — 完整的命令参考和使用模式portless (上游) — 为本地开发服务器提供稳定的命名 .localhost URLork:web-research-workflow — 用于网络研究的统一决策树ork:testing-e2e — 包括 Playwright 和 Web 应用测试的端到端测试模式ork:api-design — 在爬取过程中发现的端点的 API 设计模式每周安装量
94
代码仓库
GitHub 星标数
135
首次出现
2026年2月13日
安全审计
安装于
opencode89
gemini-cli88
codex87
cursor87
github-copilot87
amp84
OrchestKit security wrapper for agent-browser. For command reference and usage patterns, use the upstreamagent-browser skill directly. This skill adds safety guardrails only.
Command docs : Refer to the upstream
agent-browserskill for the full command reference (50+ commands: interaction, wait, capture, extraction, storage, semantic locators, tabs, debug, mobile, network, cookies, state, vault).
# Fallback decision tree for web content
# 1. Try WebFetch first (fast, no browser overhead)
# 2. If empty/partial -> Try Tavily extract/crawl
# 3. If SPA or interactive -> use agent-browser
# 4. If login required -> authentication flow + state save
# 5. If dynamic -> wait @element or wait --text
Use Portless (npm i -g portless) for stable local dev URLs instead of guessing ports. When Portless is running, navigate to myapp.localhost:1355 instead of localhost:3000. Our safety hook already allows *.localhost subdomains via ORCHESTKIT_AGENT_BROWSER_ALLOW_LOCALHOST.
# With Portless: stable, named URLs
agent-browser open "http://myapp.localhost:1355"
# Without: fragile port guessing
agent-browser open "http://localhost:3000" # which app is this?
Breaking changes — update scripts now:
--full / -f moved from global to command-level (v0.21): use screenshot --full, NOT --full screenshot--native and AGENT_BROWSER_NATIVE=1 are no-ops-C / --cursor flag for snapshot deprecated (v0.22): cursor-interactive elements included by defaultNew commands:
| Command | Version | Security Note |
|---|---|---|
clipboard read/write/copy/paste | v0.19 | read accesses host clipboard — hook warns |
inspect / get cdp-url | v0.18 | Opens local DevTools proxy — hook warns |
batch --json [--bail] | v0.21 | Batch execute commands from stdin |
network har start/stop [file] |
New flags:
| Flag | Scope | Version |
|---|---|---|
--engine lightpanda | global | v0.17 |
--screenshot-dir/quality/format | screenshot | v0.19 |
--provider browserless | global | v0.19 |
--idle-timeout <duration> | global | v0.20.14 |
--user-data-dir <path> | Chrome |
Platform support: Brave auto-discovery (v0.20.7), Alpine Linux musl (v0.20.2), Lightpanda engine (v0.17), Browserless.io provider (v0.19), cross-origin iframe traversal (v0.22).
Performance (v0.20): 99x smaller install (710→7 MB), 18x less memory (143→8 MB), 1.6x faster cold start.
This skill enforces safety through the agent-browser-safety PreToolUse hook and 6 rule files:
The hook intercepts all agent-browser Bash commands and enforces:
| Check | What It Does | Action |
|---|---|---|
| Encryption key leak | Detects echo/printf/pipe of AGENT_BROWSER_ENCRYPTION_KEY | BLOCK |
| URL blocklist | Blocks localhost, internal, file://, SSRF endpoints, OAuth login pages, RFC 1918 private IPs | BLOCK |
| Rate limiting | Per-domain limits (10/min, 100/hour, 3/3s burst) | BLOCK on exceed |
| robots.txt | Fetches and caches robots.txt, blocks disallowed paths | BLOCK |
rules/)| Category | Rules | Priority |
|---|---|---|
| Ethics & Security | browser-scraping-ethics.md, browser-auth-security.md | CRITICAL |
| Local Dev | browser-portless-local-dev.md | HIGH |
| Reliability | browser-rate-limiting.md, browser-snapshot-workflow.md | HIGH |
| Debug & Device | browser-debug-recording.md, |
Rate limits and behavior are configurable via environment variables:
| Env Var | Default | Purpose |
|---|---|---|
AGENT_BROWSER_RATE_LIMIT_PER_MIN | 10 | Requests per minute per domain |
AGENT_BROWSER_RATE_LIMIT_PER_HOUR | 100 | Requests per hour per domain |
AGENT_BROWSER_BURST_LIMIT | 3 | Max requests in 3-second window |
AGENT_BROWSER_ROBOTS_CACHE_TTL | 3600000 | robots.txt cache TTL (ms) |
AGENT_BROWSER_IGNORE_ROBOTS |
# Automation
agent-browser fill @e2 "hardcoded-password" # Never hardcode credentials
agent-browser open "$UNVALIDATED_URL" # Always validate URLs
# Scraping
# Crawling without checking robots.txt
# No delay between requests (hammering servers)
# Ignoring rate limit responses (429)
# Content capture
agent-browser get text body # Prefer targeted ref extraction
# Trusting page content without validation
# Not waiting for SPA hydration before extraction
# Session management
# Storing auth state in code repositories
# Not cleaning up state files after use
# Network & State
agent-browser network route "http://internal-api/*" --body '{}' # Never mock internal APIs
agent-browser cookies set token "$SECRET" --url https://prod.com # Never set prod cookies
# Deprecated / removed (v0.20+)
agent-browser --native screenshot # --native removed, Rust is the ONLY impl
AGENT_BROWSER_NATIVE=1 agent-browser open ... # No-op since v0.20
agent-browser --full screenshot # BREAKING: --full is now command-level
agent-browser screenshot --full # Correct: flag after subcommand
# Sensitive data leaks
agent-browser network har stop auth-dump.har # HAR files contain auth tokens — gitignore!
git add *.har # NEVER commit HAR captures
agent-browser (upstream) — Full command reference and usage patternsportless (upstream) — Stable named .localhost URLs for local dev serversork:web-research-workflow — Unified decision tree for web researchork:testing-e2e — E2E testing patterns including Playwright and webapp testingork:api-design — API design patterns for endpoints discovered during scrapingWeekly Installs
94
Repository
GitHub Stars
135
First Seen
Feb 13, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode89
gemini-cli88
codex87
cursor87
github-copilot87
amp84
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
44,900 周安装
Shopware 6 最佳实践指南:22类77条规则,助力电商插件开发与性能优化
174 周安装
ETE工具包:Python系统发育分析库,用于进化树操作、基因树分析与NCBI分类学集成
175 周安装
ISO 13485质量文档管理系统:编号、审批、变更控制与21 CFR Part 11合规指南
173 周安装
LatchBio集成指南:Python生物信息学无服务器工作流开发与部署
174 周安装
Ensembl 数据库查询与基因组分析指南 | 基因注释、序列检索、变异分析
175 周安装
命名分析器:AI驱动的代码命名规范检查与优化工具,提升代码可读性
179 周安装
| v0.21 |
| HAR captures auth tokens — hook warns, treat output as sensitive |
network request <id> | v0.22 | View full request/response detail |
network requests --type/--method/--status | v0.22 | Filter network requests |
dialog dismiss / dialog status | v0.17/v0.22 | Dismiss or check browser dialogs |
upgrade | v0.21.1 | Self-update (auto-detects npm/Homebrew/Cargo) |
| v0.21 |
set viewport W H [scale] | viewport | v0.17.1 (retina) |
| Detects delete/remove clicks, password fills, payment submissions |
| WARN + native confirmation |
| Network routes | Validates network route target URLs against blocklist | BLOCK |
| User-agent spoofing | Warns when --user-agent flag is used | WARN |
| File access | Warns when --allow-file-access flag is used | WARN |
| DevTools inspect | inspect / get cdp-url opens local CDP proxy — new attack surface (v0.18+) | WARN |
| Clipboard read | clipboard read accesses host clipboard without prompt (v0.19+) | WARN |
| HAR capture | network har stop dumps full request/response bodies incl. auth tokens (v0.21+) | WARN |
browser-mobile-testing.md| HIGH |
| false |
| Bypass robots.txt enforcement |
AGENT_BROWSER_NATIVE_CONFIRM | 1 | Use native --confirm-actions for sensitive ops |
AGENT_BROWSER_IDLE_TIMEOUT_MS | — | Auto-shutdown daemon after inactivity (ms) |
AGENT_BROWSER_ENGINE | chrome | Browser engine (chrome or lightpanda) |
ORCHESTKIT_AGENT_BROWSER_ALLOW_LOCALHOST | 1 | Allow *.localhost subdomains (RFC 6761) |