No slash command · from browser-use
Captures screenshots, inspects DOM state, validates CSS, and detects visual regressions using Browser Use tools. Useful for debugging layout, z-index, and responsive issues.
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 detecting visual bugs, checking responsive layouts, validating CSS properties, and performing before/after visual comparisons using Browser Use's screenshot and DOM state tools.
The baseline pattern for any UI debugging task:
Step 1: Navigate to the page under investigation
mcp__plugin_browser-use_browser-use__browser_navigate(url="https://app.example.com/dashboard")
mcp__plugin_browser-use_browser-use__browser_list_sessions()
→ record the new session's id, e.g. "debug_01"
Step 2: Capture visual state
mcp__plugin_browser-use_browser-use__browser_screenshot()
→ an image the model sees directly (browser_save_screenshot writes a PNG file)
Step 3: Inspect DOM state for element details
mcp__plugin_browser-use_browser-use__browser_get_state()
→ interactive_elements: index (a Chrome node id), tag, text, and placeholder or href, for each control
Step 4: Get HTML for CSS/class inspection
mcp__plugin_browser-use_browser-use__browser_get_html(
selector=".problematic-component")
→ raw HTML with class names, inline styles, data attributes
Step 5: Close session
mcp__plugin_browser-use_browser-use__browser_close_session(session_id="debug_01")
When analyzing a screenshot from browser_screenshot:
Browser Use cannot change the viewport size: no tool takes a width, and page
JavaScript (window.resizeTo, a rewritten meta viewport) cannot resize a
top-level window. Screenshots here are at the server's one window size.
Ask the page which breakpoints are active, and what the layout computed:
browser_evaluate(script="return [320,375,414,768,1024,1280,1440].map(w => [w, matchMedia(`(min-width: ${w}px)`).matches])")
browser_evaluate(script="return getComputedStyle(document.querySelector('.nav')).display")
For screenshots at other widths, use a browser that can resize: claude-in-chrome's
resize_window, or the project's own Playwright tests with a viewport option.
| Breakpoint | Width | Device Class |
|---|---|---|
| Mobile S | 320px | Small phones |
| Mobile M | 375px | iPhone SE, iPhone 12 mini |
| Mobile L | 414px | iPhone Plus/Max, Android large |
| Tablet | 768px | iPad portrait |
| Laptop | 1024px | Small laptop |
| Desktop | 1280px | Standard monitor |
| Wide | 1440px+ | Large monitor |
At each breakpoint you can reach, look for:
Use browser_get_state and browser_get_html to inspect CSS classes, attributes and inline styles; use browser_evaluate with getComputedStyle for computed styles.
# Get HTML of a specific component to see its CSS classes and inline styles
browser_get_html(
selector=".checkout-button")
→ "<button class='checkout-button btn btn-primary disabled' style='opacity: 0.5;' disabled>Check Out</button>"
From this HTML you can detect:
disabled attribute (button non-interactive)opacity: 0.5 (intentionally dimmed, but should it be?)disabled (added by application state)# Get full page HTML and search for hidden elements
browser_get_html()
→ scan for: display:none, visibility:hidden, opacity:0, height:0, overflow:hidden
# Or ask the page directly
browser_evaluate(script="return [...document.querySelectorAll('button, a, input')].filter(e => !e.checkVisibility()).map(e => e.outerHTML.slice(0, 80))")
browser_get_state lists only each element's index, tag, text (its accessible name),
placeholder and href. Read
attributes from browser_get_html(selector=…), or with browser_evaluate
(el.getAttribute('aria-label')). Check for:
| Attribute | What to Verify |
|---|---|
class | Expected CSS classes applied, no conflicting classes |
aria-label | Accessible label present for interactive elements |
aria-disabled | Matches visual disabled state |
href | Correct URL (not "#" or javascript:void(0)) |
data-* | Application state attributes set correctly |
type (input) | Correct type (e.g., "email" for email fields) |
Capture visual state before and after an action or code change.
# BEFORE state: capture baseline
browser_navigate(url="https://app.example.com/cart")
session_id = the new entry in browser_list_sessions()
browser_save_screenshot(output_path="/abs/path/before.png", full_page=True)
# Analyze: Claude describes the visual state
# Apply action (e.g., add item to cart)
state = browser_get_state()
# Find "Add to Cart" button → index N
browser_click(index=N)
# AFTER state: capture changed state
browser_save_screenshot(output_path="/abs/path/after.png", full_page=True)
# Analyze: read both PNGs and describe what changed
browser_close_session(session_id=session_id)
For tracking regressions across deployments:
Step 1: Capture baseline (production/main branch)
browser_save_screenshot(output_path="/abs/path/baseline-homepage.png", full_page=True)
Step 2: Capture candidate (staging/PR branch)
browser_save_screenshot(output_path="/abs/path/candidate-homepage.png", full_page=True)
Step 3: Report differences
Claude analyzes both screenshots and describes:
- Layout changes
- Color changes
- Missing or new elements
- Font/size changes
- Spacing differences
Limitation: Browser Use does no pixel diff itself. The designer plugin's /designer:review <reference> <implementation> measures one: it captures pages and HTML files itself, or takes PNGs on disk, and compares pixels, structure and computed layout; otherwise the comparison is descriptive. For automated CI regression testing with pixel diff, use Playwright + Percy or BackstopJS instead.
Detection:
# Screenshot reveals two elements occupying the same space
browser_screenshot()
# → Claude can see: tooltip covered by navbar, modal behind overlay, etc.
# Confirm via HTML: check z-index in inline styles or classes
browser_get_html(selector=".navbar, .tooltip")
→ look for z-index values, position:fixed, position:absolute
Detection:
# Screenshot shows "..." in unexpected places
browser_screenshot()
# Confirm via HTML: find overflow:hidden, white-space:nowrap, text-overflow:ellipsis
browser_get_html(selector=".product-title, .card-description")
Detection:
# Screenshot shows elements stacked that should be side-by-side, or vice versa
browser_screenshot()
# Confirm via HTML: check display:flex, display:grid, flex-direction, grid-template-columns
browser_get_html(selector=".product-grid, .card-container")
Detection:
# Get HTML and check img tags for broken src attributes
browser_get_html(selector="img")
→ look for: src="" (empty), src="/undefined", missing alt attributes
Detection:
# Button appears active but doesn't respond to clicks
# get_state carries no attributes, so read them from the HTML
browser_get_html(selector="#checkout-btn")
# Check for: disabled, aria-disabled, tabindex="-1"
# and for pointer-events:none, opacity:0.5 without disabled attr (just visually disabled)
Computed CSS, framework state and performance entries are one browser_evaluate call
away in Browser Use's own page (getComputedStyle(el), window.__STORE__,
performance.getEntries()). Console history, the network log and GIF recording are not;
they need claude-in-chrome, which reads the user's Chrome rather than Browser Use's
session.
Escalate to claude-in-chrome when you need:
| Signal | Tool Required |
|---|---|
| JavaScript console errors | mcp__claude-in-chrome__read_console_messages |
| Network request failures (404, 500, CORS) | mcp__claude-in-chrome__read_network_requests |
| Animated GIF of user interaction | mcp__claude-in-chrome__gif_creator |
See the browser-use:hybrid-debugging skill for combined Browser Use + claude-in-chrome workflows.
When reporting UI bugs, use this structured format:
## UI Bug Report: [Component Name]
**URL**: https://app.example.com/page
**Viewport**: 1280x720 (desktop) / 375x812 (mobile)
**Detected Via**: screenshot + DOM inspection
### Issue
[One-line description of the visual bug]
### Evidence
- Screenshot before/after: [attached or described]
- DOM state: [relevant interactive_elements entries]
- HTML/CSS: [relevant HTML snippet with problematic classes/styles]
### Root Cause (Suspected)
[CSS property or DOM attribute that is causing the issue]
### Reproduction Steps
1. Navigate to [URL]
2. [Action that triggers the bug]
3. Observe: [what you see]
Expected: [what you should see]
### Recommended Fix
[Specific CSS property or DOM attribute change to investigate]
What SKILL.md sets; muted values are Claude Code's defaults
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./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./navigation-patternsBrowser Use tab, session and back-navigation patterns, and login reuse via export/import. Use when opening or switching tabs, managing browser sessions, or reusing a login./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