No slash command · from browser-use
Provides patterns for browser navigation, multi-tab workflows, session lifecycle management, and login reuse via export/import. Useful when opening or switching tabs, managing browser sessions, or reusing logins across sessions.
Ships in browser-use. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Patterns for URL navigation, multi-tab workflows, session lifecycle management, and keeping a login across sessions.
The fundamental browser pattern: navigate, inspect, interact, close.
Step 1: Navigate to URL (session created automatically)
mcp__plugin_browser-use_browser-use__browser_navigate(url="https://example.com")
mcp__plugin_browser-use_browser-use__browser_list_sessions()
→ record the new session's id (navigate itself returns only "Navigated to: …")
Step 2: Inspect the page
mcp__plugin_browser-use_browser-use__browser_get_state()
→ Returns interactive_elements, each with an index (the element's Chrome node id)
Step 3: Interact (optional)
mcp__plugin_browser-use_browser-use__browser_click(index=1834)
Step 4: Always close
mcp__plugin_browser-use_browser-use__browser_close_session(session_id="abc123")
Verify page loaded: browser_navigate returns only Navigated to: <url>, or an
Error: navigation to <url> failed: … line when the browser could not load it. It waits
up to 15 seconds for the document to finish loading. To see where you landed (a redirect,
a blank title), call browser_get_state and read its url and title before proceeding.
Wait for dynamic content: For SPAs (React, Vue, Angular), the DOM may not be ready immediately after navigate. If interactive_elements in browser_get_state is sparse or empty, call browser_get_state again after a short delay:
1. browser_navigate(url="https://spa-app.example.com")
2. browser_get_state() → sparse interactive_elements?
3. browser_get_state() → call again; SPA renders after first paint
Use browser_go_back to return to the previous page without creating a new navigation entry.
Pattern: Visit detail page, then return to list
1. browser_navigate(url="https://shop.example.com/products") → then browser_list_sessions() for the id
2. browser_get_state() → find product links in interactive_elements
3. browser_click(index=5) → navigate to product detail
4. browser_extract_content(query="price and specs")
5. browser_go_back() → back to product list
6. browser_get_state() → the list page is a new document: new indices
7. browser_click(index=<next product's index from step 6>)
... repeat ...
N. browser_close_session(session_id)
Note: browser_go_back uses the tab's history stack. With no previous page (you
navigated straight to a deep URL, or the tab is new) it returns
Error: there is no previous page in this tab's history. Use browser_navigate with the
list URL instead.
Open multiple tabs within a single session to compare pages or extract data in parallel.
1. browser_navigate(url="https://example.com")
2. browser_navigate(url="https://example.com/page-2", new_tab=True)
3. browser_list_tabs()
→ [{"tab_id": "8B3E", "url": "https://example.com/", "title": "…"},
{"tab_id": "C41A", "url": "https://example.com/page-2", "title": "…"}]
new_tab=True returns Opened new tab with URL: <url>, and the page tools now act on
that new tab. A tab_id is the last 4 characters of the tab's id. If it matches more
than one tab, browser_switch_tab and browser_close_tab return an error listing the
full ids; pass more characters of the one you mean.
4. browser_switch_tab(tab_id="8B3E") → activate the first tab
5. browser_get_state() → DOM of that tab
6. browser_extract_content(query="pricing")
7. browser_switch_tab(tab_id="C41A") → activate the second tab
8. browser_extract_content(query="pricing")
9. browser_close_tab(tab_id="C41A") → close second tab
10. browser_close_session(session_id="<id recorded after step 1>") → close session (closes remaining tabs)
| Use Case | Pattern |
|---|---|
| Compare prices on two sites | Open site A → new_tab for site B → extract from each |
| Scrape paginated list into detail pages | Open list → each item in new tab → extract → close tab → next item |
| Compare before/after a UI change | Navigate to staging → new tab to production → screenshot both |
| Log in on one tab, use auth on another | Log in on the first tab, open the protected resource in a new tab (tabs in one session share cookies) |
The first browser_navigate starts a session. It returns only Navigated to: <url>,
so read the id from browser_list_sessions straight after and record it:
mcp__plugin_browser-use_browser-use__browser_navigate(url="https://example.com")
mcp__plugin_browser-use_browser-use__browser_list_sessions()
→ [{"session_id": "5927ad6f594c497fa141e1beb2189883", "active": true, "age_minutes": 0.1, …}]
List active sessions to detect leaks from previous runs or to resume a workflow:
mcp__plugin_browser-use_browser-use__browser_list_sessions()
→ [{"session_id": "abc123", "created_at": "...", "last_activity": "...", "active": true, "current_url": null, "age_minutes": 0.2}]
Record the session_id of every session this task opens. The list also shows sessions that other tasks, subagents or the user opened; they are not yours to close.
# Clean up a specific session
mcp__plugin_browser-use_browser-use__browser_close_session(session_id="abc123")
# Clean up every session THIS task opened (ids recorded when each was created)
for session_id in my_session_ids:
mcp__plugin_browser-use_browser-use__browser_close_session(session_id=session_id)
Never close a session you did not open. Another task or the user can hold one in the same server, and closing it destroys their page state. A session left idle closes itself after 10 minutes (core-api, "Automatic cleanup").
| Situation | Action |
|---|---|
| Workflow completed successfully | browser_close_session |
| Workflow failed with an error | browser_close_session (still required) |
| Need to use the same session in the next step | Keep it open; the page tools act on it without an id |
| Starting a new unrelated task | close the sessions this task opened; open a new one |
| Debugging a stuck page | browser_screenshot first, then close |
A session's Chrome profile is temporary: it is deleted when the session closes, including by the 10-minute idle timeout (see core-api, "Automatic cleanup"). Login state survives only as an exported JSON file, so export it the moment a login completes and import it to skip the next login.
Pick any path for the export; ~/.browser-use/sessions/<site>.json keeps them together.
After completing a login workflow, export the session state to a JSON file:
# 1. Navigate and log in normally
mcp__plugin_browser-use_browser-use__browser_navigate(url="https://github.com/login")
# ... complete login workflow (fill username, password, click submit) ...
# 2. Export the authenticated session
mcp__plugin_browser-use_browser-use__browser_export_session(
session_id="abc123",
output_path="~/.browser-use/sessions/github-session.json"
)
# 3. Close the session
mcp__plugin_browser-use_browser-use__browser_close_session(session_id="abc123")
In the next Claude Code session, restore the saved login state:
# Import saved cookies into a new session
mcp__plugin_browser-use_browser-use__browser_import_session(
import_path="~/.browser-use/sessions/github-session.json",
navigate_to="https://github.com/dashboard"
)
→ {"session_id": "new_xyz", "cookies_imported": 12, "original_url": "https://github.com/", "navigated_to": "https://github.com/dashboard", "is_primary": true}
# Verify login worked
mcp__plugin_browser-use_browser-use__browser_get_state()
# Check: interactive_elements should show dashboard elements, not login form
Import before any other browser starts. The page tools drive the imported session only
when none was active ("is_primary": true). With "is_primary": false they keep driving
the session that was already open: close both sessions, then import again.
Saved sessions expire when site cookies expire. After importing, verify login succeeded:
1. browser_import_session(import_path="...", navigate_to="https://site.com/dashboard")
2. browser_get_state()
3. Check: if interactive_elements contains login form elements → session expired, login again
if interactive_elements contains dashboard elements → session active, proceed
# WRONG: Forgot to close session
mcp__plugin_browser-use_browser-use__browser_navigate(url="https://example.com")
mcp__plugin_browser-use_browser-use__browser_extract_content(query="pricing")
# Task complete — session never closed. Browser process running, memory leaked.
# CORRECT: Always close
mcp__plugin_browser-use_browser-use__browser_navigate(url="https://example.com")
mcp__plugin_browser-use_browser-use__browser_extract_content(query="pricing")
mcp__plugin_browser-use_browser-use__browser_close_session(session_id="abc123")
# WRONG: closing or exporting with an id from a previous Claude Code session
mcp__plugin_browser-use_browser-use__browser_export_session(session_id="abc123", output_path="…")
# → "Session 'abc123' not found. Use browser_list_sessions to see active sessions."
# CORRECT: navigate first, then read the fresh id
mcp__plugin_browser-use_browser-use__browser_navigate(url="https://example.com")
mcp__plugin_browser-use_browser-use__browser_list_sessions()
# WRONG: Opening new tab in a loop without closing old ones
for each product_url:
browser_navigate(url=product_url, new_tab=True)
# 50 tabs open at once → browser crashes
# CORRECT: Close tab before opening next
for each product_url:
browser_navigate(url=product_url, new_tab=True)
tab_id = the browser_list_tabs() entry whose url is product_url
# ... extract data ...
browser_close_tab(tab_id=tab_id)
# WRONG: URL without scheme
mcp__plugin_browser-use_browser-use__browser_navigate(url="example.com")
# → navigation error
# CORRECT: Always include https://
mcp__plugin_browser-use_browser-use__browser_navigate(url="https://example.com")
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
browser-automation, session-management, multi-tab, login-reuse
6 skills in this plugin
/agent-modelPicks the LLM retry_with_browser_use_agent and browser_extract_content use. Use when choosing the browser-use agent model, or the user mentions a cheap, slow, or smart model./core-apiReference for the Browser Use MCP tools — parameters, returns, session lifecycle. Use when navigating, clicking, typing, evaluating JS, or extracting page content./debug-uiVisual UI debugging — screenshot capture and analysis, responsive layout checking at multiple viewport sizes, CSS validation via DOM state, visual regression detection, before/after state comparison./hybrid-debuggingCombines Browser Use (DOM, clicks, screenshots) with claude-in-chrome (console, network, JS) for full-spectrum debugging. Use when investigating console errors or network requests./web-scrapingStructured data extraction from web pages — pagination patterns, dynamic SPAs, authenticated scraping, rate limiting, anti-bot handling, JSON/CSV output.npx claudepluginhub madappgang/magus --plugin browser-useOther plugins' skills for the same job