Agent Browser Automation
БесплатноБез исполняемых скриптовНе проверенFast Rust-based headless browser automation CLI with Node.js fallback for AI agents, featuring navigation, clicking, typing, snapshots, and structured…
Об этом скилле
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
- Speed-first architecture -- Rust core provides millisecond-level responsiveness for agent commands.
- Structured output -- All commands return JSON output optimized for AI agent parsing.
- Fallback resilience -- Automatically falls back to Node.js implementation when Rust binary is unavailable.
- Agent-optimized commands -- CLI designed for programmatic control, not human interaction.
- Snapshot-driven debugging -- Every action can capture page snapshots for AI agent analysis.
Installation
# 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
# 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:
{
"success": true,
"url": "https://example.com",
"title": "Example Domain",
"loadTime": 234,
"timestamp": "2024-02-12T10:30:00Z"
}
Clicking Elements
# 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:
{
"success": true,
"element": "button#submit",
"action": "click",
"timestamp": "2024-02-12T10:30:01Z"
}
Typing Input
# Type into input field
agent-browser type --selector "input#email" --text "[email protected]"
# 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:
{
"success": true,
"element": "input#email",
"action": "type",
"length": 17,
"timestamp": "2024-02-12T10:30:02Z"
}
Taking Snapshots
# 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:
{
"success": true,
"format": "png",
"path": "screenshot.png",
"size": 245678,
"dimensions": {
"width": 1280,
"height": 720
},
"timestamp": "2024-02-12T10:30:03Z"
}
Extracting Data
# 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:
{
"success": true,
"selector": "h1.title",
"results": [
{
"text": "Welcome to Our Site",
"visible": true
}
],
"count": 1,
"timestamp": "2024-02-12T10:30:04Z"
}
Waiting for Elements
# 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:
{
"success": true,
"condition": "element_visible",
"selector": ".loading-complete",
"waited": 1234,
"timestamp
Установить Agent Browser Automation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Agent Browser Automation?
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.
Как установить скилл Agent Browser Automation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Agent Browser Automation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic