skills/browser-tools/SKILL.md
Interactive browser automation via Chrome DevTools Protocol. Use when you need to interact with web pages, test frontends, or when user interaction with a visible browser is required.
npx skillsauth add goncalossilva/.agents browser-toolsInstall 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.
Chrome DevTools Protocol tools for agent-assisted web automation. These tools connect to a Chromium-based browser (Chromium/Chrome) running on :9222 with remote debugging enabled.
Run once before first use:
cd "$HOME/.agents/skills/browser-tools"
npm install
Requires Node.js 20.19+.
"$HOME/.agents/skills/browser-tools/browser-start.js" # Dedicated tool profile
"$HOME/.agents/skills/browser-tools/browser-start.js" --profile # Seed from your browser profile (cookies, logins)
"$HOME/.agents/skills/browser-tools/browser-start.js" --watch # Start background JSONL logging
"$HOME/.agents/skills/browser-tools/browser-start.js" --browser chromium
"$HOME/.agents/skills/browser-tools/browser-start.js" --browser chrome
Launch a browser with remote debugging on :9222. Use --profile to preserve your authentication state. If a browser is already running on :9222, it is reused; launch options like --browser, --executable, and --profile only affect new browser instances.
If the auto-detection picks the wrong browser, set:
BROWSER_TOOLS_BROWSER=chromium (or chrome)BROWSER_TOOLS_EXECUTABLE=/absolute/path/to/browserBROWSER_TOOLS_PROFILE_SRC=/absolute/path/to/profile/dir (optional; useful with --executable --profile)"$HOME/.agents/skills/browser-tools/browser-nav.js" https://example.com
"$HOME/.agents/skills/browser-tools/browser-nav.js" https://example.com --new
Navigate to URLs. Use --new flag to open in a new tab instead of reusing current tab.
"$HOME/.agents/skills/browser-tools/browser-eval.js" 'document.title'
"$HOME/.agents/skills/browser-tools/browser-eval.js" 'document.querySelectorAll("a").length'
"$HOME/.agents/skills/browser-tools/browser-eval.js" 'const el = document.querySelector("textarea"); return el?.value'
"$HOME/.agents/skills/browser-tools/browser-eval.js" --file ./snippet.js
printf 'return document.title\n' | "$HOME/.agents/skills/browser-tools/browser-eval.js" --stdin
Execute JavaScript in the active tab. Code runs in async context. Expressions and statement bodies are both supported. Use return when passing statements or multi-line code.
"$HOME/.agents/skills/browser-tools/browser-screenshot.js"
Capture current viewport and return temporary file path. Use this to visually inspect page state or verify UI changes.
"$HOME/.agents/skills/browser-tools/browser-pick.js" "Click the submit button"
Use this when the user wants to select specific DOM elements on the page. This launches an interactive picker: click elements to select them, Cmd/Ctrl+Click for multi-select, Enter to finish.
"$HOME/.agents/skills/browser-tools/browser-dismiss-cookies.js" # Accept cookies
"$HOME/.agents/skills/browser-tools/browser-dismiss-cookies.js" --reject # Reject (where possible)
Run after navigation if cookie dialogs interfere with interaction.
"$HOME/.agents/skills/browser-tools/browser-cookies.js"
"$HOME/.agents/skills/browser-tools/browser-cookies.js" --format=netscape > cookies.txt
Display all cookies for the current tab including domain, path, httpOnly, and secure flags.
The --format=netscape option outputs cookies in Netscape format for use with curl/wget (curl -b cookies.txt).
"$HOME/.agents/skills/browser-tools/browser-content.js" https://example.com
Navigate to a URL and extract readable content as markdown. Uses Mozilla Readability for article extraction and Turndown for HTML-to-markdown conversion.
Start the watcher:
"$HOME/.agents/skills/browser-tools/browser-watch.js"
Or launch the browser with logging enabled:
"$HOME/.agents/skills/browser-tools/browser-start.js" --watch
Logs are written as JSONL to a temp directory by default:
/tmp/agent-browser-tools/logs/YYYY-MM-DD/<targetId>.jsonlBROWSER_TOOLS_LOG_ROOT=/some/dirTail the most recent log:
"$HOME/.agents/skills/browser-tools/browser-logs-tail.js" # dump and exit
"$HOME/.agents/skills/browser-tools/browser-logs-tail.js" --follow # follow
Summarize network responses (status codes, failures):
"$HOME/.agents/skills/browser-tools/browser-net-summary.js"
"$HOME/.agents/skills/browser-tools/browser-net-summary.js" --file /path/to/log.jsonl
Don't lead with screenshots to inspect page state. Do prefer parsing the DOM directly first, and use screenshots when you need visual/layout verification:
// Get page structure
document.body.innerHTML.slice(0, 5000)
// Find interactive elements
Array.from(document.querySelectorAll('button, input, [role="button"]')).map(e => ({
id: e.id,
text: e.textContent.trim(),
class: e.className
}))
Use one eval call for multi-step workflows. browser-eval.js supports statement bodies, return, and await:
const data = document.querySelector('#target')?.textContent;
const buttons = document.querySelectorAll('button');
buttons[0]?.click();
return {
data,
buttonCount: buttons.length
};
Don't make separate calls for each click. Do batch them:
const actions = ["btn1", "btn2", "btn3"];
actions.forEach(id => document.getElementById(id)?.click());
return "Done";
For normal form inputs, set the value and dispatch events in one call:
const input = document.querySelector('input[name="email"]');
if (!input) return "Input not found";
input.value = "[email protected]";
input.dispatchEvent(new Event("input", { bubbles: true }));
input.dispatchEvent(new Event("change", { bubbles: true }));
document.querySelector('button[type="submit"]')?.click();
return "Submitted";
Extract structured state in one call:
const state = {
score: document.querySelector('.score')?.textContent,
status: document.querySelector('.status')?.className,
items: Array.from(document.querySelectorAll('.item')).map(el => ({
text: el.textContent,
active: el.classList.contains('active')
}))
};
return state;
If DOM updates after actions, wait inside the same eval call:
document.querySelector('#submit')?.click();
await new Promise(resolve => setTimeout(resolve, 500));
return {
status: document.querySelector('.status')?.textContent
};
Always start by understanding the page structure:
return {
title: document.title,
forms: document.forms.length,
buttons: document.querySelectorAll('button').length,
inputs: document.querySelectorAll('input').length,
mainContent: document.body.innerHTML.slice(0, 3000)
};
Then target specific elements based on what you find.
development
Design and implement distinctive, production-ready web interfaces with strong aesthetic direction. Use when asked to create or restyle web pages, components, or applications (HTML/CSS/JS, React, Vue, etc.).
documentation
Update CHANGELOG.md following Keep a Changelog (https://keepachangelog.com/en/1.1.0/)
development
Fetch and analyze Sentry issues, events, transactions, and logs. Helps agents debug errors, find root causes, and understand what happened at specific times.
development
Get a second opinion by bundling a prompt + a curated file set, then asking another powerful LLM for debugging, refactor advice, design checks, or code reviews.