pramoddutta/qaskills/agent-browser

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Fast Rust-based headless browser automation CLI with Node.js fallback for AI agents, featuring navigation, clicking, typing, snapshots, and structured commands optimized for agent workflows.

Install

npx vskill@latest install pramoddutta/qaskills/agent-browser

SKILL.md

Agent Browser Automation Skill

You are an expert in browser automation using agent-browser, a fast Rust-based CLI tool designed specifically for AI coding agents. When the user asks you to automate browser interactions, perform web scraping, or test web applications, follow these detailed instructions.

Core Principles

  1. Speed-first architecture -- Rust core provides millisecond-level responsiveness for agent commands.
  2. Structured output -- All commands return JSON output optimized for AI agent parsing.
  3. Fallback resilience -- Automatically falls back to Node.js implementation when Rust binary is unavailable.
  4. Agent-optimized commands -- CLI designed for programmatic control, not human interaction.
  5. Snapshot-driven debugging -- Every action can capture page snapshots for AI agent analysis.

Installation

bash
# Install globally via npm
npm install -g agent-browser
# Or use npx without installation
npx agent-browser --version
# Verify installation
agent-browser --help

Project Structure for Agent-Driven Testing

tests/
browser-automation/
scenarios/
login-flow.json
checkout-flow.json
search-navigation.json
snapshots/
login-success.png
cart-state.png
scripts/
run-scenario.sh
batch-test.sh
config/
browser-config.json
viewport-sizes.json

Core Commands

Navigation Commands
bash
# Navigate to URL
agent-browser navigate --url "https://example.com"
# Navigate with custom viewport
agent-browser navigate --url "https://example.com" --viewport "1920x1080"
# Navigate with custom user agent
agent-browser navigate --url "https://example.com" \
--user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X)"
# Navigate and wait for network idle
agent-browser navigate --url "https://example.com" --wait-until "networkidle"

Output:

json
{
"success": true,
"url": "https://example.com",
"title": "Example Domain",
"loadTime": 234,
"timestamp": "2024-02-12T10:30:00Z"
}
Clicking Elements
bash
# Click by selector
agent-browser click --selector "button#submit"
# Click by text content
agent-browser click --text "Sign In"
# Click with coordinate offset
agent-browser click --selector ".dropdown" --offset "10,20"
# Wait for element before clicking
agent-browser click --selector "button.load-more" --wait 5000

Output:

json
{
"success": true,
"element": "button#submit",
"action": "click",
"timestamp": "2024-02-12T10:30:01Z"
}
Typing Input
bash
# Type into input field
agent-browser type --selector "input#email" --text "user@example.com"
# Type with delay between keystrokes (human-like)
agent-browser type --selector "input#search" --text "automation" --delay 50
# Type and press Enter
agent-browser type --selector "input#search" --text "query" --enter
# Clear field before typing
agent-browser type --selector "input#username" --text "newuser" --clear

Output:

json
{
"success": true,
"element": "input#email",
"action": "type",
"length": 17,
"timestamp": "2024-02-12T10:30:02Z"
}
Taking Snapshots
bash
# Full page screenshot
agent-browser snapshot --output "screenshot.png"
# Snapshot specific element
agent-browser snapshot --selector "#content" --output "content.png"
# Snapshot with custom dimensions
agent-browser snapshot --viewport "1920x1080" --output "desktop.png"
# Get page HTML
agent-browser snapshot --format "html" --output "page.html"
# Get page as PDF
agent-browser snapshot --format "pdf" --output "document.pdf"

Output:

json
{
"success": true,
"format": "png",
"path": "screenshot.png",
"size": 245678,
"dimensions": {
"width": 1280,
"height": 720
},
"timestamp": "2024-02-12T10:30:03Z"
}
Extracting Data
bash
# Extract text from element
agent-browser extract --selector "h1.title" --attribute "text"
# Extract attribute value
agent-browser extract --selector "a.link" --attribute "href"
# Extract multiple elements
agent-browser extract --selector "li.item" --all
# Extract as JSON
agent-browser extract --selector ".product-card" --json \
--fields "title:.title,price:.price,image:img@src"

Output:

json
{
"success": true,
"selector": "h1.title",
"results": [
{
"text": "Welcome to Our Site",
"visible": true
}
],
"count": 1,
"timestamp": "2024-02-12T10:30:04Z"
}
Waiting for Elements
bash
# Wait for element to appear
agent-browser wait --selector ".loading-complete" --timeout 10000
# Wait for element to disappear
agent-browser wait --selector ".spinner" --hidden --timeout 5000
# Wait for text to appear
agent-browser wait --text "Success" --timeout 3000
# Wait for custom condition
agent-browser wait --script "document.readyState === 'complete'"

Output:

json
{
"success": true,
"condition": "element_visible",
"selector": ".loading-complete",
"waited": 1234,
"timestamp": "2024-02-12T10:30:05Z"
}

Scenario-Based Automation

Login Flow Example
bash
#!/bin/bash
# login-test.sh
# Navigate to login page
agent-browser navigate --url "https://app.example.com/login"
# Fill email
agent-browser type --selector "input#email" --text "user@example.com"
# Fill password
agent-browser type --selector "input#password" --text "$PASSWORD"
# Click submit
agent-browser click --selector "button[type='submit']"
# Wait for dashboard
agent-browser wait --selector ".dashboard" --timeout 5000
# Take success snapshot
agent-browser snapshot --output "login-success.png"
# Extract user info
agent-browser extract --selector ".user-name" --attribute "text"
E2E Shopping Flow
bash
#!/bin/bash
# checkout-flow.sh
set -e # Exit on any error
echo "Starting checkout flow test..."
# 1. Navigate to product page
agent-browser navigate --url "https://shop.example.com/products/widget-123"
agent-browser wait --selector ".product-details" --timeout 5000
# 2. Add to cart
agent-browser click --selector "button.add-to-cart"
agent-browser wait --text "Added to cart" --timeout 3000
# 3. Open cart
agent-browser click --selector ".cart-icon"
agent-browser wait --selector ".cart-items" --timeout 2000
# 4. Take cart snapshot
agent-browser snapshot --selector ".cart-summary" --output "cart-state.png"
# 5. Proceed to checkout
agent-browser click --text "Proceed to Checkout"
agent-browser wait --selector ".checkout-form" --timeout 5000
# 6. Fill shipping info
agent-browser type --selector "#shipping-name" --text "John Doe"
agent-browser type --selector "#shipping-address" --text "123 Main St"
agent-browser type --selector "#shipping-city" --text "San Francisco"
# 7. Take final snapshot
agent-browser snapshot --output "checkout-complete.png"
echo "Checkout flow completed successfully"

Integration with AI Agent Workflows

TypeScript/JavaScript Integration
typescript
import { execSync } from 'child_process';
interface BrowserResult {
success: boolean;
[key: string]: any;
}
class AgentBrowser {
private baseCommand = 'agent-browser';
async navigate(url: string, options: { viewport?: string; waitUntil?: string } = {}): Promise<BrowserResult> {
const args = [`navigate`, `--url`, `"${url}"`];
if (options.viewport) args.push(`--viewport`, options.viewport);
if (options.waitUntil) args.push(`--wait-until`, options.waitUntil);
return this.exec(args);
}
async click(selector: string, options: { wait?: number; offset?: string } = {}): Promise<BrowserResult> {
const args = [`click`, `--selector`, `"${selector}"`];
if (options.wait) args.push(`--wait`, options.wait.toString());
if (options.offset) args.push(`--offset`, options.offset);
return this.exec(args);
}
async type(selector: string, text: string, options: { delay?: number; enter?: boolean; clear?: boolean } = {}): Promise<BrowserResult> {
const args = [`type`, `--selector`, `"${selector}"`, `--text`, `"${text}"`];
if (options.delay) args.push(`--delay`, options.delay.toString());
if (options.enter) args.push(`--enter`);
if (options.clear) args.push(`--clear`);
return this.exec(args);
}
async snapshot(output: string, options: { format?: string; selector?: string; viewport?: string } = {}): Promise<BrowserResult> {
const args = [`snapshot`, `--output`, `"${output}"`];
if (options.format) args.push(`--format`, options.format);
if (options.selector) args.push(`--selector`, `"${options.selector}"`);
if (options.viewport) args.push(`--viewport`, options.viewport);
return this.exec(args);
}
async extract(selector: string, options: { attribute?: string; all?: boolean; json?: boolean } = {}): Promise<BrowserResult> {
const args = [`extract`, `--selector`, `"${selector}"`];
if (options.attribute) args.push(`--attribute`, options.attribute);
if (options.all) args.push(`--all`);
if (options.json) args.push(`--json`);
return this.exec(args);
}
private exec(args: string[]): BrowserResult {
const command = `${this.baseCommand} ${args.join(' ')}`;
try {
const output = execSync(command, { encoding: 'utf-8' });
return JSON.parse(output);
} catch (error: any) {
return {
success: false,
error: error.message,
command,
};
}
}
}
// Usage example
async function testLoginFlow() {
const browser = new AgentBrowser();
// Navigate
const navResult = await browser.navigate('https://app.example.com/login', {
waitUntil: 'networkidle',
});
if (!navResult.success) {
throw new Error(`Navigation failed: ${navResult.error}`);
}
// Login
await browser.type('#email', 'user@example.com');
await browser.type('#password', process.env.PASSWORD || '', { enter: true });
// Wait for dashboard
await browser.wait('.dashboard', { timeout: 5000 });
// Capture success state
await browser.snapshot('login-success.png');
console.log('Login test completed successfully');
}
Python Integration
python
import json
import subprocess
from typing import Dict, Any, Optional
class AgentBrowser:
def __init__(self, browser_path: str = "agent-browser"):
self.browser_path = browser_path
def navigate(self, url: str, viewport: Optional[str] = None, wait_until: Optional[str] = None) -> Dict[str, Any]:
args = [self.browser_path, "navigate", "--url", url]
if viewport:
args.extend(["--viewport", viewport])
if wait_until:
args.extend(["--wait-until", wait_until])
return self._exec(args)
def click(self, selector: str, wait: Optional[int] = None, offset: Optional[str] = None) -> Dict[str, Any]:
args = [self.browser_path, "click", "--selector", selector]
if wait:
args.extend(["--wait", str(wait)])
if offset:
args.extend(["--offset", offset])
return self._exec(args)
def type(self, selector: str, text: str, delay: Optional[int] = None, enter: bool = False, clear: bool = False) -> Dict[str, Any]:
args = [self.browser_path, "type", "--selector", selector, "--text", text]
if delay:
args.extend(["--delay", str(delay)])
if enter:
args.append("--enter")
if clear:
args.append("--clear")
return self._exec(args)
def snapshot(self, output: str, format: Optional[str] = None, selector: Optional[str] = None) -> Dict[str, Any]:
args = [self.browser_path, "snapshot", "--output", output]
if format:
args.extend(["--format", format])
if selector:
args.extend(["--selector", selector])
return self._exec(args)

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 85 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
118
Repository forks
6
7-day trend score
24

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 13 May 2026, 5 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/pramoddutta/qaskills/agent-browser/badge)](https://verified-skill.com/skills/pramoddutta/qaskills/agent-browser)

Something wrong with this skill or its page? Tell us.