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.zipInstalls 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.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
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.
| Script | Purpose | Key Flags | JSON Output Snapshot |
|---|---|---|---|
scripts/start.js | Launch Chrome with remote debugging and optional profile sync. | --profile[=path], --chrome-path=<path>, --user-data-dir=<path> | { ok, port, userDataDir, chromePath, profile } |
scripts/navigate.js | Open a URL in the active tab or a new one. | <url>, --new, `--wait=domcontentloaded | networkidle0 |
scripts/screenshot.js | Capture full page or element screenshots. | --element=<selector>, `--format=png | jpeg, --quality=<1-100>, --out=<path>` |
scripts/element.js | Resolve elements by selector/text or interactively pick them. | <selector>, --text=<string>, --click, --scroll | { ok, selector, tag, id, classes, text, visible, rect } |
scripts/evaluate.js | Execute JavaScript in the page context. | <expression>, --file=<path> | { ok, result } (with structured clone) |
scripts/cookies.js | Export, import, or clear cookies via CDP. | --export[=file], --import=<file>, --clear, --domain=<filter> | Export payload or `{ ok, imported |
scripts/close.js | Gracefully 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-pathon 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
--jsonto 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.jsfor graceful closure; add--forcewhen 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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| browser-tools (this skill) | 6 | 9mo | Review | Intermediate |
| playwright-mcp-dev | 5 | 1mo | No flags | Advanced |
| migrate | 1 | 5mo | Review | Intermediate |
| playwright-interactive | 0 | 4mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
playwright-mcp-dev
microsoft
Explains how to add and debug playwright MCP tools and CLI commands.
migrate
alirezarezvani
Migrate from Cypress or Selenium to Playwright. Use when user mentions "cypress", "selenium", "migrate tests", "convert tests", "switch to playwright", "move from cypress", or "replace selenium".
playwright-interactive
ComeOnOliver
Use a persistent `js_repl` Playwright session to debug local web or Electron apps, keep the same handles alive across iterations, and run functional plus visual QA without restarting the whole toolchain unless the process ownership changed.
e2e
AsiaOstrich
[UDS] 從 BDD 場景生成 E2E 測試骨架,支援框架偵測與覆蓋差距分析
agent-ide-cli-fixture-test
vivalalova
Manual verification workflow for the agent-ide CLI against tests/fixtures. Use when asked to manually test CLI behavior, repeatedly mutate fixture projects, inspect git diff, restore fixtures between cases, cover multiple TS/JS cases, and fix any bug found during fixture-based CLI testing.
e2e-testing
IntelligentLion
Design and implement end-to-end tests that validate complete user workflows across the full stack. Use when building browser automation, testing user journeys, cross-browser validation, visual regression testing, or verifying system behavior from the user perspective.