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: Content Capture Workflow# Purpose: Extract content from web pages (text, screenshots, PDF)# Usage: ./capture-workflow.sh <url> [output-dir]## Outputs:#   - page-full.png: Full page screenshot#   - page-structure.txt: Page element structure with refs#   - page-text.txt: All text content#   - page.pdf: PDF version## Optional: Load auth state for protected pages set -euo pipefail TARGET_URL="${1:?Usage: $0 <url> [output-dir]}"OUTPUT_DIR="${2:-.}" echo "Capturing: $TARGET_URL"mkdir -p "$OUTPUT_DIR" # Optional: Load authentication state# if [[ -f "./auth-state.json" ]]; then#     echo "Loading authentication state..."#     agent-browser state load "./auth-state.json"# fi # Navigate to targetagent-browser open "$TARGET_URL"agent-browser wait --load load # Get metadataTITLE=$(agent-browser get title)URL=$(agent-browser get url)echo "Title: $TITLE"echo "URL: $URL" # Capture full page screenshotagent-browser screenshot --full "$OUTPUT_DIR/page-full.png"echo "Saved: $OUTPUT_DIR/page-full.png" # Get page structure with refsagent-browser snapshot -i > "$OUTPUT_DIR/page-structure.txt"echo "Saved: $OUTPUT_DIR/page-structure.txt" # Extract all text contentagent-browser get text body > "$OUTPUT_DIR/page-text.txt"echo "Saved: $OUTPUT_DIR/page-text.txt" # Save as PDFagent-browser pdf "$OUTPUT_DIR/page.pdf"echo "Saved: $OUTPUT_DIR/page.pdf" # Optional: Extract specific elements using refs from structure# agent-browser get text @e5 > "$OUTPUT_DIR/main-content.txt" # Optional: Handle infinite scroll pages# for i in {1..5}; do#     agent-browser scroll down 1000#     agent-browser wait 1000# done# agent-browser screenshot --full "$OUTPUT_DIR/page-scrolled.png" # Cleanupagent-browser close echo ""echo "Capture complete:"ls -la "$OUTPUT_DIR"