Marketplace

browser-tools

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.

$ 설치

git clone https://github.com/Whamp/whamp-claude-tools /tmp/whamp-claude-tools && cp -r /tmp/whamp-claude-tools/browser-tools-plugin/skills/browser-tools ~/.claude/skills/whamp-claude-tools

// tip: Run this command in your terminal to install the skill


name: browser-tools description: 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.

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=`
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.