{"id":"60fda597-0554-431c-a601-2e26014162d3","shortId":"PzuqSH","kind":"skill","title":"browser-automation-agent","tagline":"Automate web browsers for AI agents using agent-browser CLI with deterministic element selection.","description":"# Browser Automation with Agent-Browser\n\nAgent-browser is a headless browser automation CLI designed specifically for AI agents. It provides fast browser control with deterministic element selection through accessibility tree snapshots, making it ideal for agent-driven web automation workflows.\n\n## When to use\n\n- Use case 1: When the user asks to automate web interactions (fill forms, click buttons, navigate sites)\n- Use case 2: When you need to capture screenshots or generate PDFs of web pages\n- Use case 3: For web scraping tasks that require JavaScript rendering or complex interactions\n- Use case 4: When building automation workflows that need deterministic element references\n- Use case 5: For testing web applications with agent-driven scenarios\n\n## Required tools / APIs\n\n- No external API required (runs locally)\n- agent-browser: Headless browser CLI with Rust/Node.js implementation\n- Chromium: Downloaded automatically during installation\n\nInstall options:\n\n```bash\n# via npm (global)\nnpm install -g agent-browser\nagent-browser install  # Downloads Chromium\n\n# via Homebrew (macOS/Linux)\nbrew install agent-browser\n\n# Verify installation\nagent-browser --version\n```\n\n## Skills\n\n### browser_open_and_snapshot\n\nOpen a URL and capture the accessibility tree to identify interactive elements.\n\n```bash\n# Open a webpage\nagent-browser open https://example.com\n\n# Get snapshot with element references\nagent-browser snapshot\n\n# The snapshot shows elements with @e1, @e2 references\n# Example output:\n# @e1 button \"Sign In\"\n# @e2 input \"Email\" (email)\n# @e3 input \"Password\" (password)\n```\n\n**Node.js:**\n\n```javascript\nconst { execSync } = require('child_process');\n\nfunction browserCommand(cmd) {\n  return execSync(`agent-browser ${cmd}`, { encoding: 'utf-8' });\n}\n\nasync function openAndSnapshot(url) {\n  browserCommand(`open ${url}`);\n  await new Promise(r => setTimeout(r, 2000)); // Wait for page load\n  const snapshot = browserCommand('snapshot');\n  return snapshot; // Returns element tree with references\n}\n\n// Usage\n// const elements = await openAndSnapshot('https://example.com');\n// console.log(elements);\n```\n\n### browser_interact\n\nInteract with page elements using deterministic references from snapshots.\n\n```bash\n# Fill a form field\nagent-browser fill @e2 \"user@example.com\"\nagent-browser fill @e3 \"password123\"\n\n# Click a button\nagent-browser click @e1\n\n# Type text into active element\nagent-browser type \"search query\" --enter\n\n# Navigate\nagent-browser back\nagent-browser forward\nagent-browser reload\n```\n\n**Node.js:**\n\n```javascript\nfunction fillForm(formData) {\n  for (const [ref, value] of Object.entries(formData)) {\n    execSync(`agent-browser fill ${ref} \"${value}\"`, { encoding: 'utf-8' });\n  }\n}\n\nfunction clickElement(ref) {\n  return execSync(`agent-browser click ${ref}`, { encoding: 'utf-8' });\n}\n\n// Usage\n// fillForm({ '@e2': 'user@example.com', '@e3': 'password123' });\n// clickElement('@e1');\n```\n\n### browser_capture\n\nCapture screenshots, PDFs, or extract page content.\n\n```bash\n# Take a screenshot\nagent-browser screenshot output.png\n\n# Generate PDF\nagent-browser pdf document.pdf\n\n# Get page text content\nagent-browser text\n\n# Get HTML source\nagent-browser html\n\n# Get specific element attribute\nagent-browser attribute @e5 href\n```\n\n**Node.js:**\n\n```javascript\nfunction captureScreenshot(filename) {\n  return execSync(`agent-browser screenshot ${filename}`, { encoding: 'utf-8' });\n}\n\nfunction generatePDF(filename) {\n  return execSync(`agent-browser pdf ${filename}`, { encoding: 'utf-8' });\n}\n\nfunction getPageText() {\n  return execSync('agent-browser text', { encoding: 'utf-8' });\n}\n\nfunction getElementAttribute(ref, attr) {\n  return execSync(`agent-browser attribute ${ref} ${attr}`, { encoding: 'utf-8' }).trim();\n}\n\n// Usage\n// captureScreenshot('page.png');\n// const text = getPageText();\n// const link = getElementAttribute('@e10', 'href');\n```\n\n### browser_session_management\n\nManage browser sessions, tabs, and persistent state.\n\n```bash\n# Session management\nagent-browser open https://example.com --session myapp\nagent-browser close --session myapp\n\n# Tab management\nagent-browser open https://example.com --new-tab\nagent-browser tabs list\nagent-browser tabs switch 0\n\n# Cookie and storage\nagent-browser cookies get example.com\nagent-browser storage set mykey \"myvalue\"\nagent-browser storage get mykey\n\n# Close browser\nagent-browser close\n```\n\n**Node.js:**\n\n```javascript\nfunction openSession(url, sessionName) {\n  return execSync(`agent-browser open ${url} --session ${sessionName}`, { encoding: 'utf-8' });\n}\n\nfunction closeSession(sessionName) {\n  return execSync(`agent-browser close --session ${sessionName}`, { encoding: 'utf-8' });\n}\n\nfunction manageStorage(action, key, value = null) {\n  const cmd = value\n    ? `agent-browser storage ${action} ${key} \"${value}\"`\n    : `agent-browser storage ${action} ${key}`;\n  return execSync(cmd, { encoding: 'utf-8' }).trim();\n}\n\n// Usage\n// openSession('https://app.example.com', 'shopping-session');\n// manageStorage('set', 'cart-id', '12345');\n// const cartId = manageStorage('get', 'cart-id');\n```\n\n## Rate limits / Best practices\n\n- Add delays between interactions (1-2 seconds) to allow page rendering\n- Use `--wait` flag for actions that trigger navigation or async updates\n- Close browser sessions when done to free system resources\n- Use `--session` flags to isolate different automation workflows\n- Cache snapshots when repeatedly interacting with the same page structure\n- Prefer element references (@e1) over selectors for deterministic behavior\n\n## Agent prompt\n\n```text\nYou have browser automation capability through agent-browser. When a user asks to automate web interactions:\n\n1. Open the URL with `agent-browser open <url>`\n2. Get the accessibility snapshot with `agent-browser snapshot` to identify interactive elements\n3. Parse the snapshot output to find element references (like @e1, @e2)\n4. Use `fill`, `click`, or `type` commands with element references to interact\n5. Use `screenshot` or `pdf` to capture results when requested\n6. Always close the browser session with `agent-browser close` when done\n\nFor multi-step workflows:\n- Wait 1-2 seconds between actions for page updates\n- Take snapshots after navigation to get updated element references\n- Use sessions (`--session name`) to maintain state across multiple operations\n- Extract page text or HTML to verify successful interactions\n\nAlways prefer agent-browser over other scraping tools when:\n- JavaScript rendering is required\n- User interactions (clicks, form fills) are needed\n- You need screenshots or visual verification\n```\n\n## Troubleshooting\n\n**Error: Chromium not installed:**\n- Symptom: \"Browser binary not found\" error\n- Solution: Run `agent-browser install` to download Chromium\n\n**Error: Element reference not found (@e5):**\n- Symptom: \"Element not found\" when using a reference\n- Solution: Take a fresh snapshot after page navigation; element references change between pages\n\n**Error: Timeout waiting for element:**\n- Symptom: Commands hang or timeout\n- Solution: Add explicit wait time with `--wait 5000` flag or use delays between commands\n\n**Page not fully loaded:**\n- Symptom: Snapshot shows incomplete page elements\n- Solution: Add sleep/delay after opening URL before taking snapshot\n\n**Session conflicts:**\n- Symptom: \"Session already exists\" or unexpected state\n- Solution: Close existing sessions with `agent-browser close --session <name>` before starting new ones\n\n## See also\n\n- [using-web-scraping.md](using-web-scraping.md) — HTML parsing and content extraction without browser\n- [generate-report.md](generate-report.md) — Creating reports from scraped data\n- [pdf-manipulation.md](pdf-manipulation.md) — Working with generated PDFs\n\n---\n\n## Additional Notes\n\n### Advantages over traditional scraping\n- Handles JavaScript-rendered content automatically\n- Deterministic element selection through accessibility tree\n- Screenshot and PDF generation built-in\n- Persistent sessions and state management\n- Designed for agent workflows with clear CLI interface\n\n### Cloud integration (optional)\nAgent-browser supports cloud browser providers:\n- Browserbase: `agent-browser --provider browserbase`\n- Browser Use: Enterprise browser automation\n- Kernel: Distributed browser sessions\n\nFor most use cases, local installation is sufficient and avoids external dependencies.","tags":["browser","automation","agent","open","skills","besoeasy","agent-skills","ai-agents","claude-code","clawdbot","clawdbot-skill","llm-tools"],"capabilities":["skill","source-besoeasy","skill-browser-automation-agent","topic-agent-skills","topic-ai-agents","topic-claude-code","topic-clawdbot","topic-clawdbot-skill","topic-llm-tools","topic-mcp-server","topic-openai","topic-openclaw","topic-vibe-coding","topic-vibecoding"],"categories":["open-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/besoeasy/open-skills/browser-automation-agent","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add besoeasy/open-skills","source_repo":"https://github.com/besoeasy/open-skills","install_from":"skills.sh"}},"qualityScore":"0.505","qualityRationale":"deterministic score 0.51 from registry signals: · indexed on github topic:agent-skills · 111 github stars · SKILL.md body (8,373 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T12:55:02.570Z","embedding":null,"createdAt":"2026-04-18T22:10:32.743Z","updatedAt":"2026-05-02T12:55:02.570Z","lastSeenAt":"2026-05-02T12:55:02.570Z","tsv":"'-2':688,838 '-8':266,386,399,472,485,496,511,616,630,658 '0':570 '1':68,687,761,837 '12345':671 '2':85,770 '2000':280 '3':100,784 '4':114,796 '5':126,808 '5000':964 '6':818 'access':50,202,773,1053 'across':861 'action':633,644,651,698,841 'activ':343 'add':683,958,982 'addit':1037 'advantag':1039 'agent':4,10,13,24,27,39,58,133,146,169,172,183,188,213,223,261,321,327,336,346,354,358,362,379,393,422,429,438,445,453,466,479,491,504,538,545,553,561,566,575,581,588,596,608,623,641,648,741,751,767,777,826,876,914,1005,1069,1079,1087 'agent-brows':12,23,26,145,168,171,182,187,212,222,260,320,326,335,345,353,357,361,378,392,421,428,437,444,452,465,478,490,503,537,544,552,560,565,574,580,587,595,607,622,640,647,750,766,776,825,875,913,1004,1078,1086 'agent-driven':57,132 'ai':9,38 'allow':691 'alreadi':994 'also':1014 'alway':819,873 'api':138,141 'app.example.com':662 'applic':130 'ask':72,756 'async':267,703 'attr':500,508 'attribut':451,455,506 'autom':3,5,21,33,61,74,117,720,747,758,1095 'automat':156,1048 'avoid':1109 'await':274,299 'back':356 'bash':161,208,315,417,534 'behavior':740 'best':681 'binari':907 'brew':180 'browser':2,7,14,20,25,28,32,43,147,149,170,173,184,189,192,214,224,262,304,322,328,337,347,355,359,363,380,394,408,423,430,439,446,454,467,480,492,505,524,528,539,546,554,562,567,576,582,589,594,597,609,624,642,649,706,746,752,768,778,822,827,877,906,915,1006,1023,1080,1083,1088,1091,1094,1098 'browser-automation-ag':1 'browserbas':1085,1090 'browsercommand':256,271,287 'build':116 'built':1060 'built-in':1059 'button':80,237,334 'cach':722 'capabl':748 'captur':90,200,409,410,814 'capturescreenshot':461,514 'cart':669,677 'cart-id':668,676 'cartid':673 'case':67,84,99,113,125,1103 'chang':944 'child':253 'chromium':154,176,902,919 'clear':1072 'cli':15,34,150,1073 'click':79,332,338,395,799,889 'clickel':388,406 'close':547,593,598,625,705,820,828,1000,1007 'closesess':618 'cloud':1075,1082 'cmd':257,263,638,655 'command':802,953,970 'complex':110 'conflict':991 'console.log':302 'const':250,285,297,371,516,519,637,672 'content':416,436,1020,1047 'control':44 'cooki':571,577 'creat':1026 'data':1030 'delay':684,968 'depend':1111 'design':35,1067 'determinist':17,46,121,311,739,1049 'differ':719 'distribut':1097 'document.pdf':432 'done':709,830 'download':155,175,918 'driven':59,134 'e1':231,236,339,407,735,794 'e10':522 'e2':232,240,324,402,795 'e3':244,330,404 'e5':456,925 'element':18,47,122,207,220,229,292,298,303,309,344,450,733,783,791,804,852,921,927,942,951,980,1050 'email':242,243 'encod':264,384,397,470,483,494,509,614,628,656 'enter':351 'enterpris':1093 'error':901,910,920,947 'exampl':234 'example.com':216,301,541,556,579 'execsync':251,259,377,391,464,477,489,502,606,621,654 'exist':995,1001 'explicit':959 'extern':140,1110 'extract':414,864,1021 'fast':42 'field':319 'filenam':462,469,475,482 'fill':77,316,323,329,381,798,891 'fillform':368,401 'find':790 'flag':696,716,965 'form':78,318,890 'formdata':369,376 'forward':360 'found':909,924,929 'free':711 'fresh':937 'fulli':973 'function':255,268,367,387,460,473,486,497,601,617,631 'g':167 'generat':93,426,1035,1058 'generate-report.md':1024,1025 'generatepdf':474 'get':217,433,441,448,578,591,675,771,850 'getelementattribut':498,521 'getpagetext':487,518 'global':164 'handl':1043 'hang':954 'headless':31,148 'homebrew':178 'href':457,523 'html':442,447,868,1017 'id':670,678 'ideal':55 'identifi':205,781 'implement':153 'incomplet':978 'input':241,245 'instal':158,159,166,174,181,186,904,916,1105 'integr':1076 'interact':76,111,206,305,306,686,726,760,782,807,872,888 'interfac':1074 'isol':718 'javascript':107,249,366,459,600,883,1045 'javascript-rend':1044 'kernel':1096 'key':634,645,652 'like':793 'limit':680 'link':520 'list':564 'load':284,974 'local':144,1104 'macos/linux':179 'maintain':859 'make':53 'manag':526,527,536,551,1066 'managestorag':632,666,674 'multi':833 'multi-step':832 'multipl':862 'myapp':543,549 'mykey':585,592 'myvalu':586 'name':857 'navig':81,352,701,848,941 'need':88,120,893,895 'new':275,558,1011 'new-tab':557 'node.js':248,365,458,599 'note':1038 'npm':163,165 'null':636 'object.entries':375 'one':1012 'open':193,196,209,215,272,540,555,610,762,769,985 'openandsnapshot':269,300 'opensess':602,661 'oper':863 'option':160,1077 'output':235,788 'output.png':425 'page':97,283,308,415,434,692,730,843,865,940,946,971,979 'page.png':515 'pars':785,1018 'password':246,247 'password123':331,405 'pdf':427,431,481,812,1057 'pdf-manipulation.md':1031,1032 'pdfs':94,412,1036 'persist':532,1062 'practic':682 'prefer':732,874 'process':254 'promis':276 'prompt':742 'provid':41,1084,1089 'queri':350 'r':277,279 'rate':679 'ref':372,382,389,396,499,507 'refer':123,221,233,295,312,734,792,805,853,922,933,943 'reload':364 'render':108,693,884,1046 'repeat':725 'report':1027 'request':817 'requir':106,136,142,252,886 'resourc':713 'result':815 'return':258,289,291,390,463,476,488,501,605,620,653 'run':143,912 'rust/node.js':152 'scenario':135 'scrape':103,880,1029,1042 'screenshot':91,411,420,424,468,810,896,1055 'search':349 'second':689,839 'see':1013 'select':19,48,1051 'selector':737 'session':525,529,535,542,548,612,626,665,707,715,823,855,856,990,993,1002,1008,1063,1099 'sessionnam':604,613,619,627 'set':584,667 'settimeout':278 'shop':664 'shopping-sess':663 'show':228,977 'sign':238 'site':82 'skill':191 'skill-browser-automation-agent' 'sleep/delay':983 'snapshot':52,195,218,225,227,286,288,290,314,723,774,779,787,846,938,976,989 'solut':911,934,957,981,999 'sourc':443 'source-besoeasy' 'specif':36,449 'start':1010 'state':533,860,998,1065 'step':834 'storag':573,583,590,643,650 'structur':731 'success':871 'suffici':1107 'support':1081 'switch':569 'symptom':905,926,952,975,992 'system':712 'tab':530,550,559,563,568 'take':418,845,935,988 'task':104 'test':128 'text':341,435,440,493,517,743,866 'time':961 'timeout':948,956 'tool':137,881 'topic-agent-skills' 'topic-ai-agents' 'topic-claude-code' 'topic-clawdbot' 'topic-clawdbot-skill' 'topic-llm-tools' 'topic-mcp-server' 'topic-openai' 'topic-openclaw' 'topic-vibe-coding' 'topic-vibecoding' 'tradit':1041 'tree':51,203,293,1054 'trigger':700 'trim':512,659 'troubleshoot':900 'type':340,348,801 'unexpect':997 'updat':704,844,851 'url':198,270,273,603,611,764,986 'usag':296,400,513,660 'use':11,65,66,83,98,112,124,310,694,714,797,809,854,931,967,1092,1102 'user':71,755,887 'user@example.com':325,403 'using-web-scraping.md':1015,1016 'utf':265,385,398,471,484,495,510,615,629,657 'valu':373,383,635,639,646 'verif':899 'verifi':185,870 'version':190 'via':162,177 'visual':898 'wait':281,695,836,949,960,963 'web':6,60,75,96,102,129,759 'webpag':211 'without':1022 'work':1033 'workflow':62,118,721,835,1070","prices":[{"id":"61a174ee-c108-4b6b-82a8-d09666cd64b3","listingId":"60fda597-0554-431c-a601-2e26014162d3","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"besoeasy","category":"open-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:10:32.743Z"}],"sources":[{"listingId":"60fda597-0554-431c-a601-2e26014162d3","source":"github","sourceId":"besoeasy/open-skills/browser-automation-agent","sourceUrl":"https://github.com/besoeasy/open-skills/tree/main/skills/browser-automation-agent","isPrimary":false,"firstSeenAt":"2026-04-18T22:10:32.743Z","lastSeenAt":"2026-05-02T12:55:02.570Z"}],"details":{"listingId":"60fda597-0554-431c-a601-2e26014162d3","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"besoeasy","slug":"browser-automation-agent","github":{"repo":"besoeasy/open-skills","stars":111,"topics":["agent-skills","ai","ai-agents","claude-code","clawdbot","clawdbot-skill","llm-tools","mcp-server","openai","openclaw","vibe-coding","vibecoding"],"license":null,"html_url":"https://github.com/besoeasy/open-skills","pushed_at":"2026-03-31T13:05:30Z","description":"Battle-tested skill library for AI agents. Save 98% of API costs with ready-to-use code for crypto, PDFs, search, web scraping & more. No trial-and-error, no expensive APIs.","skill_md_sha":"b7e5163725d0108d9086f67f9292ea5aa0666183","skill_md_path":"skills/browser-automation-agent/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/besoeasy/open-skills/tree/main/skills/browser-automation-agent"},"layout":"multi","source":"github","category":"open-skills","frontmatter":{"name":"browser-automation-agent","description":"Automate web browsers for AI agents using agent-browser CLI with deterministic element selection."},"skills_sh_url":"https://skills.sh/besoeasy/open-skills/browser-automation-agent"},"updatedAt":"2026-05-02T12:55:02.570Z"}}