New to Claude Skills? Learn how to install them →

ruvnet on GitHub

Browser Automation

Free

Automate web browsing with AI-optimized snapshots.

by ruvnet67.6k stars on ruvnet/ruflo
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Browser Automation does

The Browser Automation skill provides a streamlined way to automate web interactions using agent-browser with AI-optimized snapshots. This skill significantly reduces the context required for interactions, using element references instead of the full Document Object Model (DOM). By leveraging these optimized snapshots, users can automate tasks such as form submissions, data extraction, and navigation with greater efficiency and reliability.

The core workflow is simple yet powerful: it allows users to navigate to a webpage, take a snapshot of interactive elements, and then interact with those elements using concise commands. This process minimizes the amount of data processed, leading to faster execution times and reduced overhead. The skill supports various commands for navigation, interaction, and information retrieval, making it versatile for a range of web automation tasks.

This skill is ideal for developers and designers who require efficient web automation for testing, scraping, or repetitive tasks. Its ability to handle multiple sessions simultaneously allows for complex workflows, such as logging in and scraping data from the same site without interference. The integration with Claude Flow enhances its capabilities, enabling memory storage of successful patterns and hooks for pre- and post-browse actions, which can further streamline automation processes.

Overall, the Browser Automation skill is a robust tool for anyone looking to automate web interactions efficiently. Its focus on AI-optimized snapshots and element references makes it a reliable choice for developers aiming to enhance their web automation workflows.

When to use it

Use this skill when you need to automate web tasks such as form submissions, data extraction, or navigation with minimal overhead.

When not to use it

This skill may not be suitable for complex web applications that require extensive DOM manipulation or for scenarios where full DOM access is necessary.

What you can build with it

Automated Login Flow

Automate the login process on a website by opening the login page, filling in credentials, and waiting for the dashboard to load.

Form Submission Automation

Streamline the submission of contact forms by filling in user details and confirming the submission with a success message.

Data Extraction from Product Listings

Extract product names, prices, and links from an e-commerce site by navigating to the product page and retrieving information using element references.

How to install Browser Automation

View source

1. Install with the skills CLI

npx skills add ruvnet/ruflo/browser --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by ruvnet

Browser Automation Skill

Web browser automation using agent-browser with AI-optimized snapshots. Reduces context by 93% using element refs (@e1, @e2) instead of full DOM.

Core Workflow

# 1. Navigate to page
agent-browser open <url>

# 2. Get accessibility tree with element refs
agent-browser snapshot -i    # -i = interactive elements only

# 3. Interact using refs from snapshot
agent-browser click @e2
agent-browser fill @e3 "text"

# 4. Re-snapshot after page changes
agent-browser snapshot -i

Quick Reference

Navigation

CommandDescription
open <url>Navigate to URL
backGo back
forwardGo forward
reloadReload page
closeClose browser

Snapshots (AI-Optimized)

CommandDescription
snapshotFull accessibility tree
snapshot -iInteractive elements only (buttons, links, inputs)
snapshot -cCompact (remove empty elements)
snapshot -d 3Limit depth to 3 levels
screenshot [path]Capture screenshot (base64 if no path)

Interaction

CommandDescription
click <sel>Click element
fill <sel> <text>Clear and fill input
type <sel> <text>Type with key events
press <key>Press key (Enter, Tab, etc.)
hover <sel>Hover element
select <sel> <val>Select dropdown option
check/uncheck <sel>Toggle checkbox
scroll <dir> [px]Scroll page

Get Info

CommandDescription
get text <sel>Get text content
get html <sel>Get innerHTML
get value <sel>Get input value
get attr <sel> <attr>Get attribute
get titleGet page title
get urlGet current URL

Wait

CommandDescription
wait <selector>Wait for element
wait <ms>Wait milliseconds
wait --text "text"Wait for text
wait --url "pattern"Wait for URL
wait --load networkidleWait for load state

Sessions

CommandDescription
--session <name>Use isolated session
session listList active sessions

Selectors

Element Refs (Recommended)

# Get refs from snapshot
agent-browser snapshot -i
# Output: button "Submit" [ref=e2]

# Use ref to interact
agent-browser click @e2

CSS Selectors

agent-browser click "#submit"
agent-browser fill ".email-input" "test@test.com"

Semantic Locators

agent-browser find role button click --name "Submit"
agent-browser find label "Email" fill "test@test.com"
agent-browser find testid "login-btn" click

Examples

Login Flow

agent-browser open https://example.com/login
agent-browser snapshot -i
agent-browser fill @e2 "user@example.com"
agent-browser fill @e3 "password123"
agent-browser click @e4
agent-browser wait --url "**/dashboard"

Form Submission

agent-browser open https://example.com/contact
agent-browser snapshot -i
agent-browser fill @e1 "John Doe"
agent-browser fill @e2 "john@example.com"
agent-browser fill @e3 "Hello, this is my message"
agent-browser click @e4
agent-browser wait --text "Thank you"

Data Extraction

agent-browser open https://example.com/products
agent-browser snapshot -i
# Iterate through product refs
agent-browser get text @e1  # Product name
agent-browser get text @e2  # Price
agent-browser get attr @e3 href  # Link

Multi-Session (Swarm)

# Session 1: Navigator
agent-browser --session nav open https://example.com
agent-browser --session nav state save auth.json

# Session 2: Scraper (uses same auth)
agent-browser --session scrape state load auth.json
agent-browser --session scrape open https://example.com/data
agent-browser --session scrape snapshot -i

Integration with Claude Flow

MCP Tools

All browser operations are available as MCP tools with browser/ prefix:

  • browser/open
  • browser/snapshot
  • browser/click
  • browser/fill
  • browser/screenshot
  • etc.

Memory Integration

# Store successful patterns
npx @claude-flow/cli memory store --namespace browser-patterns --key "login-flow" --value "snapshot->fill->click->wait"

# Retrieve before similar task
npx @claude-flow/cli memory search --query "login automation"

Hooks

# Pre-browse hook (get context)
npx @claude-flow/cli hooks pre-edit --file "browser-task.ts"

# Post-browse hook (record success)
npx @claude-flow/cli hooks post-task --task-id "browse-1" --success true

Tips

  1. Always use snapshots - They're optimized for AI with refs
  2. Prefer -i flag - Gets only interactive elements, smaller output
  3. Use refs, not selectors - More reliable, deterministic
  4. Re-snapshot after navigation - Page state changes
  5. Use sessions for parallel work - Each session is isolated

Frequently asked questions about Browser Automation

Similar skills