browser-use/SKILL.md
AI-powered browser automation using the browser-use Python library. Use when the user requests web automation tasks including web scraping and data extraction, form filling and submission, automated testing and validation, web navigation and interaction, or any task requiring programmatic browser control. Supports natural language task descriptions that are executed by AI agents.
npx skillsauth add jswortz/my-skills browser-useInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
AI-powered browser automation that executes web tasks from natural language descriptions using the browser-use Python library.
Browser-use enables browser automation through natural language task descriptions:
from browser_use import Agent, Browser, ChatBrowserUse
import asyncio
async def automate():
browser = Browser()
llm = ChatBrowserUse()
agent = Agent(
task="Go to github.com/browser-use/browser-use and find the star count",
llm=llm,
browser=browser,
)
result = await agent.run()
await browser.close()
return result
asyncio.run(automate())
Before using browser-use, ensure it's installed. Check and install automatically:
python scripts/check_install.py
Or install manually:
pip install browser-use
Identify what the user wants to accomplish:
Translate the user's request into a clear, specific task description for the AI agent. Be explicit about:
Good example: "Go to example.com/products, filter by category 'Electronics', and extract the name and price of the first 10 products"
Avoid: "Get product data" (too vague)
Use the basic pattern from scripts/basic_automation.py:
from browser_use import Agent, Browser, ChatBrowserUse
import asyncio
async def run_task(task_description: str):
browser = Browser()
llm = ChatBrowserUse()
agent = Agent(
task=task_description,
llm=llm,
browser=browser,
)
try:
result = await agent.run()
return result
finally:
await browser.close()
# Run it
result = asyncio.run(run_task("Your task here"))
Run the script and adjust the task description if needed for better results.
Extract data from websites:
task = "Go to news.ycombinator.com and extract the titles of the top 10 stories"
Automate form submission:
task = """
Go to example.com/contact-us
Fill out the form with:
- Name: John Doe
- Email: [email protected]
- Message: I'm interested in your services
Then click Submit
"""
Handle complex workflows:
task = """
1. Go to example.com
2. Click on 'Products' in the navigation
3. Filter by price range $50-$100
4. Sort by 'Most Popular'
5. Click on the first product and get its description
"""
Handle dynamic scenarios:
task = """
Go to example.com/dashboard
If prompted to log in, use username '[email protected]' and password 'secure123'
Once logged in, navigate to Settings and export data
"""
Run browser without UI for faster execution:
browser = Browser(headless=True)
Avoid detection for sensitive scraping:
browser = Browser(stealth=True)
Extend agent capabilities with custom functions:
from browser_use import Controller
@Controller.action("Save to file")
def save_data(content: str, filename: str):
with open(filename, 'w') as f:
f.write(content)
return f"Saved to {filename}"
controller = Controller()
agent = Agent(task="...", llm=llm, browser=browser, controller=controller)
Use cloud-hosted browsers:
browser = Browser(cloud=True, cloud_provider="browserbase")
For comprehensive examples including data extraction patterns, form automation, navigation strategies, and error handling, see:
references/common_patterns.md
Load this file when you need detailed code examples or are implementing complex automation workflows.
Task not completing correctly:
Installation issues:
scripts/check_install.py to verify installationBrowser crashes or hangs:
research
Constant-Time Analyzer (ct-analyzer)
testing
--- name: condition-based-waiting description: -- name: Condition-Based Waiting description: Replace arbitrary timeouts with condition polling for reliable async tests when_to_use: when tests have ... --- -- name: Condition-Based Waiting description: Replace arbitrary timeouts with condition polling for reliable async tests when_to_use: when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior version: 1.1.0 languages: all --- # Condition-Based Waiting ## Overvi
testing
--- name: collision-zone-thinking description: -- name: Collision-Zone Thinking description: Force unrelated concepts together to discover emergent properties - "What if we treated X like Y?" when_... --- -- name: Collision-Zone Thinking description: Force unrelated concepts together to discover emergent properties - "What if we treated X like Y?" when_to_use: when conventional approaches feel inadequate and you need breakthrough innovation by forcing unrelated concepts together version: 1.1.0
documentation
--- name: canvas-design description: -- name: canvas-design description: Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the... --- -- name: canvas-design description: Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid