skills/browser-universal/SKILL.md
Detect the available browser interaction layer and load the right commands — then navigate, click, fill, and screenshot through a unified verb set. playwright-cli is the default, recommended layer; falls back to Playwright MCP, cmux-browser, or CDP when it is absent. Use before any browser interaction in skills that shouldn't hardcode a specific layer. Triggers on: browser universal, detect browser, browser layer, browser setup, which browser, browser interaction, open browser, use browser.
npx skillsauth add catalan-adobe/skills browser-universalInstall 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.
Detect which browser interaction layer is available and load its commands.
playwright-cli is the default, recommended layer. If it is not present, fall
back to Playwright MCP, cmux-browser, or CDP — in that order.
If the consuming skill or user specifies a layer, use that directly and skip detection. Otherwise, run the detection ladder below.
Check each layer in order. The first one available wins — use it and stop. Do not keep probing once a layer is found.
command -v playwright-cli
Available if this exits 0 (the binary is on PATH). That is the whole check — no subcommand inspection needed. If found, use it and skip the rest of the ladder.
Check if mcp__plugin_playwright_playwright__browser_navigate exists in your
available tools. If yes, Playwright MCP is available. No shell command needed.
cmux ping 2>/dev/null
Available if this returns success (exit code 0).
CDP_JS="$(command -v cdp.js 2>/dev/null || \
find ~/.claude -path "*/cdp-connect/scripts/cdp.js" -type f 2>/dev/null | head -1)"
[[ -n "$CDP_JS" ]] && node "$CDP_JS" list --port 9222
Available if cdp.js is found AND list returns tab output (not a connection
error). Store CDP_JS for all subsequent CDP commands.
If every check fails, report this to the user and stop:
No browser interaction layer detected. To enable one:
- playwright-cli: install it so it's on your PATH (recommended)
- Playwright MCP: install the Playwright MCP plugin for Claude Code
- cmux-browser: start cmux and create a browser surface
- CDP: launch Chrome with `chrome --remote-debugging-port=9222`
Do not proceed with browser actions — this is a blocking error.
Load the detected layer's command reference from the layers guide. Read only the section matching the detected layer (playwright-cli, Playwright MCP, cmux-browser, or CDP) for targeting model, key commands, and layer-specific gotchas.
Quick reference mapping universal actions to layer-specific commands:
| Verb | playwright-cli | Playwright MCP | cmux-browser | CDP |
|------|---------------|---------------|-------------|-----|
| navigate | goto | browser_navigate | navigate | navigate |
| snapshot | snapshot | browser_snapshot | snapshot --compact | ax-tree |
| click | click (ref) | browser_click (ref) | click (selector) | click (selector) |
| fill | fill (ref) | browser_type (ref) | fill (selector) | type (selector) |
| eval | eval | browser_evaluate | eval | eval |
| screenshot | screenshot | browser_take_screenshot | snapshot | screenshot |
| wait | eval polling | browser_wait_for | wait --load-state | eval polling |
| tabs.list | tab-list | browser_tabs | tab list | list |
| tabs.open | open / tab-new | browser_tabs (create) | tab new | eval "window.open()" |
| tabs.select | tab-select (index) | browser_tabs (select) | tab switch | --id <target-id> |
| tabs.close | tab-close | browser_tabs (close) | tab close | eval "window.close()" |
e5, e12) → refs invalidate after state changes → re-snapshot.#submit,
.btn-primary, button[type="submit"]).After any state-changing action (click, fill, navigate, tab switch), re-read page state (snapshot) before the next interaction. This applies to every layer.
tools
Reduce a webpage to a structural skeleton with semantic tokens. Two-phase pipeline: Phase 1 injects a browser script that tokenizes content ({TEXT}, {HEADING:n}, {IMAGE:WxH}, {CTA:label}, {LINK:label}, {INPUT:type}, {VIDEO}, {ICON}). Phase 2 applies LLM structural reasoning to collapse repeated patterns ({REPEAT:N}), remove decorative wrappers, strip utility classes, and produce skeleton.html + manifest.json. Use when migrating pages to EDS, analyzing page structure, extracting page blueprints, or preparing input for GenAI block generation. Triggers on: reduce page, page skeleton, page blueprint, extract structure, tokenize page, page reduction, structural skeleton, reduce URL.
tools
Capture a spatial hierarchy of rendered DOM elements from any webpage. Injects a pre-built script via playwright-cli that walks the DOM, detects layout grids, extracts backgrounds, prunes invisible nodes, promotes elements rendered outside their DOM parent (overlays, fixed navs, modals), and tags overlay nodes with occlusion metadata. Returns three outputs: LLM-friendly indented text, structured JSON tree, and a nodeMap mapping positional IDs to CSS selectors with background and overlay data. Use before page decomposition, overlay detection, brand extraction, or any workflow that needs structured page analysis. Triggers on: visual tree, capture tree, page structure, page hierarchy, DOM tree, capture visual, page analysis, extract tree.
tools
Summarize any video by analyzing both audio and visuals. Downloads via yt-dlp, extracts transcript (YouTube captions or Whisper), pulls scene-detected keyframes, and produces a multimodal summary with clickable timestamped YouTube links. Use this skill whenever the user wants to summarize a YouTube video, digest a talk or tutorial, get notes from a video, extract key points from a recording, or says things like "tl;dw", "summarize this video", "what's in this video", or pastes a YouTube URL and asks for a summary. Also triggers for non-YouTube URLs that yt-dlp supports.
development
Design and build web UIs with Adobe Spectrum 2 design system. Applies S2 layout principles, visual hierarchy, spacing, and component composition to produce accessible interfaces. Outputs vanilla CSS with Spectrum tokens (static pages) or Spectrum Web Components (interactive apps). Recommends tier based on complexity. Covers sp-theme setup, side-effect imports, overlay system, form patterns, --mod-* token customization, and 14 critical gotchas. Use for: spectrum 2 web, SWC, sp-button, sp-theme, build UI with spectrum, S2 layout, spectrum application, adobe design system, web component form, spectrum overlay.