Use when the user asks to browse websites, navigate web pages, extract data from sites, interact with web forms, search for online information, test web applications, or automate any web-based task. Trigger on requests like "go to website X", "search for Y on the web", "find Z online", "fill out this form", "get data from this page", or any task requiring a web browser.
/plugin marketplace add asermax/claude-plugins/plugin install superpowers@asermax-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
pyproject.tomlscripts/browser-cliscripts/browser-cli.pyscripts/browser-daemonscripts/browser-daemon.pytest-cases.jsonuv.lock⚠️ MANDATORY WORKFLOW:
- Start daemon with initial context:
scripts/browser-daemon --initial-context-name <name> [--initial-context-url <url>]- Delegate to browser-agent with context assignment
- Create additional contexts if needed:
scripts/browser-cli create-browsing-context <name>- Close extra contexts when done (optional)
- Stop daemon ONLY when user explicitly requests:
scripts/browser-cli quit
Browsing contexts are named browser tabs with full action history. Each context:
ALWAYS start the daemon with an initial browsing context:
scripts/browser-daemon --initial-context-name <name> [--initial-context-url <url>]
Parameters:
--initial-context-name (required) - Name for the initial browsing context--initial-context-url (optional) - URL to navigate to (defaults to about:blank)Examples:
# Start with blank context
scripts/browser-daemon --initial-context-name main
# Start and navigate to URL
scripts/browser-daemon --initial-context-name shopping --initial-context-url https://amazon.com
This:
Note: The PreToolUse hook automatically runs this in the background.
scripts/browser-cli status
Returns:
IMPORTANT: Only stop the daemon when the user explicitly requests to close the browser.
DO NOT automatically stop the daemon after completing tasks. The browser should remain open for potential follow-up work unless the user specifically asks to close it.
To stop the daemon (only when explicitly requested):
scripts/browser-cli quit
This:
The initial browsing context is created automatically when you start the daemon with --initial-context-name.
You can use this context immediately for delegating work to browser-agents.
Only needed for parallel multi-tab automation:
scripts/browser-cli create-browsing-context <name> [--url <initial-url>]
Examples:
# Create blank context
scripts/browser-cli create-browsing-context research
# Create and navigate to URL
scripts/browser-cli create-browsing-context comparison --url https://ebay.com
Naming guidelines:
Check what's happening across all contexts:
scripts/browser-cli status
Example output:
{
"status": "running",
"connected_to_chrome": true,
"browsing_contexts": [
{
"name": "shopping",
"url": "https://amazon.com/cart",
"title": "Shopping Cart",
"age_minutes": 5.2,
"recent_history": [
{"action": "create", "intention": "Starting shopping session", "result": "OK"},
{"action": "navigate", "intention": "Going to Amazon", "result": "OK"},
{"action": "type", "intention": "Searching for laptop", "result": "OK"},
{"action": "click", "intention": "Opening first result", "result": "OK"}
]
}
]
}
When a context is no longer needed:
scripts/browser-cli close-browsing-context <name>
When to close:
YOU must decompose multi-page requests into single-page tasks.
Browser-agent works on ONE PAGE at a time. When a user asks for work spanning multiple pages:
WRONG: "Go to Amazon, click 3 products, extract specs from each" RIGHT: Separate calls: "Extract product links" → "Navigate to link 1" → "Extract specs" → "Navigate to link 2" → ...
YOU must explore the page by asking questions before giving specific instructions.
Don't make assumptions about page structure. Use the agent as your eyes first:
WRONG: Assume structure and give blind instructions
Task(prompt="Click the 'Sign In' button in the top-right corner")
# Fails if button is labeled differently or in a different location
RIGHT: Ask questions first, then give specific instructions
# Step 1: Explore
Task(prompt="Is there a sign-in or login button on this page? Where is it located?")
# Returns: "Yes, there's a 'Log In' link in the header navigation"
# Step 2: Act based on what you learned
Task(prompt="Click the 'Log In' link in the header")
Benefits:
CRITICAL: Always provide:
Task(
description="Extract product info",
subagent_type="superpowers:browser-agent",
model="haiku",
prompt=f"""Scripts path: ${{CLAUDE_PLUGIN_ROOT}}/skills/using-browser/scripts
Browsing context: shopping
Extract the first 3 product titles and prices from this page."""
)
Browser-agent is bounded to the CURRENT PAGE ONLY:
If you send a multi-page task, the agent SHOULD reject it. This is by design.
You are the brain. Browser-agent is your eyes and hands for ONE PAGE at a time.
When you don't know page structure:
Task(prompt="Is there a search box on this page?")
# Returns: "Yes, there's a search box at the top labeled 'Search Amazon'"
Task(prompt="What navigation links are available?")
# Returns: "I see links for: Products, About, Contact, Login"
Task(prompt="Find the login button")
# Returns: "Found login button in the top-right corner"
When you know what to do, give compound instructions that work on current page:
# Navigation (if needed)
Task(prompt="Navigate to amazon.com")
# Compound actions on current page
Task(prompt="Search for 'laptop' and extract the first 5 product titles and prices")
# Or break into logical steps
Task(prompt="Type 'laptop' in the search box and click search")
Task(prompt="Wait for results and extract first 5 products with prices")
For repetitive extraction (same data from multiple pages):
Task(prompt="Extract all category names and links from this page")
# Returns: ["Electronics: /electronics", "Books: /books", "Clothing: /clothing"]
# Navigate to first example
Task(prompt="Navigate to /electronics")
Task(prompt="Explore the page structure and manually extract product names and prices. Document what you find.")
# Returns: Extracted products using selectors .product-card h3 and .product-card .price
# Navigate to second example
Task(prompt="Navigate to /books")
Task(prompt="Extract products using the same approach. Identify what's constant vs variable.")
# Returns: Same selectors work. Constant: selectors. Variable: data values.
# Get validated script
Task(prompt="Create and validate a reusable eval script for extracting products")
# Returns: Script + validation results
for category in remaining_categories:
Task(prompt=f"""Navigate to {category['link']}
Run this eval script: {script}
Return the extracted data""")
This keeps script generation intelligence in the agent while orchestration stays with you.
If step fails, retry up to 3 times:
After 3 failures: Report to user with context and last error.
User: "Find laptop prices on Amazon"
# 1. Start daemon
scripts/browser-daemon --initial-context-name amazon --initial-context-url https://amazon.com
# 2. Search for laptops
Task(prompt="""Scripts path: ${CLAUDE_PLUGIN_ROOT}/skills/using-browser/scripts
Browsing context: amazon
Type 'laptop' in the search box and click search""")
# 3. Extract results
Task(prompt="""Scripts path: ${CLAUDE_PLUGIN_ROOT}/skills/using-browser/scripts
Browsing context: amazon
Wait for results to load, then extract first 5 products with prices""")
# Returns: ["Dell Laptop - $599", "HP Pavilion - $649", ...]
# 4. Present to user
"Found 5 laptops on Amazon: Dell - $599, HP - $649, ..."
# Browser stays open for follow-up work
# Only quit if user explicitly asks: scripts/browser-cli quit
User: "Check if this page has a login form"
# Already on some page in browsing context "research"
# Ask agent to explore current page
Task(prompt="""Scripts path: ${CLAUDE_PLUGIN_ROOT}/skills/using-browser/scripts
Browsing context: research
Is this a login page? Look for username/password fields""")
# Returns: "Yes, this is a login page. I see email and password inputs, plus a 'Sign In' button"
# Now you know what to do - fill and submit in one action
Task(prompt="""Scripts path: ${CLAUDE_PLUGIN_ROOT}/skills/using-browser/scripts
Browsing context: research
Fill in email 'user@example.com' and password 'password123', then click Sign In""")
# Browser stays open for follow-up work
User: "Compare laptop prices on Amazon, eBay, and Walmart"
# 1. Start daemon with initial context
scripts/browser-daemon --initial-context-name amazon --initial-context-url https://amazon.com
# 2. Create additional contexts for parallel work
scripts/browser-cli create-browsing-context ebay --url https://ebay.com
scripts/browser-cli create-browsing-context walmart --url https://walmart.com
# 3. Execute search on each site and extract prices
# (Can run in parallel by making multiple Task calls in single message)
Task(prompt="""Scripts path: ${CLAUDE_PLUGIN_ROOT}/skills/using-browser/scripts
Browsing context: amazon
Search for 'laptop' and extract top 3 prices""")
# Returns: ["$599", "$649", "$549"]
Task(prompt="""Scripts path: ${CLAUDE_PLUGIN_ROOT}/skills/using-browser/scripts
Browsing context: ebay
Search for 'laptop' and extract top 3 prices""")
# Returns: ["$550", "$620", "$510"]
Task(prompt="""Scripts path: ${CLAUDE_PLUGIN_ROOT}/skills/using-browser/scripts
Browsing context: walmart
Search for 'laptop' and extract top 3 prices""")
# Returns: ["$579", "$639", "$529"]
# 4. Compare and present
"Price comparison:
Amazon: $599, $649, $549 (avg: $599)
eBay: $550, $620, $510 (avg: $560)
Walmart: $579, $639, $529 (avg: $582)
eBay has the lowest average price."
# Browser stays open for follow-up work
Browser-agents can check what happened in the same context:
# You navigate to Wikipedia
Task(prompt="""Scripts path: ${CLAUDE_PLUGIN_ROOT}/skills/using-browser/scripts
Browsing context: research
Navigate to wikipedia.org""")
# You tell agent to search
Task(prompt="""Scripts path: ${CLAUDE_PLUGIN_ROOT}/skills/using-browser/scripts
Browsing context: research
Type 'Artificial Intelligence' in the search box and click search""")
# Later, you ask agent to continue
Task(prompt="""Scripts path: ${CLAUDE_PLUGIN_ROOT}/skills/using-browser/scripts
Browsing context: research
Click on the 'History of AI' section and extract the first paragraph""")
# Agent checks browsing-context-history, sees previous actions, knows it's already on AI article
The agent uses context history to understand:
scripts/browser-daemon --initial-context-name <name>scripts/browser-cli status to see available contextsscripts/browser-cli create-browsing-context <name>scripts/browser-daemon --initial-context-name <name>This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.