agentleFS
AlperGuvenAlperGuven/TRAE-Skills/.agents/skills/agent-browser/SKILL.md

agent-browser

Skill3 starsChanged 43 days agoMITView on GitHub

Browser automation via the agent-browser CLI to open pages, snapshot the accessibility tree, click elements, fill forms and capture screenshots. Use when verifying a running UI, reproducing a frontend bug, or running a lightweight E2E check.

  • Reads credentials
  • Installs packages

189 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use time-skill, 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.
  • 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 6 projects that use this

  • axiom-desuSkill

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

  • axiom-desuSkill

    feature-boundary-planner

    Map a ZCode behavior change to current UI surfaces, state owners, protocol commands, persistence, and validation. Use for impact analysis, product-boundary planning, or an implementation handoff grounded in the checked-out source.

    Also in 6 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 5 projects that use this

  • nicepkgSkill

    ph-community-outreach

    Engage Reddit, Indie Hackers, Hacker News and other communities for Product Hunt launches. Use this skill to identify relevant communities, craft appropriate posts, and drive cross-platform engagement without appearing spammy.

    Also in 5 projects that use this

  • Cartograf666Skill

    architecture-governance

    Bootstrap, document, enforce, and review a project's architecture through layer responsibilities, dependency direction, architecture manifests, legacy baselines, Change Envelopes, cross-layer approval policy, and deterministic architecture checks. Use when starting a project, auditing an existing codebase, planning cross-layer work, preventing architecture erosion, reviewing structural changes, or deciding whether implementation may expand into another layer.

    Also in 6 projects that use this

  • +4 more from nicepkg

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 174 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    No Node.js/Playwright dependency needed for the daemon

    line 211

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

Native Rust CLI for browser automation. Lightweight alternative to Playwright.

Setup

npm install -g agent-browser
agent-browser install  # First time only

Core Commands

CommandDescription
agent-browser open <url>Navigate to URL
agent-browser snapshotGet accessibility tree with refs
agent-browser screenshot [path]Take screenshot
agent-browser click <sel>Click element
agent-browser fill <sel> <text>Fill input
agent-browser closeClose browser
agent-browser find <criteria>Find element by role/text/label
agent-browser keyboard type <key>Send keyboard input
agent-browser scroll <direction> <px>Scroll page
agent-browser mouse <action>Mouse operations (move, down, up, wheel)

Trae Sandbox Notes

In sandbox environment, ~/.agent-browser socket directory has write permission issues. Use this prefix for all commands:

# Prefix every command with HOME=/tmp:
HOME=/tmp agent-browser <command>

# Examples:
HOME=/tmp agent-browser open http://localhost:5173
HOME=/tmp agent-browser snapshot
HOME=/tmp agent-browser click @e5

Combobox/Dropdown Click Issue

click @ref may not work on Bootstrap custom select dropdown options. Solutions:

# Solution 1: find with text match
HOME=/tmp agent-browser find text "Kg" click

# Solution 2: nth for specific selection (when multiple matches exist)
HOME=/tmp agent-browser find nth 1 text "Kg" click

# Solution 3: Keyboard navigation
HOME=/tmp agent-browser click @e44              # Open combobox
HOME=/tmp agent-browser keyboard type "key ArrowDown"  # First option
HOME=/tmp agent-browser keyboard type "Enter"           # Select

Verification Strategy

# After each step, check snapshot
HOME=/tmp agent-browser snapshot | grep "validation message"

# Take screenshot if unsure
HOME=/tmp agent-browser screenshot ./test-step-X.png

# Refs may change - check each time
HOME=/tmp agent-browser snapshot | grep -A 5 "element name"

# Check dialog content
HOME=/tmp agent-browser snapshot | grep -A 30 "dialog"

Selector Types

  • Ref: @e1, @e2 (from snapshot)
  • CSS: #id, .class, button
  • Text: button:has-text("Submit")
  • Role: find role button click --name "Submit"
  • Text match: find text "Kg" click
  • Nth selection: find nth 1 text "Kg" click

Usage Flow

  1. Open and close browser

    # Close existing browser if any
    HOME=/tmp agent-browser close --all 2>/dev/null; sleep 1
    
    # Open page
    HOME=/tmp agent-browser open http://localhost:5173/retailer/application/create
  2. Inspect elements

    HOME=/tmp agent-browser snapshot  # Shows refs like @e1, @e2
  3. Interact

    HOME=/tmp agent-browser click @e5                      # Click by ref
    HOME=/tmp agent-browser find text "Kg" click           # Click by text
    HOME=/tmp agent-browser fill @e10 "value"             # Fill input
    HOME=/tmp agent-browser scroll down 300                # Scroll
  4. Verify

    HOME=/tmp agent-browser screenshot ./test-step-X.png   # Screenshot
    HOME=/tmp agent-browser snapshot | grep "message"     # Content check
  5. Cleanup
    HOME=/tmp agent-browser close

Examples

Retailer Panel - Login

HOME=/tmp agent-browser close --all 2>/dev/null; sleep 1
HOME=/tmp agent-browser open http://localhost:5173/login
HOME=/tmp agent-browser snapshot

# Form fields (refs may change, check with snapshot)
HOME=/tmp agent-browser fill input[type='email'] "$E2E_RETAILER_EMAIL"
HOME=/tmp agent-browser fill input[type='password'] "$E2E_RETAILER_PASSWORD"
HOME=/tmp agent-browser click "button[type='submit']"

# Check redirect after login
sleep 2
HOME=/tmp agent-browser screenshot ./retailer-login.png
HOME=/tmp agent-browser snapshot | head -20

Retailer Panel - Add Product

HOME=/tmp agent-browser open http://localhost:5173/retailer/application/create
HOME=/tmp agent-browser snapshot

# Find and click "Add product" button
HOME=/tmp agent-browser find text "Add product" click
sleep 1

# Check if modal opened
HOME=/tmp agent-browser screenshot ./modal-open.png
HOME=/tmp agent-browser snapshot | grep -A 30 "dialog"

# Search product
HOME=/tmp agent-browser click @e49  # Product search box
HOME=/tmp agent-browser type @e49 "wheat"
sleep 1
HOME=/tmp agent-browser find text "Wheat" click

# Select brand (while dropdown is open)
HOME=/tmp agent-browser find text "Brand" click
sleep 1
HOME=/tmp agent-browser find nth 1 text "Abalim" click

# Select unit
HOME=/tmp agent-browser find text "Unit" click
sleep 1
HOME=/tmp agent-browser find text "Kg" click

# Fill quantity and price
HOME=/tmp agent-browser fill @e45 "10"
HOME=/tmp agent-browser fill @e46 "100"

# Verify form
HOME=/tmp agent-browser snapshot | grep "Add"
HOME=/tmp agent-browser screenshot ./product-form-filled.png

Admin Panel - Login

Credentials must come from the environment, never from the skill file.

# Exported in the shell session or read from a git-ignored .env
# E2E_ADMIN_EMAIL=...
# E2E_ADMIN_PASSWORD=...

HOME=/tmp agent-browser close --all 2>/dev/null; sleep 1
HOME=/tmp agent-browser open http://localhost:5173/admin/login
HOME=/tmp agent-browser fill input[type='email'] "$E2E_ADMIN_EMAIL"
HOME=/tmp agent-browser fill input[type='password'] "$E2E_ADMIN_PASSWORD"
HOME=/tmp agent-browser click "button[type='submit']"
sleep 2
HOME=/tmp agent-browser screenshot ./admin-login.png

Requirements

  • Chrome for Testing (agent-browser install)
  • No Node.js/Playwright dependency needed for the daemon

Troubleshooting

ProblemSolution
Socket permission errorUse HOME=/tmp agent-browser
Element not foundCheck ref with snapshot
Click not workingTry find text or keyboard
Dropdown not openingClick on combobox first, then use find text to select option
Form not submittingCheck validation messages (snapshot | grep "required")

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.