Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计提醒

run-agent-browser运行 Agent 浏览器

Agent Skill

run-agent-browser 用于处理浏览器自动化、网页检查和页面信息提取,适合在 Codex、Claude、Cursor、Gemini CLI 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

734

周安装

30

GitHub Stars

5

下载量

235
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:run-agent-browser(运行 Agent 浏览器)
来源仓库:https://github.com/yigitkonur/skills-by-yigitkonur
仓库路径:skills/run-agent-browser
安装命令:
npx skills add https://github.com/yigitkonur/skills-by-yigitkonur --skill run-agent-browser
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yigitkonur/skills-by-yigitkonur --skill run-agent-browser

简介

run-agent-browser 用于处理浏览器自动化、网页检查和页面信息提取。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中让 Agent 打开页面、读取网页或验证前端流程。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Browser Automation with agent-browser

Use this skill when the task should be executed through the agent-browser CLI. If the user explicitly wants playwright-cli, use run-playwright instead. If the task is diagnosis in DevTools rather than browser automation, use the relevant debug skill.

Trigger boundaries

Use this skill for:

  • terminal-driven browser automation with agent-browser
  • form filling, login flows, data extraction, screenshots, and DOM-grounded web app checks
  • multi-tab or multi-session workflows where ref snapshots and deterministic verification matter

Do not use this skill for:

  • tasks explicitly asking for playwright-cli, Browserbase browse, or another browser CLI
  • static research that does not require active browser interaction
  • DevTools-first debugging or profiling unless the task still centers on agent-browser

Non-negotiable operating rules

  1. Observe before acting. After open, navigation, tab switch, popup, frame change, or major click, wait for state and run snapshot -i before choosing the next action.
  2. Reuse the current session by default. Do not spawn a new session just because you changed pages.
  3. Prefer a new tab over a new window. Use window new only when the site or task truly requires a separate window.
  4. Track focus before every action. Know the active tab, URL, and title before clicking or typing.
  5. Verify after every meaningful interaction. Check URL, title, text, value, visibility, checked state, or diff snapshot before assuming success.
  6. Treat DOM evidence as the source of truth. Screenshots are supporting evidence for layout, failures, or human review.
  7. Close only what you opened. Leave pre-existing tabs, windows, and reusable sessions alone unless the user asked to close them.
  8. Keep output scoped. Prefer snapshot -i, scoped snapshots, --json, get text, and get attr over verbose full-page output.

Default loop: observe → act → verify → clean up

1) Establish session and baseline

  • Verify agent-browser is available before your first command. Run agent-browser --version (or npx agent-browser --version). If the command is not found, install with npm install -g agent-browser (pin a specific version in production — see references/safety.md).
  • If the first real browser command fails because Chromium is missing, run agent-browser install once, then retry the same command. Treat browser-binary installation as part of the happy path, not a troubleshooting detour.
  • If you may be joining an existing browser context, inspect it first:
agent-browser tab
agent-browser get url
agent-browser get title
agent-browser snapshot -i
  • Reuse the default session for a single continuous task.
  • Use --session SESSION_NAME only for isolated concurrent work.
  • Use --session-name SESSION_NAME only when deliberate persistence across runs is valuable and safe.
  • Use --profile PATH for permanent authentication persistence without manual save/load. When set globally (config.json or env var), all sessions automatically retain cookies, IndexedDB, service workers, and cache across browser restarts and reboots. See references/authentication.md#persistent-profiles.
  • Use --auto-connect to import authentication from a running Chrome session the user is already logged into — fastest way to bootstrap auth for one-off tasks. See references/authentication.md#import-auth-from-your-browser.

2) Navigate or focus the correct page

  • Open the target URL or switch to the correct tab.
  • Local fixtures are valid targets. For local HTML or PDF files, use an absolute file:///... URL and add --allow-file-access when needed:
agent-browser --allow-file-access open "file:///absolute/path/to/fixture.html"
  • After any focus change, verify focus immediately:
agent-browser tab
agent-browser get url
agent-browser get title
agent-browser snapshot -i
  • Never assume a newly opened tab, popup, or site-driven redirect left you on the expected page.

3) Inspect before interacting

  • Use snapshot -i first. Note: snapshot -i shows only interactive elements (links, buttons, inputs, checkboxes). Non-interactive text (headings, paragraphs, spans) is invisible in this view.
  • Use snapshot -i --json when you need structured extraction or machine-readable branching logic. The JSON schema is {success, data: {origin, refs: {refId: {name, role,...}}, snapshot: string}, error} — access refs via .data.refs, not .elements[].
  • For data extraction from non-interactive text, use get text CSS_SELECTOR (must match exactly one element) or eval --stdin with a heredoc for multi-element extraction.
  • If expected UI elements are missing from snapshot -i, the page may use custom components (dropdowns, popovers, accordions) whose children only appear after clicking the trigger. Click the likely trigger → re-snapshot → verify new elements appeared.
  • Use screenshot --annotate only when visual layout, canvas content, or element disambiguation matters.
  • Selector priority:

1. @refs from snapshot -i 2. semantic find 3. CSS selectors 4. XPath only as a last resort

4) Interact one state change at a time

  • Prefer small, verifiable steps over long blind chains.
  • Chain commands only when you do not need intermediate output.
  • After any action that can change DOM or focus, wait and re-snapshot before reusing refs.
  • Refs are invalid after navigation, SPA route changes, modal expansion, dynamic loading, tab switching, and many form submissions.
  • Use agent-browser back (not go back) to return to the previous page. Prefer back over re-navigating with open URL to preserve history. Treat it like a navigation event: re-snapshot after.
  • Note: check and uncheck return the new checked state (true/false) rather than ✓ Done. This is expected.

5) Verify the result before moving on

Use at least one deterministic check after each major interaction:

  • agent-browser get url
  • agent-browser get title
  • agent-browser get text REF_OR_SELECTOR — selector must match exactly one element; for multiple matches use eval --stdin with JS
  • agent-browser get value REF_OR_SELECTOR
  • agent-browser is visible REF
  • agent-browser is checked REF — works for both checkboxes and radio buttons
  • agent-browser diff snapshot
  • If snapshot -i returns (no interactive elements) (e.g. after form submission to a raw response page), verify with get text body for page content or get url / get title for navigation confirmation.
  • For visual verification or archival: agent-browser screenshot /tmp/descriptive-name.png

Capture screenshots only when you need:

  • visual evidence for a human
  • layout or styling confirmation
  • failure triage
  • annotated element mapping

6) Clean up deliberately

  • If you opened auxiliary tabs, close them with agent-browser tab close INDEX (get the index from tab listing) and return to the original tab.
  • If you started isolated sessions, close those sessions when their work is done.
  • If you used persisted state or state files, secure them and avoid leaving secrets behind.
  • If you opened a fresh disposable default session for the task, close it at the end.

Session, tab, and window hygiene

Session choice

  • Same task, same auth context: stay in the current or default session.
  • Concurrent or role-separated work: use named --session sessions.
  • Intentional long-lived login reuse across runs: use --session-name, auth, or state save/load.
  • Permanent auth persistence without manual save/load: use --profile (set globally via config.json {"profile": "~/.myapp"} or AGENT_BROWSER_PROFILE env var).

Tab and window rules

  • Prefer tab new URL for side routes, docs, exports, or OAuth flows that should not disturb the current page.
  • Prefer switching back to the original tab instead of reopening pages from scratch.
  • Use window new only if the site truly requires a separate window or the user asked for one.
  • After tab new, tab INDEX, or any action that opens a popup or new tab, verify focus with tab, get url, get title, then snapshot -i.
  • Treat tab switches like navigation for ref lifecycle purposes: re-snapshot after every switch.

Cleanup rules

  • Record which tab or session you started in.
  • Record which tabs, windows, or sessions you created.
  • Close only the ones you created.
  • If the browser context pre-existed, leave it in a sane state and avoid shutting it down unnecessarily.

Do this, not that

Do thisNot that
Reuse the current session when the task stays in the same auth and state contextStart a brand-new session for every page
Open a new tab for side work, then verify focusSpawn unnecessary windows or assume the new tab is active
Run snapshot -i before interaction and after every major changeReuse stale refs after navigation or tab switches
Use get text, get value, is visible, diff snapshot, and URL/title checksTreat screenshots as the only proof an action worked
Use snapshot -i --json or targeted getters for extractionPull huge raw outputs when a narrow query would do
Use eval --stdin heredoc for multi-element data extractionUse inline eval "..." with complex JS (shell escaping breaks)
Use agent-browser back to return to previous pageRe-navigate with open URL (loses form state and history)
Scope snapshots with -s on complex pagesParse through 100+ flat elements looking for the right ref
Close only tabs and sessions you createdBlindly run agent-browser close on a shared or reusable context

Recovery paths

  • Ref not found or wrong element: re-check focus, then snapshot -i again. If the page changed, old refs are stale. If the page is crowded, scope the snapshot or use find.
  • Multiple elements match a CSS selector: get text CSS_SELECTOR requires exactly one match (strict mode). For multi-element extraction, use eval --stdin with a heredoc to run a JS query: agent-browser eval --stdin <<'EVALEOF' Array.from(document.querySelectorAll('.item-title')).map(el => el.textContent.trim()).slice(0, 10); EVALEOF
  • Unexpected redirect or login screen: verify URL and title first, then decide whether to load saved state, use auth vault, or continue with a login flow.
  • Slow or flaky page: use explicit waits, increase timeout if needed, then re-snapshot.
  • Too much snapshot output: use snapshot -i, snapshot -i --json, scoped snapshots, or targeted getters instead of full page dumps.
  • Stale daemon or broken session: try agent-browser close; if that fails, follow references/troubleshooting.md.
  • Sensitive operations needed: before eval, downloads, state persistence, storage writes, cookies, network routing, or unsafe flags, read references/safety.md and narrow scope first.

Minimal reference routing

NeedRead
Install, config, environment setupreferences/installation.md
Core commands, check-state commands, tabs, windows, diffreferences/commands.md
Ref lifecycle, scoped snapshots, stale-ref recoveryreferences/snapshot-refs.md
Session reuse, named sessions, persistence, cleanupreferences/session-management.md
Login flows, auth vault, saved statereferences/authentication.md
Safe automation boundaries and sensitive-command policyreferences/safety.md
Observe and verify loops, DOM-evidence validation, extraction patternsreferences/workflows.md
Stale daemon, timeout, and focus-related failuresreferences/troubleshooting.md
Proxies, stealth, cloud browsers, extensions, iOS, profiling, videoreferences/proxy-support.md, references/stealth-automation.md, references/advanced.md, references/profiling.md, references/video-recording.md
Ready-made shell starting pointstemplates/ai-agent-workflow.sh, templates/form-automation.sh, templates/authenticated-session.sh, templates/e2e-test-workflow.sh, templates/capture-workflow.sh

Minimal reading sets

Form or login automation

  • references/snapshot-refs.md
  • references/authentication.md
  • references/commands.md

Multi-tab, popup, or session-heavy work

  • references/session-management.md
  • references/commands.md
  • references/troubleshooting.md

Data extraction or verification

  • references/snapshot-refs.md (JSON schema, snapshot limitations, scoped snapshots)
  • references/workflows.md (multi-element extraction pattern, hidden UI discovery)
  • references/commands.md (get text, get count, eval --stdin, find commands)

Safe or production-like automation

  • references/safety.md
  • references/session-management.md
  • references/workflows.md

Final reminder

This SKILL.md is the steering layer. Keep the live loop disciplined:

  1. establish session and focus
  2. observe (snapshot -i for interaction, get text/eval for extraction)
  3. act (one state change, then verify)
  4. verify (URL, title, text, value, diff snapshot)
  5. record evidence only as needed (screenshot for visual proof)
  6. clean up only what you changed (tab close INDEX, close)

Key rules to internalize:

  • snapshot -i hides non-interactive text -- use get text or eval --stdin for data extraction
  • CSS selectors in get text must match exactly one element -- use eval --stdin for multiples
  • eval --stdin <<'EVALEOF' heredoc is the safe JS execution pattern
  • diff snapshot is the correct diff form (not bare diff)
  • back works (not go back)
  • Refs expire after any page/DOM change -- always re-snapshot

When in doubt, stop acting, inspect state again, and route into the smallest relevant reference instead of guessing.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.91%
按下载量换算82

Claude

29.2%
按下载量换算69

Cursor

17.51%
按下载量换算41

Gemini CLI

8.96%
按下载量换算21

安全审计

Gen Agent Trust Hub

可疑

Socket

可疑

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills