agentleFS
full-stack-skillsfull-stack-skills/agent-skills/skills/agent-browser/SKILL.md

agent-browser

Skill2 starsChanged 54 days agoApache-2.0View on GitHub

A comprehensive skill for using agent-browser, a CLI tool for browser automation designed for AI agents, developed by Vercel Labs. This skill covers installation, core commands, selectors (refs, CSS, XPath, semantic locators), agent mode, sessions, options, and best practices. Use this skill whenever the user needs to automate browser interactions via CLI commands, especially for AI agents that need to interact with web pages.

188 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use time-skill, dep-refs and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Recepay6358Skill

    time-skill

    Display the current time in Pakistan Standard Time (PKT, UTC+5). Use when the user asks for the current time, Pakistan time, or PKT.

    Also in 6 projects that use this

  • betacatslingSkill

    dep-refs

    Use when needs to inspect TypeScript export references in the z-code workspace, list exports from a file, verify whether an export is unused before deletion, investigate who imports a symbol during refactors, or combine pnpm knip unused-export results with pnpm dep:refs symbol-level reference tracing.

    Also in 5 projects that use this

  • betacatslingSkill

    feature-boundary-planner

    Map a ZCode behavior change to current UI surfaces, state owners, protocol commands, persistence, and validation. Use for impact analysis, product-boundary planning, or an implementation handoff grounded in the checked-out source.

    Also in 5 projects that use this

  • nicepkgSkill

    community-led-growth

    Expert in community-led growth (CLG) - leveraging user communities to drive acquisition, retention, and expansion. Covers building developer communities, user groups, ambassador programs, and turning customers into advocates. Knows the difference between community as a feature vs community as a growth engine, and how to measure community ROI. Use when "community-led, CLG, ambassador program, champion program, user community, developer community, word of mouth, user group, " mentioned.

    Also in 5 projects that use this

  • nicepkgSkill

    ph-community-outreach

    Engage Reddit, Indie Hackers, Hacker News and other communities for Product Hunt launches. Use this skill to identify relevant communities, craft appropriate posts, and drive cross-platform engagement without appearing spammy.

    Also in 5 projects that use this

  • Recepay6358Skill

    weather-svg-creator

    Creates an SVG weather card showing the current temperature for Dubai. Writes the SVG to orchestration-workflow/weather.svg and updates orchestration-workflow/output.md.

    Also in 6 projects that use this

  • +3 more from nicepkg

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. 0 are common, 11 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 172 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill whenever the user wants to:

    line 8
  2. Distinctive:

    Use browser automation for AI agents

    line 10
  3. Distinctive:

    Use refs-based element selection for deterministic automation

    line 12
  4. Distinctive:

    Use semantic locators for more reliable element selection

    line 16
  5. Distinctive:

    Use authenticated sessions with custom headers

    line 20
  6. Distinctive:

    Reference API documentation: when needed:

    line 77
  7. Distinctive:

    Follow the instructions, syntax, and best practices in that file

    line 97
  8. Distinctive:

    Use Refs: Prefer refs (@e1, @e2) over traditional selectors for deterministic automation

    line 112
  9. Distinctive:

    Snapshot First: Always snapshot before interacting with elements to get refs

    line 113
  10. Very specific:

    Agent Mode: Use --json flag for machine-readable output in agent mode

    line 114
  11. Very specific:

    Session Management: Use --session to maintain state across commands

    line 115
  12. Very specific:

    Interactive Snapshot: Use -i flag for interactive snapshot selection

    line 116
  13. Distinctive:

    Semantic Locators: Use semantic locators (role/name) when refs are not available

    line 117
  14. Distinctive:

    Error Handling: Check command exit codes and error messages

    line 118
  15. Very specific:

    Headed Mode: Use --headed for debugging, headless for production

    line 120
  16. Very specific:

    CDP Integration: Use --cdp for Chrome DevTools Protocol integration

    line 121
  17. Very specific:

    Streaming: Use AGENT_BROWSER_STREAM_PORT for live browser preview

    line 122
  18. Very specific:

    Authenticated Sessions: Use --headers for authentication without login flows

    line 123
  19. Very specific:

    Custom Executable: Use --executable-path for serverless deployments or custom browsers

    line 124

“Common” is measured: kept by at least 6 in 10 of the 172 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

When to use this skill

Use this skill whenever the user wants to:

  • Automate browser interactions via CLI commands
  • Use browser automation for AI agents
  • Navigate websites and interact with pages using command-line tools
  • Use refs-based element selection for deterministic automation
  • Integrate browser automation into AI agent workflows
  • Capture snapshots of web pages with accessibility trees
  • Fill forms, click elements, and extract content via CLI
  • Use semantic locators for more reliable element selection
  • Work with browser automation in agent mode with JSON output
  • Manage multiple browser sessions
  • Debug browser automation with headed mode
  • Use authenticated sessions with custom headers
  • Connect to existing browsers via CDP
  • Stream browser viewport for live preview

How to use this skill

This skill is organized to match the agent-browser official documentation structure (https://github.com/vercel-labs/agent-browser/blob/main/README.md). When working with agent-browser:

  1. Install agent-browser:
    • Load examples/getting-started/installation.md for installation instructions
  2. Quick Start:
    • Load examples/quick-start/quick-start.md for basic workflow examples
  3. Learn core commands:
    • Load examples/commands/basic-commands.md for basic commands (open, click, fill, etc.)
    • Load examples/commands/advanced-commands.md for advanced commands (snapshot, eval, etc.)
    • Load examples/commands/get-info/ for information retrieval commands
    • Load examples/commands/check-state/ for state checking commands
    • Load examples/commands/find-elements/ for semantic locator commands
    • Load examples/commands/wait/ for wait commands
    • Load examples/commands/mouse-control/ for mouse control commands
    • Load examples/commands/browser-settings/ for browser configuration
    • Load examples/commands/cookies-storage/ for cookies and storage management
    • Load examples/commands/network/ for network interception
    • Load examples/commands/tabs-windows/ for tab and window management
    • Load examples/commands/frames/ for iframe handling
    • Load examples/commands/dialogs/ for dialog handling
    • Load examples/commands/debug/ for debugging commands
    • Load examples/commands/navigation/ for navigation commands
    • Load examples/commands/setup/ for setup commands
  4. Understand selectors:
    • Load examples/selectors/refs.md for refs-based selection (@e1, @e2, etc.)
    • Load examples/selectors/traditional-selectors.md for CSS, XPath, and semantic locators
  5. Use agent mode:
    • Load examples/agent-mode/introduction.md for agent mode overview
    • Load examples/agent-mode/optimal-workflow.md for optimal AI workflow
    • Load examples/agent-mode/integration.md for integrating with AI agents
  6. Advanced features:
    • Load examples/advanced/sessions.md for session management
    • Load examples/advanced/headed-mode.md for debugging with visible browser
    • Load examples/advanced/authenticated-sessions.md for authentication via headers
    • Load examples/advanced/custom-executable.md for custom browser executable
    • Load examples/advanced/cdp-mode.md for Chrome DevTools Protocol integration
    • Load examples/advanced/streaming.md for browser viewport streaming
    • Load examples/advanced/architecture.md for architecture overview
    • Load examples/advanced/platforms.md for platform support
    • Load examples/advanced/usage-with-agents.md for AI agent integration patterns
  7. Configure options:
    • Load examples/options/global-options.md for global CLI options
    • Load examples/options/snapshot-options.md for snapshot-specific options
    • Load examples/options/session-options.md for session management options
  8. Reference API documentation when needed:
    • api/commands.md - Complete command reference
    • api/selectors.md - Selector reference
    • api/options.md - Options reference
  9. Use templates for quick start:
    • templates/basic-automation.md - Basic automation workflow
    • templates/ai-agent-workflow.md - AI agent workflow template

Doc mapping (one-to-one with official documentation)

Examples and Templates

This skill includes detailed examples organized to match the official documentation structure. All examples are in the examples/ directory (see mapping above).

To use examples:

  • Identify the topic from the user's request
  • Load the appropriate example file from the mapping above
  • Follow the instructions, syntax, and best practices in that file
  • Adapt the code examples to your specific use case

To use templates:

  • Reference templates in templates/ directory for common scaffolding
  • Adapt templates to your specific needs and coding style

API Reference

  • Commands API: api/commands.md - Complete command reference with syntax and examples
  • Selectors API: api/selectors.md - Selector types and usage reference
  • Options API: api/options.md - All options reference

Best Practices

  1. Use Refs: Prefer refs (@e1, @e2) over traditional selectors for deterministic automation
  2. Snapshot First: Always snapshot before interacting with elements to get refs
  3. Agent Mode: Use --json flag for machine-readable output in agent mode
  4. Session Management: Use --session to maintain state across commands
  5. Interactive Snapshot: Use -i flag for interactive snapshot selection
  6. Semantic Locators: Use semantic locators (role/name) when refs are not available
  7. Error Handling: Check command exit codes and error messages
  8. Wait for Navigation: Commands automatically wait for navigation to complete
  9. Headed Mode: Use --headed for debugging, headless for production
  10. CDP Integration: Use --cdp for Chrome DevTools Protocol integration
  11. Streaming: Use AGENT_BROWSER_STREAM_PORT for live browser preview
  12. Authenticated Sessions: Use --headers for authentication without login flows
  13. Custom Executable: Use --executable-path for serverless deployments or custom browsers
  14. Snapshot Options: Combine -i, -c, -d, -s options to optimize snapshot output

Resources

Keywords

agent-browser, CLI browser automation, AI agents, browser automation CLI, refs, snapshot, agent mode, semantic locators, browser automation tool, command-line browser, AI agent browser, deterministic selectors, accessibility tree, browser commands, web automation CLI, sessions, headed mode, authenticated sessions, CDP mode, streaming, Chrome DevTools Protocol, Playwright, browser automation for AI

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.