core

Core agent-browser usage guide. Read this before running any agent-browser commands. Covers the snapshot-and-ref workflow, navigating pages, interacting with elements (click, fill, type, select), extracting text and data, taking screenshots, managing tabs, handling forms and auth, waiting for content, running multiple browser sessions in parallel, and troubleshooting common failures. Use when the user asks to interact with a website, fill a form, click something, extract data, take a screenshot, log into a site, test a web app, or automate any browser task.

Install
npx skills add 'https://github.com/vercel-labs/agent-browser/tree/main/skill-data/core'
Download bundle ↓
main · aff6125Scanned 2026-09-17

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗
View on GitHub
← Back to SKILL.md
#!/bin/bash# Template: Form Automation Workflow# Purpose: Fill and submit web forms with validation# Usage: ./form-automation.sh <form-url>## This template demonstrates the snapshot-interact-verify pattern:# 1. Navigate to form# 2. Snapshot to get element refs# 3. Fill fields using refs# 4. Submit and verify result## Customize: Update the refs (@e1, @e2, etc.) based on your form's snapshot output set -euo pipefail FORM_URL="${1:?Usage: $0 <form-url>}" echo "Form automation: $FORM_URL" # Step 1: Navigate to formagent-browser open "$FORM_URL"agent-browser wait --load domcontentloadedagent-browser wait --fn "Array.from(document.querySelectorAll('input:not([type=hidden]), textarea, select')).some((el) => { const style = getComputedStyle(el); return !el.disabled && !el.readOnly && style.display !== 'none' && style.visibility !== 'hidden' && el.getClientRects().length > 0; })" # Step 2: Snapshot to discover form elementsecho ""echo "Form structure:"agent-browser snapshot -i # Step 3: Fill form fields (customize these refs based on snapshot output)## Common field types:#   agent-browser fill @e1 "John Doe"           # Text input#   agent-browser fill @e2 "user@example.com"   # Email input#   agent-browser fill @e3 "SecureP@ss123"      # Password input#   agent-browser select @e4 "Option Value"     # Dropdown#   agent-browser check @e5                     # Checkbox#   agent-browser click @e6                     # Radio button#   agent-browser fill @e7 "Multi-line text"   # Textarea#   agent-browser upload @e8 /path/to/file.pdf # File upload## Uncomment and modify:# agent-browser fill @e1 "Test User"# agent-browser fill @e2 "test@example.com"# agent-browser click @e3  # Submit button # Step 4: Wait for submission# agent-browser wait --url "**/success"  # Or wait for redirect# agent-browser wait --text "Success"     # Or wait for confirmation text # Step 5: Verify resultecho ""echo "Result:"agent-browser get urlagent-browser snapshot -i # Optional: Capture evidenceagent-browser screenshot /tmp/form-result.pngecho "Screenshot saved: /tmp/form-result.png" # Cleanupagent-browser closeecho "Done"