agent-browser_skill

This skill enables AI agents to automate web tasks using a Playwright-based browser, facilitating browsing, form filling, scraping, and interactions.
  • Shell

391

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill dmmulroy/.dotfiles --skill agent-browser

  • SKILL.md12.1 KB

Overview

This skill is a Playwright-based browser automation CLI designed for AI agents to browse, interact with, and scrape the web from the terminal. It pairs a fast Rust CLI with a Node.js daemon that maintains a persistent browser instance for rapid subsequent commands. The workflow centers on snapshots that produce deterministic refs for reliable, AI-friendly element selection.

How this skill works

The Rust CLI parses commands and delegates browser control to a long-lived Node.js daemon that runs Playwright. Snapshot commands output an accessibility tree annotated with refs like @e1 which map to cached role/name locators; subsequent actions reference those refs to avoid expensive DOM queries. Sessions isolate browser contexts, and the daemon supports navigation, interactions, network routing, screenshots, storage, tracing, and headless or headed modes.

When to use it

  • Automating login, form submission, or multi-step web flows from a script or agent
  • Scraping structured content where accessibility roles yield stable selectors
  • Filling forms, uploading files, or testing UI interactions programmatically
  • Running parallel, isolated browser sessions for multiple agents or tests
  • Mocking or intercepting network responses for deterministic testing

Best practices

  • Always run snapshot after navigation or DOM changes to refresh refs
  • Prefer refs from snapshot over CSS/XPath for deterministic, AI-friendly targeting
  • Use fill for atomic input replacement and type only when preserving existing text
  • Use semantic waits (--text, --url, --load, --fn) instead of fixed timeouts
  • Persist auth state at browser launch (state save/load) to reuse sessions reliably

Example use cases

  • Login automation: open page, snapshot -i, fill credentials using refs, click submit, wait for dashboard, save auth state
  • Form submission pipeline: snapshot to parse refs, fill fields, select options, check boxes, click submit, and wait for success text
  • Data scraping: snapshot page, extract text or attributes via refs or eval JS, export results in JSON
  • End-to-end testing: run sequences of clicks, waits, and assertions across isolated sessions for parallel test runs
  • API mocking: use network route to provide deterministic responses for front-end testing without backend changes

FAQ

Refs are generated from the accessibility snapshot and map to cached role/name locators, making them deterministic and faster than repeated DOM queries with CSS or XPath.

When should I start or stop the daemon?

The daemon auto-starts on first command and stays alive for fast subsequent operations; use the close command to shut down the browser and daemon when finished.

How do I run multiple isolated browser contexts?

Use --session <name> or the AGENT_BROWSER_SESSION env var; each session has its own browser, storage, history, and auth state.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational