.claude/skills/chrome-remote-debugging-setup/SKILL.md
Fix Chrome --remote-debugging-port silently failing to open any port. Use when: (1) Chrome launches with --remote-debugging-port=9222 but curl to 127.0.0.1:9222 returns "exit code 7" (connection refused), (2) lsof shows no LISTEN on the debugging port despite Chrome having the flag in its process args, (3) Setting up chrome-devtools-mcp or any CDP-based tool with a real Chrome instance. The root cause is that Chrome requires --user-data-dir when --remote-debugging-port is used, and silently ignores the port flag without it (error only visible on stderr).
npx skillsauth add Dbochman/dotfiles chrome-remote-debugging-setupInstall 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 silently ignores --remote-debugging-port unless --user-data-dir is also
specified. No error appears in the browser UI — the flag is simply dropped. The actual
error message ("DevTools remote debugging requires a non-default data directory") only
appears on stderr when Chrome is launched from a terminal.
curl -s http://127.0.0.1:9222/json/version returns connection refusedlsof -i :9222 shows nothing listening despite Chrome running with the flagpgrep -fl "remote-debugging" confirms the flag is in Chrome's process args/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--remote-debugging-port=9222 \
--user-data-dir="$HOME/.chrome-debug-profile"
Or for Chrome Canary:
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary \
--remote-debugging-port=9222 \
--user-data-dir="$HOME/.chrome-debug-profile"
The --remote-debugging-port flag is only honored by the first Chrome process.
If Chrome is already running, launching again just opens a new window in the existing
process (ignoring all command-line flags).
pkill -9 "Google Chrome" # or "Google Chrome Canary"
sleep 2
# Then launch with flags
curl -s http://127.0.0.1:9222/json/version
Should return JSON with Browser, Protocol-Version, webSocketDebuggerUrl fields.
In .claude/mcp.json:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest", "--no-usage-statistics", "--browserUrl", "http://127.0.0.1:9222"]
}
}
}
Claude Code must be restarted after changing MCP config.
curl -s http://127.0.0.1:9222/json/version | python3 -m json.tool
--user-data-dir creates a separate Chrome profile. It won't have your existing
logins/extensions unless you point it at your real profile directory.--user-data-dir was the actual cause.alias chrome-debug='...' in ~/.zshrcdevelopment
Search the web for current information, news, facts, and answers. Use when asked questions about current events, needing to look something up, finding websites, researching topics, or when you need up-to-date information beyond your training data.
development
Summarize any URL, YouTube video, podcast, PDF, or file into concise text. Use when asked to read an article, summarize a link, get the gist of a video or podcast, extract content from a URL, or when you need to understand what a web page or document contains.
development
Play music via Spotify and control Google Home speakers. Use when asked to play music, songs, artists, playlists, podcasts, or control speakers/volume/audio.
testing
Create new OpenClaw skills, modify and improve existing skills, and measure skill performance with evals. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. Also use when asked to "make a skill", "turn this into a skill", "improve this skill", or "test this skill".