BR

browser-tools

A CLI-based browser automation toolkit. Use it to programmatically control Chrome, capture screenshots, and evaluate page elements.

Install

mkdir -p .claude/skills/browser-tools && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/401" && unzip -o skill.zip -d .claude/skills/browser-tools && rm skill.zip

Installs to .claude/skills/browser-tools

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Lightweight Chrome automation toolkit with shared configuration, JSON-first output, and six focused scripts for starting, navigating, inspecting, capturing, evaluating, and cleaning up browser sessions.
202 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Launch Chrome with remote debugging enabled
  • Open a specified URL in an active or new browser tab
  • Capture screenshots of full pages or specific elements
  • Execute JavaScript expressions within the page context
  • Export, import, or clear browser cookies
  • Gracefully or forcefully stop Chrome browser sessions

How it works

The scripts control an existing Chrome/Chromium instance using the DevTools protocol, allowing for automation of browser actions. Commands share common flags for JSON output, quiet mode, port, host, WebSocket endpoint, and timeout.

Inputs & outputs

You give it
node scripts/navigate.js https://example.com --new
You get back
{ ok, url, newPage }

When to use browser-tools

  • Capturing automated web screenshots
  • Programmatically evaluating browser elements
  • Running scripts in browser contexts
  • Exporting browser cookies

About this skill

Browser Tools Skill

Use these scripts to control an existing Chrome/Chromium instance via the DevTools protocol. All commands share the flags --json, --quiet, --port=<number> (default 9222), --host=<host>, --ws=<ws-endpoint>, and --timeout=<ms>. When --json is omitted, machine-readable results are still emitted to STDOUT; human-readable logs go to STDERR.

ScriptPurposeKey FlagsJSON Output Snapshot
scripts/start.jsLaunch Chrome with remote debugging and optional profile sync.--profile[=path], --chrome-path=<path>, --user-data-dir=<path>{ ok, port, userDataDir, chromePath, profile }
scripts/navigate.jsOpen a URL in the active tab or a new one.<url>, --new, `--wait=domcontentloadednetworkidle0
scripts/screenshot.jsCapture full page or element screenshots.--element=<selector>, `--format=pngjpeg, --quality=<1-100>, --out=<path>`
scripts/element.jsResolve elements by selector/text or interactively pick them.<selector>, --text=<string>, --click, --scroll{ ok, selector, tag, id, classes, text, visible, rect }
scripts/evaluate.jsExecute JavaScript in the page context.<expression>, --file=<path>{ ok, result } (with structured clone)
scripts/cookies.jsExport, import, or clear cookies via CDP.--export[=file], --import=<file>, --clear, --domain=<filter>Export payload or `{ ok, imported
scripts/close.jsGracefully or forcefully stop Chrome.--force{ ok, port, graceful, forced, closedTabs }

Usage Patterns

  • Start session: node scripts/start.js --profile → reuse default Chrome profile; or specify --chrome-path on Linux/Windows.
  • Pipe commands: combine navigation, evaluation, and screenshots within a single session: node scripts/navigate.js https://example.com && node scripts/evaluate.js 'document.title'.
  • JSON mode for agents: append --json to produce structured payloads for toolchains.

Element Picker Notes

element.js supports three modes:

  • element.js '.selector' – direct CSS lookup.
  • element.js --text "Buy now" – XPath text match.
  • element.js – interactive picker; click on the desired element in Chrome within 60 s. The command captures selector metadata and emits it as JSON.

Cookie Workflow

  • Export all cookies: node scripts/cookies.js --export cookies.json.
  • Filter by domain: add --domain example.com (applies to export and clear).
  • Import from captured payload: node scripts/cookies.js --import cookies.json --json (reloads the current page).

Shutdown

  • Prefer node scripts/close.js for graceful closure; add --force when the DevTools endpoint is unresponsive.

When not to use it

  • When a Chrome/Chromium instance is not available or cannot be controlled via DevTools protocol

Limitations

  • Requires an existing Chrome/Chromium instance to control
  • Limited to actions supported by the DevTools protocol

How it compares

This skill provides focused scripts for specific browser interactions, offering a structured JSON output for integration into toolchains, unlike manual browser operation.

Compared to similar skills

browser-tools side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
browser-tools (this skill)69moReviewIntermediate
playwright-mcp-dev51moNo flagsAdvanced
migrate15moReviewIntermediate
playwright-interactive04moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry