agentleFS
kivo360kivo360/OmoiOS/.claude/skills/agent-browser/SKILL.md

agent-browser

Skill79 starsChanged 10 months agoApache-2.0View on GitHub

Headless browser automation CLI for AI agents. Use for web scraping, testing, form filling, screenshots, and any browser interaction. Triggers: "browse", "open website", "click button", "fill form", "screenshot", "scrape", "test login flow", "automate browser", "web automation".

172 other projects use a version of this, 26 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use architecture-governance, 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.
  • ZCodium-projectSkill

    architecture-governance

    Apply the repository's architecture policy to code changes by generating a bounded context package, checking module and layer boundaries, and reporting baseline-aware violations. Use for any code change; skip for documentation-only work.

    Also in 4 projects that use this

  • ZCodium-projectSkill

    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 4 projects that use this

  • 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 4 projects that use this

  • Recepay6358Skill

    weather-fetcher

    Instructions for fetching current weather temperature data for Dubai, UAE from Open-Meteo API

    Also in 4 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 3 projects that use this

  • nicepkgSkill

    financial-unit-economics

    Use when evaluating business model viability, analyzing profitability per customer/product/transaction, validating startup metrics (CAC, LTV, payback period), making pricing decisions, assessing scalability, comparing business models, or when user mentions unit economics, CAC/LTV ratio, contribution margin, customer profitability, break-even analysis, or needs to determine if a business can be profitable at scale.

    Also in 3 projects that use this

  • +1 more from ZCodium-project
  • +1 more from Recepay6358
  • +3 more from nicepkg

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 157 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use refs with @ prefix: agent-browser click @e2

    line 44
  2. Distinctive:

    When refs aren't available:

    line 214
  3. Very specific:

    Use wait after actions: - Ensure page state settles

    line 235
  4. Distinctive:

    Save auth state: - Avoid repeated login flows

    line 238

“Common” is measured: kept by at least 6 in 10 of the 157 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

agent-browser

CLI browser automation optimized for AI. Use refs from snapshots for reliable element selection. 93% less context than Playwright MCP, 95% first-try success rate.

Core Workflow

agent-browser open <url>           # Navigate
agent-browser snapshot -i          # Get interactive elements with refs
agent-browser click @e2            # Click by ref
agent-browser fill @e3 "text"      # Fill by ref
agent-browser snapshot -i          # Re-snapshot after changes
agent-browser close                # Close browser

Snapshot (Most Important)

Get accessibility tree with element refs for deterministic selection:

agent-browser snapshot              # Full tree
agent-browser snapshot -i           # Interactive only (buttons, inputs, links)
agent-browser snapshot -c           # Compact (no empty elements)
agent-browser snapshot -d 3         # Limit depth
agent-browser snapshot -i -c --json # Combine for AI parsing

Output example:

- heading "Example Domain" [ref=e1]
- button "Submit" [ref=e2]
- textbox "Email" [ref=e3]

Use refs with @ prefix: agent-browser click @e2

Essential Commands

Navigation

agent-browser open <url>            # Go to URL
agent-browser back                  # Go back
agent-browser forward               # Go forward
agent-browser reload                # Reload page

Interaction

agent-browser click @ref            # Click element
agent-browser fill @ref "text"      # Clear and fill input
agent-browser type @ref "text"      # Type into element
agent-browser press Enter           # Press key
agent-browser select @ref "value"   # Select dropdown option
agent-browser check @ref            # Check checkbox
agent-browser hover @ref            # Hover element
agent-browser scroll down 500       # Scroll (up/down/left/right)

Get Info

agent-browser get text @ref         # Get text content
agent-browser get value @ref        # Get input value
agent-browser get title             # Page title
agent-browser get url               # Current URL

Check State

agent-browser is visible @ref       # Check visibility
agent-browser is enabled @ref       # Check if enabled
agent-browser is checked @ref       # Check if checked

Wait

agent-browser wait @ref             # Wait for element visible
agent-browser wait 2000             # Wait milliseconds
agent-browser wait --text "Welcome" # Wait for text
agent-browser wait --load networkidle  # Wait for network idle

Screenshot/Output

agent-browser screenshot            # Base64 to stdout
agent-browser screenshot page.png   # Save to file
agent-browser screenshot --full     # Full page
agent-browser pdf output.pdf        # Save as PDF

Testing Patterns

Login Flow Test

agent-browser open https://app.example.com/login
agent-browser snapshot -i
# Identify: textbox "Email" [ref=e1], textbox "Password" [ref=e2], button "Sign In" [ref=e3]
agent-browser fill @e1 "test@example.com"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --url "**/dashboard"
agent-browser snapshot -i  # Verify dashboard loaded
agent-browser get text @e1  # Verify welcome message

Form Submission Test

agent-browser open https://app.example.com/contact
agent-browser snapshot -i
agent-browser fill @e1 "John Doe"          # Name field
agent-browser fill @e2 "john@example.com"  # Email field
agent-browser fill @e3 "Hello world"       # Message field
agent-browser click @e4                     # Submit button
agent-browser wait --text "Thank you"       # Verify success message
agent-browser snapshot -i                   # Confirm state

Authentication State (Reuse Login)

# Save auth after login
agent-browser open https://app.example.com/login
agent-browser snapshot -i && agent-browser fill @e1 "user@test.com"
agent-browser fill @e2 "password" && agent-browser click @e3
agent-browser wait --load networkidle
agent-browser state save auth.json          # Save cookies/storage

# Reuse in later tests
agent-browser state load auth.json          # Load saved state
agent-browser open https://app.example.com/dashboard  # Already logged in

E2E Workflow Test

# Test complete user journey
agent-browser open https://shop.example.com
agent-browser snapshot -i

# Search for product
agent-browser fill @e1 "laptop"  # Search box
agent-browser click @e2          # Search button
agent-browser wait --load networkidle
agent-browser snapshot -i

# Add to cart
agent-browser click @e5          # First product
agent-browser wait --load networkidle
agent-browser snapshot -i
agent-browser click @e3          # Add to cart button
agent-browser wait --text "Added to cart"

# Checkout
agent-browser click @e4          # Cart icon
agent-browser snapshot -i
agent-browser click @e2          # Checkout button
agent-browser wait --url "**/checkout"

Visual Regression

agent-browser open https://app.example.com/component
agent-browser wait --load networkidle
agent-browser screenshot baseline.png --full
# Make changes, then compare
agent-browser screenshot current.png --full

Error State Testing

agent-browser open https://app.example.com/form
agent-browser snapshot -i
agent-browser click @e5  # Submit without filling required fields
agent-browser wait 500
agent-browser snapshot -i  # Capture error states
agent-browser get text @e1  # Verify error message text

Parallel Testing with Sessions

# Run tests in isolated sessions
agent-browser --session test1 open https://app.example.com/feature-a
agent-browser --session test2 open https://app.example.com/feature-b

# Each session has separate cookies/storage
agent-browser --session test1 snapshot -i
agent-browser --session test2 snapshot -i

# List active sessions
agent-browser session list

Debugging Tests

agent-browser open url --headed     # See browser window
agent-browser console               # View console messages
agent-browser errors                # View page errors
agent-browser highlight @e3         # Highlight element visually
agent-browser trace start           # Record trace
# ... run test steps ...
agent-browser trace stop trace.zip  # Save for analysis

CSS/Text Selectors (Alternative)

When refs aren't available:

agent-browser click "#submit"
agent-browser click ".btn-primary"
agent-browser click "text=Sign In"
agent-browser find role button click --name "Submit"

Options

FlagDescription
--session <name>Use isolated session
--jsonJSON output (for parsing)
--headedShow browser window
--fullFull page screenshot

Best Practices for Testing

  1. Always snapshot first - Get refs before interacting
  2. Use wait after actions - Ensure page state settles
  3. Re-snapshot after navigation - Refs change between pages
  4. Use --json for assertions - Parse structured output
  5. Save auth state - Avoid repeated login flows
  6. Use sessions for parallel tests - Isolated browser instances
  7. Use --headed for debugging - See what's happening

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.