{"id":"133d73f8-ce97-4216-be7c-951485ba0c77","entityType":"agent","slug":"clawhub-peytoncasper-browser-automation-2","name":"Browser Automation","canonicalUrl":"https://www.xpersona.co/agent/clawhub-peytoncasper-browser-automation-2","canonicalPath":"/agent/clawhub-peytoncasper-browser-automation-2","generatedAt":"2026-10-09T09:15:23.862Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-05-19T07:01:21.605Z","emptyReason":null},"description":"Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Skill: Browser Automation Owner: peytoncasper Summary: Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Tags: latest:1.0.1 Version history: v1.0.1 | 2026-02-05T16:00:43.177Z | user Initial public release v1.0.0 | 2026-02-05","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 42.7K downloads reported by the source. Last updated 5/19/2026.","installCommand":"clawhub skill install publishers:peytoncasper:browser-automation","sourceUrl":"https://clawhub.ai/peytoncasper/browser-automation","homepage":"https://clawhub.ai/peytoncasper/browser-automation","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/peytoncasper/browser-automation","kind":"source"}],"safetyScore":84,"overallRank":62,"popularityScore":92,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from webs"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-05-19T07:01:21.605Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-05-19T07:01:21.605Z","emptyReason":null},"stars":null,"forks":null,"downloads":42712,"packageName":null,"latestVersion":"1.0.1","tractionLabel":"42.7K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-05-19T07:01:21.571Z","emptyReason":null},"lastUpdatedAt":"2026-05-19T07:01:21.605Z","lastCrawledAt":"2026-05-19T07:01:21.571Z","lastIndexedAt":null,"nextCrawlAt":"2026-05-20T07:01:21.571Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.1","createdAt":"2026-02-05T16:00:43.177Z","changelog":"Initial public release","fileCount":5,"zipByteSize":9455},{"version":"1.0.0","createdAt":"2026-02-05T15:58:11.925Z","changelog":"- Initial release of browser automation skill. - Automates web browser interactions using Stagehand CLI and natural language commands. - Supports both local Chrome and remote Browserbase environments; selection is automatic based on configuration. - Provides commands for navigation, interaction, extraction, element observation, screenshots, and closing the browser. - Includes troubleshooting tips and setup instructions for both environments.","fileCount":5,"zipByteSize":9456}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install publishers:peytoncasper:browser-automation","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-peytoncasper-browser-automation-2/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-peytoncasper-browser-automation-2/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-peytoncasper-browser-automation-2/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-peytoncasper-browser-automation-2/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-peytoncasper-browser-automation-2/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-peytoncasper-browser-automation-2/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T09:15:23.861Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-peytoncasper-browser-automation-2/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-peytoncasper-browser-automation-2/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-peytoncasper-browser-automation-2/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-peytoncasper-browser-automation-2/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-05-19T07:01:21.605Z","emptyReason":null},"readme":"Skill: Browser Automation\n\nOwner: peytoncasper\n\nSummary: Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications.\n\nTags: latest:1.0.1\n\nVersion history:\n\nv1.0.1 | 2026-02-05T16:00:43.177Z | user\n\nInitial public release\n\nv1.0.0 | 2026-02-05T15:58:11.925Z | auto\n\n- Initial release of browser automation skill.\n- Automates web browser interactions using Stagehand CLI and natural language commands.\n- Supports both local Chrome and remote Browserbase environments; selection is automatic based on configuration.\n- Provides commands for navigation, interaction, extraction, element observation, screenshots, and closing the browser.\n- Includes troubleshooting tips and setup instructions for both environments.\n\nArchive index:\n\nArchive v1.0.1: 5 files, 9455 bytes\n\nFiles: EXAMPLES.md (7283b), REFERENCE.md (13448b), setup.json (1361b), SKILL.md (2420b), _meta.json (137b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: browser\ndescription: Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications.\nallowed-tools: Bash\n---\n\n# Browser Automation\n\nAutomate browser interactions using Stagehand CLI with Claude.\n\n### First: Environment Selection (Local vs Remote)\n\nThe skill automatically selects between local and remote browser environments:\n- **If Browserbase API keys exist** (BROWSERBASE_API_KEY and BROWSERBASE_PROJECT_ID in .env file): Uses remote Browserbase environment\n- **If no Browserbase API keys**: Falls back to local Chrome browser\n- **No user prompting**: The selection happens automatically based on available configuration\n\n## Setup (First Time Only)\n\nCheck `setup.json` in this directory. If `setupComplete: false`:\n\n```bash\nnpm install    # Install dependencies\nnpm link       # Create global 'browser' command\n```\n\n## Commands\n\nAll commands work identically in both modes:\n\n```bash\nbrowser navigate <url>                    # Go to URL\nbrowser act \"<action>\"                    # Natural language action\nbrowser extract \"<instruction>\" ['{}']    # Extract data (optional schema)\nbrowser observe \"<query>\"                 # Discover elements\nbrowser screenshot                        # Take screenshot\nbrowser close                             # Close browser\n```\n\n## Quick Example\n\n```bash\nbrowser navigate https://example.com\nbrowser act \"click the Sign In button\"\nbrowser extract \"get the page title\"\nbrowser close\n```\n\n## Mode Comparison\n\n| Feature | Local | Browserbase |\n|---------|-------|-------------|\n| Speed | Faster | Slightly slower |\n| Setup | Chrome required | API key required |\n| Stealth mode | No | Yes |\n| Proxy/CAPTCHA | No | Yes |\n| Best for | Development | Production/scraping |\n\n## Best Practices\n\n1. **Always navigate first** before interacting\n2. **View screenshots** after each command to verify\n3. **Be specific** in action descriptions\n4. **Close browser** when done\n\n## Troubleshooting\n\n- **Chrome not found**: Install Chrome or use Browserbase mode\n- **Action fails**: Use `browser observe` to discover available elements\n- **Browserbase fails**: Verify API key and project ID are set\n\nFor detailed examples, see [EXAMPLES.md](EXAMPLES.md).\nFor API reference, see [REFERENCE.md](REFERENCE.md).\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7ccvk3zbxj1yzzsxne9tfayn801hks\",\n  \"slug\": \"browser-automation\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1770307243177\n}\n\nFile v1.0.1:EXAMPLES.md\n\n# Browser Automation Examples\n\nThis document provides detailed examples of common browser automation tasks using the CLI tool.\n\n## Example 1: Extract Product Information from E-commerce\n\n**User request**: \"Go to example.com/product/123 and extract the product details\"\n\n**Workflow**:\n\n1. **Navigate** to the product page:\n   ```bash\n   browser navigate https://example.com/product/123\n   ```\n\n2. **Extract** product data with schema:\n   ```bash\n   browser extract \"Extract the product information\" '{\"productName\": \"string\", \"price\": \"number\", \"currency\": \"string\", \"inStock\": \"boolean\", \"rating\": \"number\", \"reviewCount\": \"number\"}'\n   ```\n\n3. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n**Expected result**: JSON object with product details that can be analyzed or stored.\n\n---\n\n## Example 2: Fill Out and Submit a Contact Form\n\n**User request**: \"Fill out the contact form on example.com with my information\"\n\n**Workflow**:\n\n1. **Navigate** to contact page:\n   ```bash\n   browser navigate https://example.com/contact\n   ```\n\n2. **Act**: Fill in name field:\n   ```bash\n   browser act \"Fill in the name field with 'John Doe'\"\n   ```\n\n3. **Act**: Fill in email field:\n   ```bash\n   browser act \"Fill in the email field with 'john.doe@example.com'\"\n   ```\n\n4. **Act**: Fill in message field:\n   ```bash\n   browser act \"Fill in the message field with 'I would like to inquire about your services'\"\n   ```\n\n5. **Act**: Submit the form:\n   ```bash\n   browser act \"Click the Submit button\"\n   ```\n\n6. **Screenshot** to capture confirmation:\n   ```bash\n   browser screenshot\n   ```\n\n7. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n---\n\n## Example 3: Research and Summarize News Articles\n\n**User request**: \"Check the latest tech news on techcrunch.com and summarize the top stories\"\n\n**Workflow**:\n\n1. **Navigate** to news site:\n   ```bash\n   browser navigate https://techcrunch.com\n   ```\n\n2. **Extract** article headlines and summaries:\n   ```bash\n   browser extract \"Extract the top 5 article headlines and their summaries\" '{\"headlines\": \"string\", \"summary\": \"string\", \"author\": \"string\", \"publishedDate\": \"string\"}'\n   ```\n\n3. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n4. Analyze and summarize the extracted data using Claude's text analysis capabilities.\n\n---\n\n## Example 4: Login and Navigate Authenticated Area\n\n**User request**: \"Log into example.com and navigate to my dashboard\"\n\n**Workflow**:\n\n1. **Navigate** to login page:\n   ```bash\n   browser navigate https://example.com/login\n   ```\n\n2. **Act**: Fill in username:\n   ```bash\n   browser act \"Fill in the username field with 'myusername'\"\n   ```\n\n3. **Act**: Fill in password:\n   ```bash\n   browser act \"Fill in the password field with 'mypassword'\"\n   ```\n\n4. **Act**: Click login button:\n   ```bash\n   browser act \"Click the Login button\"\n   ```\n\n5. **Act**: Wait for page load:\n   ```bash\n   browser act \"Wait for the page to fully load\"\n   ```\n\n6. **Navigate** to dashboard:\n   ```bash\n   browser navigate https://example.com/dashboard\n   ```\n\n7. **Screenshot** the dashboard:\n   ```bash\n   browser screenshot\n   ```\n\n8. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n**Note**: This example uses Chrome's user profile (`.chrome-profile/`) which may preserve session cookies between runs.\n\n---\n\n## Example 5: Search and Collect Results\n\n**User request**: \"Search Google for 'best TypeScript practices' and get the top 5 results\"\n\n**Workflow**:\n\n1. **Navigate** to Google:\n   ```bash\n   browser navigate https://www.google.com\n   ```\n\n2. **Act**: Perform search:\n   ```bash\n   browser act \"Type 'best TypeScript practices' in the search box and press Enter\"\n   ```\n\n3. **Act**: Wait for results:\n   ```bash\n   browser act \"Wait for search results to load\"\n   ```\n\n4. **Extract** search results:\n   ```bash\n   browser extract \"Extract the top 5 search results\" '{\"title\": \"string\", \"url\": \"string\", \"snippet\": \"string\"}'\n   ```\n\n5. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n---\n\n## Example 6: Download a File\n\n**User request**: \"Download the PDF file from example.com/documents/report.pdf\"\n\n**Workflow**:\n\n1. **Navigate** to the file URL:\n   ```bash\n   browser navigate https://example.com/documents/report.pdf\n   ```\n\n2. **Act**: Wait for download to start:\n   ```bash\n   browser act \"Wait for 5 seconds for the download to complete\"\n   ```\n\n3. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n**Note**: Files are automatically downloaded to `./agent/downloads/` directory due to CDP configuration.\n\n---\n\n## Example 7: Debugging a Page Issue\n\n**User request**: \"Check why the submit button isn't working on example.com/form\"\n\n**Workflow**:\n\n1. **Navigate** to the form page:\n   ```bash\n   browser navigate https://example.com/form\n   ```\n\n2. **Screenshot** initial state:\n   ```bash\n   browser screenshot\n   ```\n\n3. **Observe** available elements:\n   ```bash\n   browser observe \"Find all buttons and their states\"\n   ```\n\n4. **Observe** form fields:\n   ```bash\n   browser observe \"Find all form input fields and their required status\"\n   ```\n\n5. **Act**: Try filling required fields:\n   ```bash\n   browser act \"Fill in all required fields with test data\"\n   ```\n\n6. **Screenshot** after filling:\n   ```bash\n   browser screenshot\n   ```\n\n7. **Observe** button state again:\n   ```bash\n   browser observe \"Check if the submit button is now enabled\"\n   ```\n\n8. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\nAnalyze the screenshots and observations to determine the issue.\n\n---\n\n## Example 8: Multi-Page Data Collection\n\n**User request**: \"Extract product information from the first 3 pages of results on example.com/products\"\n\n**Workflow**:\n\n1. **Navigate** to products page:\n   ```bash\n   browser navigate https://example.com/products\n   ```\n\n2. **Extract** products from page 1:\n   ```bash\n   browser extract \"Extract all products on this page\" '{\"name\": \"string\", \"price\": \"number\", \"imageUrl\": \"string\"}'\n   ```\n\n3. **Act**: Click next page:\n   ```bash\n   browser act \"Click the Next Page button\"\n   ```\n\n4. **Extract** products from page 2:\n   ```bash\n   browser extract \"Extract all products on this page\" '{\"name\": \"string\", \"price\": \"number\", \"imageUrl\": \"string\"}'\n   ```\n\n5. **Act**: Click next page:\n   ```bash\n   browser act \"Click the Next Page button\"\n   ```\n\n6. **Extract** products from page 3:\n   ```bash\n   browser extract \"Extract all products on this page\" '{\"name\": \"string\", \"price\": \"number\", \"imageUrl\": \"string\"}'\n   ```\n\n7. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\nCombine and process all extracted data.\n\n---\n\n## Tips for Success\n\n- **Be specific with natural language**: \"Click the blue Submit button in the footer\" is better than \"click submit\". This is **extremely important** because there's much ambiguity in many websites. \n- **Wait when needed**: After navigation or actions that trigger page changes, explicitly wait\n- **Use observe for discovery**: When unsure what elements exist, use observe first\n- **Take screenshots for debugging**: Visual confirmation helps understand what the browser sees\n- **Handle errors gracefully**: If an action fails, try breaking it into smaller steps\n- **Clean up resources**: Always close the browser when done to free up system resources\n\nFile v1.0.1:REFERENCE.md\n\n# Browser Automation CLI Reference\n\nThis document provides detailed technical reference for the CLI browser automation tool.\n\n## Architecture Overview\n\nThe browser automation system consists of:\n\n- **Stagehand**: TypeScript library wrapping Playwright for AI-driven browser control. Uses AI model to find and interact with the right elements, so be specific\n- **Chrome CDP**: Chrome DevTools Protocol connection on port 9222\n- **CLI Tool**: Command-line interface in `src/cli.ts` for browser automation\n- **Local Chrome**: Chrome browser launched with remote debugging enabled\n\n### File Locations\n\n- **Chrome Profile**: `.chrome-profile/` - Persistent browser profile directory\n- **Screenshots**: `./agent/browser_screenshots/` - Screenshot output directory\n- **Downloads**: `./agent/downloads/` - File download directory\n\n## CLI Command Reference\n\n### navigate\n\nNavigate to a URL in the browser.\n\n**Usage**:\n```bash\nbrowser navigate <url>\n```\n\n**Parameters**:\n- `url` (string, required): The URL to navigate to. Must include protocol (http:// or https://)\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"message\": \"Successfully navigated to <url>\",\n  \"screenshot\": \"/path/to/screenshot.png\"\n}\n```\n\n**Implementation Details**:\n- Uses Playwright's `page.goto()` under the hood\n- Waits for network idle and DOM content loaded\n- Automatically takes a screenshot after navigation\n- Supports HTTPS upgrade for HTTP URLs\n\n**Example**:\n```bash\nbrowser navigate https://example.com\n```\n\n**Error Handling**:\n- Invalid URLs return error with `success: false`\n- Network timeouts return timeout error\n- SSL certificate errors may fail navigation\n\n---\n\n### act\n\nPerform an action on the page using natural language.\n\n**Usage**:\n```bash\nbrowser act \"<action>\"\n```\n\n**Parameters**:\n- `action` (string, required): Natural language description of the action to perform\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"message\": \"Successfully performed action: <action>\",\n  \"screenshot\": \"/path/to/screenshot.png\"\n}\n```\n\nNote: Without specificity it might succeed on the wrong element!\n\n**Implementation Details**:\n- Uses Stagehand's `page.act()` which leverages Claude Haiku 4.5\n- AI model interprets natural language and executes corresponding browser actions\n- Supports: clicking, typing, selecting, scrolling, waiting, hovering, and more\n- Automatically handles element location and interaction\n- Automatically takes a screenshot after the action\n\n**Natural Language Examples**:\n```bash\nbrowser act \"Click the login button\"\nbrowser act \"Fill in email field with test@example.com\"\nbrowser act \"Scroll to the bottom of the page\"\nbrowser act \"Select 'California' from the state dropdown\"\nbrowser act \"Hover over the menu icon\"\nbrowser act \"Wait for 3 seconds\"\nbrowser act \"Press the Enter key\"\nbrowser act \"Double-click the file icon\"\n```\n\n**Best Practices**:\n- Be **specific** about which element to interact with\n- Include visual descriptors (\"button next to the form\", \"top menu\", \"form at bottom\")\n- For ambiguous elements, mention nearby context\n- Break complex actions into multiple simple actions\n\n**Error Handling**:\n- Element not found errors indicate selector couldn't be resolved\n- Timeout errors occur when action takes too long\n- Action not possible errors indicate element state prevents action\n- All errors return JSON with `success: false`\n\n---\n\n### extract\n\nExtract structured data from the current page using a schema.\n\n**Usage**:\n```bash\nbrowser extract \"<instruction>\" '{\"field\": \"type\"}'\n```\n\n**Parameters**:\n- `instruction` (string, required): Natural language description of what to extract\n- `schema` (JSON string, required): Schema definition mapping field names to types\n\n**Schema Types**:\n- `\"string\"`: Text content\n- `\"number\"`: Numeric values (integers or floats)\n- `\"boolean\"`: True/false values\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"field1\": \"value\",\n    \"field2\": 123\n  }\n}\n```\n\n**Implementation Details**:\n- Uses Stagehand's `page.extract()` with Zod schema validation\n- AI model (Claude Haiku 4.5) identifies relevant page elements\n- Automatically handles pagination and dynamic content\n- Validates extracted data against schema\n\n**Schema Example**:\n```bash\nbrowser extract \"Extract the product information\" '{\"productName\": \"string\", \"price\": \"number\", \"inStock\": \"boolean\", \"description\": \"string\", \"rating\": \"number\"}'\n```\n\n**Complex Extraction Example**:\n```bash\nbrowser extract \"Extract all items from the shopping cart\" '{\"itemName\": \"string\", \"quantity\": \"number\", \"unitPrice\": \"number\", \"totalPrice\": \"number\", \"imageUrl\": \"string\"}'\n```\n\n**Best Practices**:\n- Use clear, descriptive field names\n- Match schema types to expected data types\n- Provide specific extraction instructions\n- Handle missing data by checking result properties\n\n**Error Handling**:\n- Schema validation errors indicate type mismatch\n- Extraction failures occur when data not found on page\n- Timeout errors for pages that take too long to analyze\n- All errors return JSON with `success: false`\n\n---\n\n### observe\n\nDiscover available actions on the page.\n\n**Usage**:\n```bash\nbrowser observe \"<query>\"\n```\n\n**Parameters**:\n- `query` (string, required): Natural language query to discover elements\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"selector\": \"button.submit-btn\",\n      \"text\": \"Submit Form\",\n      \"type\": \"button\",\n      \"visible\": true,\n      \"enabled\": true\n    }\n  ]\n}\n```\n\n**Implementation Details**:\n- Uses Stagehand's `page.observe()` to scan page elements\n- Returns actionable elements matching the query\n- Provides element properties, states, and available actions\n\n**Query Examples**:\n```bash\nbrowser observe \"Find all buttons\"\nbrowser observe \"Find clickable links in the navigation\"\nbrowser observe \"Find form input fields\"\nbrowser observe \"Find all submit buttons\"\nbrowser observe \"Find elements with text 'Login'\"\nbrowser observe \"Find all images\"\n```\n\n**Use Cases**:\n- Page exploration and discovery\n- Debugging action failures\n- Understanding page structure\n- Finding dynamic element selectors\n\n**Error Handling**:\n- Empty array returned when no elements match\n- Timeout for pages that take too long to scan\n- All errors return JSON with `success: false`\n\n---\n\n### screenshot\n\nTake a screenshot of the current page.\n\n**Usage**:\n```bash\nbrowser screenshot\n```\n\n**Parameters**: None\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"screenshot\": \"/path/to/screenshot.png\"\n}\n```\n\n**Implementation Details**:\n- Captures full viewport at current scroll position\n- Saves as PNG format with timestamp in filename\n- Automatically resizes images larger than 2000x2000 pixels using Sharp\n- Uses lossless PNG compression\n\n**Screenshot Path Format**:\n```\n./agent/browser_screenshots/screenshot-YYYY-MM-DDTHH-MM-SS-mmmZ.png\n```\n\n**Example**:\n```bash\nbrowser screenshot\n```\n\n**Image Processing**:\n- Original resolution preserved if ≤ 2000x2000\n- Larger images resized to fit within 2000x2000 while maintaining aspect ratio\n- Uses Sharp library for high-quality image processing\n\n**Best Practices**:\n- Take screenshots before and after important actions\n- Use for visual debugging and verification\n- Screenshot after navigation to confirm page loaded\n- Capture error states for troubleshooting\n\n**Error Handling**:\n- Directory creation errors if screenshots folder can't be created\n- CDP errors if Chrome DevTools Protocol connection fails\n- File write errors if disk space insufficient\n- All errors return JSON with `success: false`\n\n---\n\n### close\n\nClose the browser and cleanup resources.\n\n**Usage**:\n```bash\nbrowser close\n```\n\n**Parameters**: None\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"message\": \"Browser closed\"\n}\n```\n\n**Implementation Details**:\n- Calls `stagehand.close()` to clean up Playwright resources\n- Kills Chrome process if it was started by the CLI tool\n- Clears internal state variables\n- Does NOT delete `.chrome-profile/` directory (preserved for reuse)\n\n**Resource Cleanup**:\n- Closes all browser tabs and windows\n- Terminates Chrome process (only if started by this tool)\n- Releases CDP connection\n- Clears Stagehand instance\n\n**Best Practices**:\n- Always call at the end of browser automation tasks\n- Call even if errors occurred during automation\n- Don't call mid-workflow unless explicitly needed\n\n**Error Handling**:\n- Continues cleanup even if some steps fail\n- Safe to call multiple times\n- Gracefully handles already-closed browser\n- All errors return JSON with `success: false`\n\n---\n\n## Configuration Details\n\n### Stagehand Initialization\n\nThe Stagehand instance is configured in `src/cli.ts` with:\n\n```typescript\nnew Stagehand({\n  env: \"LOCAL\",\n  verbose: 0,\n  enableCaching: true,\n  model: \"anthropic/claude-haiku-4-5-20251001\",\n  localBrowserLaunchOptions: {\n    cdpUrl: wsUrl,\n  },\n})\n```\n\n**Configuration Options**:\n- `env: \"LOCAL\"`: Uses local Chrome instead of remote browser\n- `verbose: 0`: Minimal logging output\n- `enableCaching: true`: Caches page analysis for better performance\n- `modelName`: Claude Haiku 4.5 for AI-driven actions and extraction\n- `cdpUrl`: Chrome DevTools Protocol endpoint\n\n### Chrome Launch Arguments\n\nChrome is launched by `src/cli.ts` with:\n\n```bash\n--remote-debugging-port=9222\n--user-data-dir=.chrome-profile\n--window-position=-9999,-9999\n--window-size=1280,720\n```\n\n**Arguments**:\n- `--remote-debugging-port`: Enables CDP on port 9222\n- `--user-data-dir`: Persistent profile directory for session/cookie persistence\n- `--window-position`: Launches minimized off-screen\n- `--window-size`: Default window size\n\n### Download Configuration\n\nDownloads are configured via CDP:\n\n```typescript\nawait client.send(\"Browser.setDownloadBehavior\", {\n  behavior: \"allow\",\n  downloadPath: \"./agent/downloads\",\n  eventsEnabled: true,\n})\n```\n\n**Behavior**:\n- Downloads start automatically (no dialog)\n- Files saved to `./agent/downloads/`\n- Download events can be monitored via CDP\n\n---\n\n## Error Messages Reference\n\n### Common Errors\n\n**\"Could not find local Chrome installation\"**\n- Cause: Chrome/Chromium not installed or not in standard locations\n- Solution: Install Chrome from https://www.google.com/chrome/\n\n**\"Chrome failed to start with remote debugging on port 9222\"**\n- Cause: Port 9222 already in use or Chrome can't bind to port\n- Solution: Close other Chrome instances or change CDP port\n\n**\"Browser failed to become ready within timeout\"**\n- Cause: Chrome launched but page context not ready\n- Solution: Check Chrome version compatibility, restart system\n\n**\"Error performing action: element not found\"**\n- Cause: Natural language description didn't match any page element\n- Solution: Use more specific description or use observe to find elements\n\n**\"Error extracting data: schema validation failed\"**\n- Cause: Extracted data type doesn't match schema\n- Solution: Verify schema types match actual page data\n\n**\"Error taking screenshot: directory not writable\"**\n- Cause: Insufficient permissions for screenshots directory\n- Solution: Check file permissions on `./agent/browser_screenshots/`\n\n---\n\n## Performance Considerations\n\n### Caching\n\nStagehand caches page analysis to improve performance on repeated actions. Cache is maintained for:\n- Element selectors\n- Page structure analysis\n- Vision model results\n\n### Timeouts\n\nDefault timeouts:\n- Navigation: 30 seconds\n- Action execution: 30 seconds\n- Extraction: 60 seconds\n- CDP connection: 15 seconds (50 retries × 300ms)\n\n### Resource Usage\n\nBrowser automation consumes:\n- Memory: ~200-500MB for Chrome process\n- CPU: Variable based on page complexity\n- Disk: ~50-200MB for Chrome profile\n- Network: Depends on pages visited\n\n---\n\n## Security Considerations\n\n### Credential Handling\n\n- Browser uses persistent profile (`.chrome-profile/`)\n- Saved passwords and cookies persist between sessions\n- Consider using isolated profiles for sensitive operations\n\n### Download Safety\n\n- Downloads automatically saved to `./agent/downloads/`\n- No file type restrictions enforced\n- Verify downloaded file integrity before use\n\n### Network Access\n\n- Browser has full network access\n- Respects system proxy settings\n- Can access localhost and internal networks\n\n---\n\n## Debugging Tips\n\n### Enable Verbose Logging\n\nEdit `src/cli.ts` and change verbose level in Stagehand configuration:\n\n```typescript\n// Change verbose: 0 to verbose: 1 or 2\nverbose: 2,  // Maximum verbosity\n```\n\n### View Chrome Console\n\nConnect to Chrome DevTools manually:\n1. Open Chrome\n2. Navigate to `chrome://inspect`\n3. Click \"inspect\" under Remote Target\n\n### Check CDP Connection\n\nTest CDP endpoint:\n```bash\ncurl http://localhost:9222/json/version\n```\n\n### Monitor Browser Process\n\nCheck Chrome process:\n```bash\nps aux | grep chrome\n```\n\n### View Screenshots\n\nScreenshots provide visual debugging:\n```bash\nls -lh ./agent/browser_screenshots/\nopen ./agent/browser_screenshots/screenshot-*.png\n```\n\n### Test CLI Commands\n\nTest individual commands:\n```bash\nbrowser navigate https://example.com\nbrowser screenshot\nbrowser close\n```\n\n---\n\n## Version Information\n\n- **Stagehand**: Uses `@browserbasehq/stagehand` package v2.5.2+\n- **Model**: Claude Haiku 4.5 (claude-haiku-4-5-20251001) for browser actions\n- **CLI Tool**: TypeScript CLI in `src/cli.ts`\n- **Agent SDK**: `@anthropic-ai/claude-agent-sdk` for conversation framework\n- **Browser**: Local Chrome/Chromium installation\n\nFor updates and changelog, see the main project repository.\n\nFile v1.0.1:setup.json\n\n{\n  \"setupComplete\": false,\n  \"prerequisites\": {\n    \"chrome\": {\n      \"required\": true,\n      \"installed\": false,\n      \"description\": \"Google Chrome browser\"\n    },\n    \"dependencies\": {\n      \"required\": true,\n      \"installed\": false,\n      \"description\": \"Node.js dependencies (npm install completed)\"\n    },\n    \"apiKey\": {\n      \"required\": true,\n      \"configured\": false,\n      \"description\": \"ANTHROPIC_API_KEY exported (i.e $ANTHROPIC_API_KEY) or in .env file\"\n    },\n    \"browserCommand\": {\n      \"required\": true,\n      \"installed\": false,\n      \"description\": \"Browser CLI command globally linked (npm link)\"\n    }\n  },\n  \"setupInstructions\": [\n    \"1. Run: npm install (this will automatically build TypeScript)\",\n    \"2. Run: npm link (this creates the global 'browser' command)\",\n    \"3. (RECOMMENDED) Export ANTHROPIC_API_KEY: export ANTHROPIC_API_KEY='your-api-key-here' (check if already exported)\",\n    \"   OR alternatively create .env file: cp .env.example .env and edit it to add your API key\",\n    \"4. Ensure Google Chrome is installed on your system\",\n    \"5. Test installation: browser navigate https://example.com\",\n    \"6. Update this setup.json file: set all 'installed'/'configured' to true and 'setupComplete' to true\"\n  ],\n  \"verifySetup\": \"Run 'browser navigate https://example.com' from any directory to verify installation\"\n}\n\nArchive v1.0.0: 5 files, 9456 bytes\n\nFiles: EXAMPLES.md (7283b), REFERENCE.md (13448b), setup.json (1361b), SKILL.md (2420b), _meta.json (137b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: browser\ndescription: Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications.\nallowed-tools: Bash\n---\n\n# Browser Automation\n\nAutomate browser interactions using Stagehand CLI with Claude.\n\n### First: Environment Selection (Local vs Remote)\n\nThe skill automatically selects between local and remote browser environments:\n- **If Browserbase API keys exist** (BROWSERBASE_API_KEY and BROWSERBASE_PROJECT_ID in .env file): Uses remote Browserbase environment\n- **If no Browserbase API keys**: Falls back to local Chrome browser\n- **No user prompting**: The selection happens automatically based on available configuration\n\n## Setup (First Time Only)\n\nCheck `setup.json` in this directory. If `setupComplete: false`:\n\n```bash\nnpm install    # Install dependencies\nnpm link       # Create global 'browser' command\n```\n\n## Commands\n\nAll commands work identically in both modes:\n\n```bash\nbrowser navigate <url>                    # Go to URL\nbrowser act \"<action>\"                    # Natural language action\nbrowser extract \"<instruction>\" ['{}']    # Extract data (optional schema)\nbrowser observe \"<query>\"                 # Discover elements\nbrowser screenshot                        # Take screenshot\nbrowser close                             # Close browser\n```\n\n## Quick Example\n\n```bash\nbrowser navigate https://example.com\nbrowser act \"click the Sign In button\"\nbrowser extract \"get the page title\"\nbrowser close\n```\n\n## Mode Comparison\n\n| Feature | Local | Browserbase |\n|---------|-------|-------------|\n| Speed | Faster | Slightly slower |\n| Setup | Chrome required | API key required |\n| Stealth mode | No | Yes |\n| Proxy/CAPTCHA | No | Yes |\n| Best for | Development | Production/scraping |\n\n## Best Practices\n\n1. **Always navigate first** before interacting\n2. **View screenshots** after each command to verify\n3. **Be specific** in action descriptions\n4. **Close browser** when done\n\n## Troubleshooting\n\n- **Chrome not found**: Install Chrome or use Browserbase mode\n- **Action fails**: Use `browser observe` to discover available elements\n- **Browserbase fails**: Verify API key and project ID are set\n\nFor detailed examples, see [EXAMPLES.md](EXAMPLES.md).\nFor API reference, see [REFERENCE.md](REFERENCE.md).\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7ccvk3zbxj1yzzsxne9tfayn801hks\",\n  \"slug\": \"browser-automation\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1770307091925\n}\n\nFile v1.0.0:EXAMPLES.md\n\n# Browser Automation Examples\n\nThis document provides detailed examples of common browser automation tasks using the CLI tool.\n\n## Example 1: Extract Product Information from E-commerce\n\n**User request**: \"Go to example.com/product/123 and extract the product details\"\n\n**Workflow**:\n\n1. **Navigate** to the product page:\n   ```bash\n   browser navigate https://example.com/product/123\n   ```\n\n2. **Extract** product data with schema:\n   ```bash\n   browser extract \"Extract the product information\" '{\"productName\": \"string\", \"price\": \"number\", \"currency\": \"string\", \"inStock\": \"boolean\", \"rating\": \"number\", \"reviewCount\": \"number\"}'\n   ```\n\n3. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n**Expected result**: JSON object with product details that can be analyzed or stored.\n\n---\n\n## Example 2: Fill Out and Submit a Contact Form\n\n**User request**: \"Fill out the contact form on example.com with my information\"\n\n**Workflow**:\n\n1. **Navigate** to contact page:\n   ```bash\n   browser navigate https://example.com/contact\n   ```\n\n2. **Act**: Fill in name field:\n   ```bash\n   browser act \"Fill in the name field with 'John Doe'\"\n   ```\n\n3. **Act**: Fill in email field:\n   ```bash\n   browser act \"Fill in the email field with 'john.doe@example.com'\"\n   ```\n\n4. **Act**: Fill in message field:\n   ```bash\n   browser act \"Fill in the message field with 'I would like to inquire about your services'\"\n   ```\n\n5. **Act**: Submit the form:\n   ```bash\n   browser act \"Click the Submit button\"\n   ```\n\n6. **Screenshot** to capture confirmation:\n   ```bash\n   browser screenshot\n   ```\n\n7. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n---\n\n## Example 3: Research and Summarize News Articles\n\n**User request**: \"Check the latest tech news on techcrunch.com and summarize the top stories\"\n\n**Workflow**:\n\n1. **Navigate** to news site:\n   ```bash\n   browser navigate https://techcrunch.com\n   ```\n\n2. **Extract** article headlines and summaries:\n   ```bash\n   browser extract \"Extract the top 5 article headlines and their summaries\" '{\"headlines\": \"string\", \"summary\": \"string\", \"author\": \"string\", \"publishedDate\": \"string\"}'\n   ```\n\n3. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n4. Analyze and summarize the extracted data using Claude's text analysis capabilities.\n\n---\n\n## Example 4: Login and Navigate Authenticated Area\n\n**User request**: \"Log into example.com and navigate to my dashboard\"\n\n**Workflow**:\n\n1. **Navigate** to login page:\n   ```bash\n   browser navigate https://example.com/login\n   ```\n\n2. **Act**: Fill in username:\n   ```bash\n   browser act \"Fill in the username field with 'myusername'\"\n   ```\n\n3. **Act**: Fill in password:\n   ```bash\n   browser act \"Fill in the password field with 'mypassword'\"\n   ```\n\n4. **Act**: Click login button:\n   ```bash\n   browser act \"Click the Login button\"\n   ```\n\n5. **Act**: Wait for page load:\n   ```bash\n   browser act \"Wait for the page to fully load\"\n   ```\n\n6. **Navigate** to dashboard:\n   ```bash\n   browser navigate https://example.com/dashboard\n   ```\n\n7. **Screenshot** the dashboard:\n   ```bash\n   browser screenshot\n   ```\n\n8. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n**Note**: This example uses Chrome's user profile (`.chrome-profile/`) which may preserve session cookies between runs.\n\n---\n\n## Example 5: Search and Collect Results\n\n**User request**: \"Search Google for 'best TypeScript practices' and get the top 5 results\"\n\n**Workflow**:\n\n1. **Navigate** to Google:\n   ```bash\n   browser navigate https://www.google.com\n   ```\n\n2. **Act**: Perform search:\n   ```bash\n   browser act \"Type 'best TypeScript practices' in the search box and press Enter\"\n   ```\n\n3. **Act**: Wait for results:\n   ```bash\n   browser act \"Wait for search results to load\"\n   ```\n\n4. **Extract** search results:\n   ```bash\n   browser extract \"Extract the top 5 search results\" '{\"title\": \"string\", \"url\": \"string\", \"snippet\": \"string\"}'\n   ```\n\n5. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n---\n\n## Example 6: Download a File\n\n**User request**: \"Download the PDF file from example.com/documents/report.pdf\"\n\n**Workflow**:\n\n1. **Navigate** to the file URL:\n   ```bash\n   browser navigate https://example.com/documents/report.pdf\n   ```\n\n2. **Act**: Wait for download to start:\n   ```bash\n   browser act \"Wait for 5 seconds for the download to complete\"\n   ```\n\n3. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n**Note**: Files are automatically downloaded to `./agent/downloads/` directory due to CDP configuration.\n\n---\n\n## Example 7: Debugging a Page Issue\n\n**User request**: \"Check why the submit button isn't working on example.com/form\"\n\n**Workflow**:\n\n1. **Navigate** to the form page:\n   ```bash\n   browser navigate https://example.com/form\n   ```\n\n2. **Screenshot** initial state:\n   ```bash\n   browser screenshot\n   ```\n\n3. **Observe** available elements:\n   ```bash\n   browser observe \"Find all buttons and their states\"\n   ```\n\n4. **Observe** form fields:\n   ```bash\n   browser observe \"Find all form input fields and their required status\"\n   ```\n\n5. **Act**: Try filling required fields:\n   ```bash\n   browser act \"Fill in all required fields with test data\"\n   ```\n\n6. **Screenshot** after filling:\n   ```bash\n   browser screenshot\n   ```\n\n7. **Observe** button state again:\n   ```bash\n   browser observe \"Check if the submit button is now enabled\"\n   ```\n\n8. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\nAnalyze the screenshots and observations to determine the issue.\n\n---\n\n## Example 8: Multi-Page Data Collection\n\n**User request**: \"Extract product information from the first 3 pages of results on example.com/products\"\n\n**Workflow**:\n\n1. **Navigate** to products page:\n   ```bash\n   browser navigate https://example.com/products\n   ```\n\n2. **Extract** products from page 1:\n   ```bash\n   browser extract \"Extract all products on this page\" '{\"name\": \"string\", \"price\": \"number\", \"imageUrl\": \"string\"}'\n   ```\n\n3. **Act**: Click next page:\n   ```bash\n   browser act \"Click the Next Page button\"\n   ```\n\n4. **Extract** products from page 2:\n   ```bash\n   browser extract \"Extract all products on this page\" '{\"name\": \"string\", \"price\": \"number\", \"imageUrl\": \"string\"}'\n   ```\n\n5. **Act**: Click next page:\n   ```bash\n   browser act \"Click the Next Page button\"\n   ```\n\n6. **Extract** products from page 3:\n   ```bash\n   browser extract \"Extract all products on this page\" '{\"name\": \"string\", \"price\": \"number\", \"imageUrl\": \"string\"}'\n   ```\n\n7. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\nCombine and process all extracted data.\n\n---\n\n## Tips for Success\n\n- **Be specific with natural language**: \"Click the blue Submit button in the footer\" is better than \"click submit\". This is **extremely important** because there's much ambiguity in many websites. \n- **Wait when needed**: After navigation or actions that trigger page changes, explicitly wait\n- **Use observe for discovery**: When unsure what elements exist, use observe first\n- **Take screenshots for debugging**: Visual confirmation helps understand what the browser sees\n- **Handle errors gracefully**: If an action fails, try breaking it into smaller steps\n- **Clean up resources**: Always close the browser when done to free up system resources\n\nFile v1.0.0:REFERENCE.md\n\n# Browser Automation CLI Reference\n\nThis document provides detailed technical reference for the CLI browser automation tool.\n\n## Architecture Overview\n\nThe browser automation system consists of:\n\n- **Stagehand**: TypeScript library wrapping Playwright for AI-driven browser control. Uses AI model to find and interact with the right elements, so be specific\n- **Chrome CDP**: Chrome DevTools Protocol connection on port 9222\n- **CLI Tool**: Command-line interface in `src/cli.ts` for browser automation\n- **Local Chrome**: Chrome browser launched with remote debugging enabled\n\n### File Locations\n\n- **Chrome Profile**: `.chrome-profile/` - Persistent browser profile directory\n- **Screenshots**: `./agent/browser_screenshots/` - Screenshot output directory\n- **Downloads**: `./agent/downloads/` - File download directory\n\n## CLI Command Reference\n\n### navigate\n\nNavigate to a URL in the browser.\n\n**Usage**:\n```bash\nbrowser navigate <url>\n```\n\n**Parameters**:\n- `url` (string, required): The URL to navigate to. Must include protocol (http:// or https://)\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"message\": \"Successfully navigated to <url>\",\n  \"screenshot\": \"/path/to/screenshot.png\"\n}\n```\n\n**Implementation Details**:\n- Uses Playwright's `page.goto()` under the hood\n- Waits for network idle and DOM content loaded\n- Automatically takes a screenshot after navigation\n- Supports HTTPS upgrade for HTTP URLs\n\n**Example**:\n```bash\nbrowser navigate https://example.com\n```\n\n**Error Handling**:\n- Invalid URLs return error with `success: false`\n- Network timeouts return timeout error\n- SSL certificate errors may fail navigation\n\n---\n\n### act\n\nPerform an action on the page using natural language.\n\n**Usage**:\n```bash\nbrowser act \"<action>\"\n```\n\n**Parameters**:\n- `action` (string, required): Natural language description of the action to perform\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"message\": \"Successfully performed action: <action>\",\n  \"screenshot\": \"/path/to/screenshot.png\"\n}\n```\n\nNote: Without specificity it might succeed on the wrong element!\n\n**Implementation Details**:\n- Uses Stagehand's `page.act()` which leverages Claude Haiku 4.5\n- AI model interprets natural language and executes corresponding browser actions\n- Supports: clicking, typing, selecting, scrolling, waiting, hovering, and more\n- Automatically handles element location and interaction\n- Automatically takes a screenshot after the action\n\n**Natural Language Examples**:\n```bash\nbrowser act \"Click the login button\"\nbrowser act \"Fill in email field with test@example.com\"\nbrowser act \"Scroll to the bottom of the page\"\nbrowser act \"Select 'California' from the state dropdown\"\nbrowser act \"Hover over the menu icon\"\nbrowser act \"Wait for 3 seconds\"\nbrowser act \"Press the Enter key\"\nbrowser act \"Double-click the file icon\"\n```\n\n**Best Practices**:\n- Be **specific** about which element to interact with\n- Include visual descriptors (\"button next to the form\", \"top menu\", \"form at bottom\")\n- For ambiguous elements, mention nearby context\n- Break complex actions into multiple simple actions\n\n**Error Handling**:\n- Element not found errors indicate selector couldn't be resolved\n- Timeout errors occur when action takes too long\n- Action not possible errors indicate element state prevents action\n- All errors return JSON with `success: false`\n\n---\n\n### extract\n\nExtract structured data from the current page using a schema.\n\n**Usage**:\n```bash\nbrowser extract \"<instruction>\" '{\"field\": \"type\"}'\n```\n\n**Parameters**:\n- `instruction` (string, required): Natural language description of what to extract\n- `schema` (JSON string, required): Schema definition mapping field names to types\n\n**Schema Types**:\n- `\"string\"`: Text content\n- `\"number\"`: Numeric values (integers or floats)\n- `\"boolean\"`: True/false values\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"field1\": \"value\",\n    \"field2\": 123\n  }\n}\n```\n\n**Implementation Details**:\n- Uses Stagehand's `page.extract()` with Zod schema validation\n- AI model (Claude Haiku 4.5) identifies relevant page elements\n- Automatically handles pagination and dynamic content\n- Validates extracted data against schema\n\n**Schema Example**:\n```bash\nbrowser extract \"Extract the product information\" '{\"productName\": \"string\", \"price\": \"number\", \"inStock\": \"boolean\", \"description\": \"string\", \"rating\": \"number\"}'\n```\n\n**Complex Extraction Example**:\n```bash\nbrowser extract \"Extract all items from the shopping cart\" '{\"itemName\": \"string\", \"quantity\": \"number\", \"unitPrice\": \"number\", \"totalPrice\": \"number\", \"imageUrl\": \"string\"}'\n```\n\n**Best Practices**:\n- Use clear, descriptive field names\n- Match schema types to expected data types\n- Provide specific extraction instructions\n- Handle missing data by checking result properties\n\n**Error Handling**:\n- Schema validation errors indicate type mismatch\n- Extraction failures occur when data not found on page\n- Timeout errors for pages that take too long to analyze\n- All errors return JSON with `success: false`\n\n---\n\n### observe\n\nDiscover available actions on the page.\n\n**Usage**:\n```bash\nbrowser observe \"<query>\"\n```\n\n**Parameters**:\n- `query` (string, required): Natural language query to discover elements\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"selector\": \"button.submit-btn\",\n      \"text\": \"Submit Form\",\n      \"type\": \"button\",\n      \"visible\": true,\n      \"enabled\": true\n    }\n  ]\n}\n```\n\n**Implementation Details**:\n- Uses Stagehand's `page.observe()` to scan page elements\n- Returns actionable elements matching the query\n- Provides element properties, states, and available actions\n\n**Query Examples**:\n```bash\nbrowser observe \"Find all buttons\"\nbrowser observe \"Find clickable links in the navigation\"\nbrowser observe \"Find form input fields\"\nbrowser observe \"Find all submit buttons\"\nbrowser observe \"Find elements with text 'Login'\"\nbrowser observe \"Find all images\"\n```\n\n**Use Cases**:\n- Page exploration and discovery\n- Debugging action failures\n- Understanding page structure\n- Finding dynamic element selectors\n\n**Error Handling**:\n- Empty array returned when no elements match\n- Timeout for pages that take too long to scan\n- All errors return JSON with `success: false`\n\n---\n\n### screenshot\n\nTake a screenshot of the current page.\n\n**Usage**:\n```bash\nbrowser screenshot\n```\n\n**Parameters**: None\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"screenshot\": \"/path/to/screenshot.png\"\n}\n```\n\n**Implementation Details**:\n- Captures full viewport at current scroll position\n- Saves as PNG format with timestamp in filename\n- Automatically resizes images larger than 2000x2000 pixels using Sharp\n- Uses lossless PNG compression\n\n**Screenshot Path Format**:\n```\n./agent/browser_screenshots/screenshot-YYYY-MM-DDTHH-MM-SS-mmmZ.png\n```\n\n**Example**:\n```bash\nbrowser screenshot\n```\n\n**Image Processing**:\n- Original resolution preserved if ≤ 2000x2000\n- Larger images resized to fit within 2000x2000 while maintaining aspect ratio\n- Uses Sharp library for high-quality image processing\n\n**Best Practices**:\n- Take screenshots before and after important actions\n- Use for visual debugging and verification\n- Screenshot after navigation to confirm page loaded\n- Capture error states for troubleshooting\n\n**Error Handling**:\n- Directory creation errors if screenshots folder can't be created\n- CDP errors if Chrome DevTools Protocol connection fails\n- File write errors if disk space insufficient\n- All errors return JSON with `success: false`\n\n---\n\n### close\n\nClose the browser and cleanup resources.\n\n**Usage**:\n```bash\nbrowser close\n```\n\n**Parameters**: None\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"message\": \"Browser closed\"\n}\n```\n\n**Implementation Details**:\n- Calls `stagehand.close()` to clean up Playwright resources\n- Kills Chrome process if it was started by the CLI tool\n- Clears internal state variables\n- Does NOT delete `.chrome-profile/` directory (preserved for reuse)\n\n**Resource Cleanup**:\n- Closes all browser tabs and windows\n- Terminates Chrome process (only if started by this tool)\n- Releases CDP connection\n- Clears Stagehand instance\n\n**Best Practices**:\n- Always call at the end of browser automation tasks\n- Call even if errors occurred during automation\n- Don't call mid-workflow unless explicitly needed\n\n**Error Handling**:\n- Continues cleanup even if some steps fail\n- Safe to call multiple times\n- Gracefully handles already-closed browser\n- All errors return JSON with `success: false`\n\n---\n\n## Configuration Details\n\n### Stagehand Initialization\n\nThe Stagehand instance is configured in `src/cli.ts` with:\n\n```typescript\nnew Stagehand({\n  env: \"LOCAL\",\n  verbose: 0,\n  enableCaching: true,\n  model: \"anthropic/claude-haiku-4-5-20251001\",\n  localBrowserLaunchOptions: {\n    cdpUrl: wsUrl,\n  },\n})\n```\n\n**Configuration Options**:\n- `env: \"LOCAL\"`: Uses local Chrome instead of remote browser\n- `verbose: 0`: Minimal logging output\n- `enableCaching: true`: Caches page analysis for better performance\n- `modelName`: Claude Haiku 4.5 for AI-driven actions and extraction\n- `cdpUrl`: Chrome DevTools Protocol endpoint\n\n### Chrome Launch Arguments\n\nChrome is launched by `src/cli.ts` with:\n\n```bash\n--remote-debugging-port=9222\n--user-data-dir=.chrome-profile\n--window-position=-9999,-9999\n--window-size=1280,720\n```\n\n**Arguments**:\n- `--remote-debugging-port`: Enables CDP on port 9222\n- `--user-data-dir`: Persistent profile directory for session/cookie persistence\n- `--window-position`: Launches minimized off-screen\n- `--window-size`: Default window size\n\n### Download Configuration\n\nDownloads are configured via CDP:\n\n```typescript\nawait client.send(\"Browser.setDownloadBehavior\", {\n  behavior: \"allow\",\n  downloadPath: \"./agent/downloads\",\n  eventsEnabled: true,\n})\n```\n\n**Behavior**:\n- Downloads start automatically (no dialog)\n- Files saved to `./agent/downloads/`\n- Download events can be monitored via CDP\n\n---\n\n## Error Messages Reference\n\n### Common Errors\n\n**\"Could not find local Chrome installation\"**\n- Cause: Chrome/Chromium not installed or not in standard locations\n- Solution: Install Chrome from https://www.google.com/chrome/\n\n**\"Chrome failed to start with remote debugging on port 9222\"**\n- Cause: Port 9222 already in use or Chrome can't bind to port\n- Solution: Close other Chrome instances or change CDP port\n\n**\"Browser failed to become ready within timeout\"**\n- Cause: Chrome launched but page context not ready\n- Solution: Check Chrome version compatibility, restart system\n\n**\"Error performing action: element not found\"**\n- Cause: Natural language description didn't match any page element\n- Solution: Use more specific description or use observe to find elements\n\n**\"Error extracting data: schema validation failed\"**\n- Cause: Extracted data type doesn't match schema\n- Solution: Verify schema types match actual page data\n\n**\"Error taking screenshot: directory not writable\"**\n- Cause: Insufficient permissions for screenshots directory\n- Solution: Check file permissions on `./agent/browser_screenshots/`\n\n---\n\n## Performance Considerations\n\n### Caching\n\nStagehand caches page analysis to improve performance on repeated actions. Cache is maintained for:\n- Element selectors\n- Page structure analysis\n- Vision model results\n\n### Timeouts\n\nDefault timeouts:\n- Navigation: 30 seconds\n- Action execution: 30 seconds\n- Extraction: 60 seconds\n- CDP connection: 15 seconds (50 retries × 300ms)\n\n### Resource Usage\n\nBrowser automation consumes:\n- Memory: ~200-500MB for Chrome process\n- CPU: Variable based on page complexity\n- Disk: ~50-200MB for Chrome profile\n- Network: Depends on pages visited\n\n---\n\n## Security Considerations\n\n### Credential Handling\n\n- Browser uses persistent profile (`.chrome-profile/`)\n- Saved passwords and cookies persist between sessions\n- Consider using isolated profiles for sensitive operations\n\n### Download Safety\n\n- Downloads automatically saved to `./agent/downloads/`\n- No file type restrictions enforced\n- Verify downloaded file integrity before use\n\n### Network Access\n\n- Browser has full network access\n- Respects system proxy settings\n- Can access localhost and internal networks\n\n---\n\n## Debugging Tips\n\n### Enable Verbose Logging\n\nEdit `src/cli.ts` and change verbose level in Stagehand configuration:\n\n```typescript\n// Change verbose: 0 to verbose: 1 or 2\nverbose: 2,  // Maximum verbosity\n```\n\n### View Chrome Console\n\nConnect to Chrome DevTools manually:\n1. Open Chrome\n2. Navigate to `chrome://inspect`\n3. Click \"inspect\" under Remote Target\n\n### Check CDP Connection\n\nTest CDP endpoint:\n```bash\ncurl http://localhost:9222/json/version\n```\n\n### Monitor Browser Process\n\nCheck Chrome process:\n```bash\nps aux | grep chrome\n```\n\n### View Screenshots\n\nScreenshots provide visual debugging:\n```bash\nls -lh ./agent/browser_screenshots/\nopen ./agent/browser_screenshots/screenshot-*.png\n```\n\n### Test CLI Commands\n\nTest individual commands:\n```bash\nbrowser navigate https://example.com\nbrowser screenshot\nbrowser close\n```\n\n---\n\n## Version Information\n\n- **Stagehand**: Uses `@browserbasehq/stagehand` package v2.5.2+\n- **Model**: Claude Haiku 4.5 (claude-haiku-4-5-20251001) for browser actions\n- **CLI Tool**: TypeScript CLI in `src/cli.ts`\n- **Agent SDK**: `@anthropic-ai/claude-agent-sdk` for conversation framework\n- **Browser**: Local Chrome/Chromium installation\n\nFor updates and changelog, see the main project repository.\n\nFile v1.0.0:setup.json\n\n{\n  \"setupComplete\": false,\n  \"prerequisites\": {\n    \"chrome\": {\n      \"required\": true,\n      \"installed\": false,\n      \"description\": \"Google Chrome browser\"\n    },\n    \"dependencies\": {\n      \"required\": true,\n      \"installed\": false,\n      \"description\": \"Node.js dependencies (npm install completed)\"\n    },\n    \"apiKey\": {\n      \"required\": true,\n      \"configured\": false,\n      \"description\": \"ANTHROPIC_API_KEY exported (i.e $ANTHROPIC_API_KEY) or in .env file\"\n    },\n    \"browserCommand\": {\n      \"required\": true,\n      \"installed\": false,\n      \"description\": \"Browser CLI command globally linked (npm link)\"\n    }\n  },\n  \"setupInstructions\": [\n    \"1. Run: npm install (this will automatically build TypeScript)\",\n    \"2. Run: npm link (this creates the global 'browser' command)\",\n    \"3. (RECOMMENDED) Export ANTHROPIC_API_KEY: export ANTHROPIC_API_KEY='your-api-key-here' (check if already exported)\",\n    \"   OR alternatively create .env file: cp .env.example .env and edit it to add your API key\",\n    \"4. Ensure Google Chrome is installed on your system\",\n    \"5. Test installation: browser navigate https://example.com\",\n    \"6. Update this setup.json file: set all 'installed'/'configured' to true and 'setupComplete' to true\"\n  ],\n  \"verifySetup\": \"Run 'browser navigate https://example.com' from any directory to verify installation\"\n}","readmeExcerpt":"Skill: Browser Automation Owner: peytoncasper Summary: Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Tags: latest:1.0.1 Version history: v1.0.1 | 2026-02-05T16:00:43.177Z | user Initial public release v1.0.0 | 2026-02-05","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"npm install    # Install dependencies\nnpm link       # Create global 'browser' command"},{"language":"bash","snippet":"browser navigate <url>                    # Go to URL\nbrowser act \"<action>\"                    # Natural language action\nbrowser extract \"<instruction>\" ['{}']    # Extract data (optional schema)\nbrowser observe \"<query>\"                 # Discover elements\nbrowser screenshot                        # Take screenshot\nbrowser close                             # Close browser"},{"language":"bash","snippet":"browser navigate https://example.com\nbrowser act \"click the Sign In button\"\nbrowser extract \"get the page title\"\nbrowser close"},{"language":"bash","snippet":"browser navigate https://example.com/product/123"},{"language":"bash","snippet":"browser extract \"Extract the product information\" '{\"productName\": \"string\", \"price\": \"number\", \"currency\": \"string\", \"inStock\": \"boolean\", \"rating\": \"number\", \"reviewCount\": \"number\"}'"},{"language":"bash","snippet":"browser close"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: browser\ndescription: Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications.\nallowed-tools: Bash\n---\n\n# Browser Automation\n\nAutomate browser interactions using Stagehand CLI with Claude.\n\n### First: Environment Selection (Local vs Remote)\n\nThe skill automatically selects between local and remote browser environments:\n- **If Browserbase API keys exist** (BROWSERBASE_API_KEY and BROWSERBASE_PROJECT_ID in .env file): Uses remote Browserbase environment\n- **If no Browserbase API keys**: Falls back to local Chrome browser\n- **No user prompting**: The selection happens automatically based on available configuration\n\n## Setup (First Time Only)\n\nCheck `setup.json` in this directory. If `setupComplete: false`:\n\n```bash\nnpm install    # Install dependencies\nnpm link       # Create global 'browser' command\n```\n\n## Commands\n\nAll commands work identically in both modes:\n\n```bash\nbrowser navigate <url>                    # Go to URL\nbrowser act \"<action>\"                    # Natural language action\nbrowser extract \"<instruction>\" ['{}']    # Extract data (optional schema)\nbrowser observe \"<query>\"                 # Discover elements\nbrowser screenshot                        # Take screenshot\nbrowser close                             # Close browser\n```\n\n## Quick Example\n\n```bash\nbrowser navigate https://example.com\nbrowser act \"click the Sign In button\"\nbrowser extract \"get the page title\"\nbrowser close\n```\n\n## Mode Comparison\n\n| Feature | Local | Browserbase |\n|---------|-------|-------------|\n| Speed | Faster | Slightly slower |\n| Setup | Chrome required | API key required |\n| Stealth mode | No | Yes |\n| Proxy/CAPTCHA | No | Yes |\n| Best for | Development | Production/scraping |\n\n## Best Practices\n\n1. **Always navigate first** before interacting\n2. **View screenshots** after each command to verify\n3. **Be specific** in action descriptions\n4. **Close browser** when done\n\n## Troubleshooting\n\n- **Chrome not found**: Install Chrome or use Browserbase mode\n- **Action fails**: Use `browser observe` to discover available elements\n- **Browserbase fails**: Verify API key and project ID are set\n\nFor detailed examples, see [EXAMPLES.md](EXAMPLES.md).\nFor API reference, see [REFERENCE.md](REFERENCE.md)."},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7ccvk3zbxj1yzzsxne9tfayn801hks\",\n  \"slug\": \"browser-automation\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1770307243177\n}"},{"path":"EXAMPLES.md","content":"# Browser Automation Examples\n\nThis document provides detailed examples of common browser automation tasks using the CLI tool.\n\n## Example 1: Extract Product Information from E-commerce\n\n**User request**: \"Go to example.com/product/123 and extract the product details\"\n\n**Workflow**:\n\n1. **Navigate** to the product page:\n   ```bash\n   browser navigate https://example.com/product/123\n   ```\n\n2. **Extract** product data with schema:\n   ```bash\n   browser extract \"Extract the product information\" '{\"productName\": \"string\", \"price\": \"number\", \"currency\": \"string\", \"inStock\": \"boolean\", \"rating\": \"number\", \"reviewCount\": \"number\"}'\n   ```\n\n3. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n**Expected result**: JSON object with product details that can be analyzed or stored.\n\n---\n\n## Example 2: Fill Out and Submit a Contact Form\n\n**User request**: \"Fill out the contact form on example.com with my information\"\n\n**Workflow**:\n\n1. **Navigate** to contact page:\n   ```bash\n   browser navigate https://example.com/contact\n   ```\n\n2. **Act**: Fill in name field:\n   ```bash\n   browser act \"Fill in the name field with 'John Doe'\"\n   ```\n\n3. **Act**: Fill in email field:\n   ```bash\n   browser act \"Fill in the email field with 'john.doe@example.com'\"\n   ```\n\n4. **Act**: Fill in message field:\n   ```bash\n   browser act \"Fill in the message field with 'I would like to inquire about your services'\"\n   ```\n\n5. **Act**: Submit the form:\n   ```bash\n   browser act \"Click the Submit button\"\n   ```\n\n6. **Screenshot** to capture confirmation:\n   ```bash\n   browser screenshot\n   ```\n\n7. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n---\n\n## Example 3: Research and Summarize News Articles\n\n**User request**: \"Check the latest tech news on techcrunch.com and summarize the top stories\"\n\n**Workflow**:\n\n1. **Navigate** to news site:\n   ```bash\n   browser navigate https://techcrunch.com\n   ```\n\n2. **Extract** article headlines and summaries:\n   ```bash\n   browser extract \"Extract the top 5 article headlines and their summaries\" '{\"headlines\": \"string\", \"summary\": \"string\", \"author\": \"string\", \"publishedDate\": \"string\"}'\n   ```\n\n3. **Close** the browser:\n   ```bash\n   browser close\n   ```\n\n4. Analyze and summarize the extracted data using Claude's text analysis capabilities.\n\n---\n\n## Example 4: Login and Navigate Authenticated Area\n\n**User request**: \"Log into example.com and navigate to my dashboard\"\n\n**Workflow**:\n\n1. **Navigate** to login page:\n   ```bash\n   browser navigate https://example.com/login\n   ```\n\n2. **Act**: Fill in username:\n   ```bash\n   browser act \"Fill in the username field with 'myusername'\"\n   ```\n\n3. **Act**: Fill in password:\n   ```bash\n   browser act \"Fill in the password field with 'mypassword'\"\n   ```\n\n4. **Act**: Click login button:\n   ```bash\n   browser act \"Click the Login button\"\n   ```\n\n5. **Act**: Wait for page load:\n   ```bash\n   browser act \"Wait for the page to fully load\"\n   ```\n\n6. **Navigate** to dashboard:\n   ```bash\n   b"},{"path":"REFERENCE.md","content":"# Browser Automation CLI Reference\n\nThis document provides detailed technical reference for the CLI browser automation tool.\n\n## Architecture Overview\n\nThe browser automation system consists of:\n\n- **Stagehand**: TypeScript library wrapping Playwright for AI-driven browser control. Uses AI model to find and interact with the right elements, so be specific\n- **Chrome CDP**: Chrome DevTools Protocol connection on port 9222\n- **CLI Tool**: Command-line interface in `src/cli.ts` for browser automation\n- **Local Chrome**: Chrome browser launched with remote debugging enabled\n\n### File Locations\n\n- **Chrome Profile**: `.chrome-profile/` - Persistent browser profile directory\n- **Screenshots**: `./agent/browser_screenshots/` - Screenshot output directory\n- **Downloads**: `./agent/downloads/` - File download directory\n\n## CLI Command Reference\n\n### navigate\n\nNavigate to a URL in the browser.\n\n**Usage**:\n```bash\nbrowser navigate <url>\n```\n\n**Parameters**:\n- `url` (string, required): The URL to navigate to. Must include protocol (http:// or https://)\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"message\": \"Successfully navigated to <url>\",\n  \"screenshot\": \"/path/to/screenshot.png\"\n}\n```\n\n**Implementation Details**:\n- Uses Playwright's `page.goto()` under the hood\n- Waits for network idle and DOM content loaded\n- Automatically takes a screenshot after navigation\n- Supports HTTPS upgrade for HTTP URLs\n\n**Example**:\n```bash\nbrowser navigate https://example.com\n```\n\n**Error Handling**:\n- Invalid URLs return error with `success: false`\n- Network timeouts return timeout error\n- SSL certificate errors may fail navigation\n\n---\n\n### act\n\nPerform an action on the page using natural language.\n\n**Usage**:\n```bash\nbrowser act \"<action>\"\n```\n\n**Parameters**:\n- `action` (string, required): Natural language description of the action to perform\n\n**Returns**:\nJSON output:\n```json\n{\n  \"success\": true,\n  \"message\": \"Successfully performed action: <action>\",\n  \"screenshot\": \"/path/to/screenshot.png\"\n}\n```\n\nNote: Without specificity it might succeed on the wrong element!\n\n**Implementation Details**:\n- Uses Stagehand's `page.act()` which leverages Claude Haiku 4.5\n- AI model interprets natural language and executes corresponding browser actions\n- Supports: clicking, typing, selecting, scrolling, waiting, hovering, and more\n- Automatically handles element location and interaction\n- Automatically takes a screenshot after the action\n\n**Natural Language Examples**:\n```bash\nbrowser act \"Click the login button\"\nbrowser act \"Fill in email field with test@example.com\"\nbrowser act \"Scroll to the bottom of the page\"\nbrowser act \"Select 'California' from the state dropdown\"\nbrowser act \"Hover over the menu icon\"\nbrowser act \"Wait for 3 seconds\"\nbrowser act \"Press the Enter key\"\nbrowser act \"Double-click the file icon\"\n```\n\n**Best Practices**:\n- Be **specific** about which element to interact with\n- Include visual descriptors (\"button next to the form\", \"top menu\", \"form at bot"},{"path":"setup.json","content":"{\n  \"setupComplete\": false,\n  \"prerequisites\": {\n    \"chrome\": {\n      \"required\": true,\n      \"installed\": false,\n      \"description\": \"Google Chrome browser\"\n    },\n    \"dependencies\": {\n      \"required\": true,\n      \"installed\": false,\n      \"description\": \"Node.js dependencies (npm install completed)\"\n    },\n    \"apiKey\": {\n      \"required\": true,\n      \"configured\": false,\n      \"description\": \"ANTHROPIC_API_KEY exported (i.e $ANTHROPIC_API_KEY) or in .env file\"\n    },\n    \"browserCommand\": {\n      \"required\": true,\n      \"installed\": false,\n      \"description\": \"Browser CLI command globally linked (npm link)\"\n    }\n  },\n  \"setupInstructions\": [\n    \"1. Run: npm install (this will automatically build TypeScript)\",\n    \"2. Run: npm link (this creates the global 'browser' command)\",\n    \"3. (RECOMMENDED) Export ANTHROPIC_API_KEY: export ANTHROPIC_API_KEY='your-api-key-here' (check if already exported)\",\n    \"   OR alternatively create .env file: cp .env.example .env and edit it to add your API key\",\n    \"4. Ensure Google Chrome is installed on your system\",\n    \"5. Test installation: browser navigate https://example.com\",\n    \"6. Update this setup.json file: set all 'installed'/'configured' to true and 'setupComplete' to true\"\n  ],\n  \"verifySetup\": \"Run 'browser navigate https://example.com' from any directory to verify installation\"\n}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Skill: Browser Automation Owner: peytoncasper Summary: Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Tags: latest:1.0.1 Version history: v1.0.1 | 2026-02-05T16:00:43.177Z | user Initial public release v1.0.0 | 2026-02-05","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1161,"uniquenessScore":46,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-05-19T07:01:21.605Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-05-19T07:01:21.605Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T09:15:23.862Z","emptyReason":null},"items":[{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-10T18:48:31.762Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}