aeroxy/chrome-devtools-cli/chrome-devtools
Claude Code and agent skill by aeroxy/chrome-devtools-cli
- community
Checking that the SKILL.md file is still in the repository.
Use when the user asks to "take a screenshot of a website", "navigate to a URL", "fill a form in the browser", "interact with Chrome", or when a chrome automation task is needed.
Install
npx vskill@latest install aeroxy/chrome-devtools-cli/chrome-devtoolsSKILL.md
Chrome DevTools CLI
A CLI that talks directly to your running Chrome via the DevTools Protocol.
Prerequisites
The browser must have remote debugging enabled:
- Open Chrome (or Edge)
- Go to
chrome://inspect/#remote-debugging(Edge:edge://inspect/#remote-debugging) - Enable the remote debugging server
This is a persistent, in-browser toggle — not a launch flag. Three things follow from that, and they are what make it the right route for attaching to an everyday browser:
- It takes effect immediately. The server starts on the already-running
process; no restart, no relaunch, nothing to quit.
- It survives restarts. The choice is stored in the profile's
Local State
as devtools.remote_debugging.user-enabled, so every later launch serves a port with no flags. To check whether a profile has it on, read that key.
- It is per-browser and per-profile. Enabling it in Chrome does nothing for
Edge, and vice versa — each has its own toggle and its own Local State.
The port is chosen by the browser and recorded in <user-data-dir>/DevToolsActivePort. Read that file rather than assuming a number: it differs per browser and can change between launches. Auto-connect does this for you, which is why no URL is needed. A daemon is spawned on first invocation and reused across commands (5-minute idle timeout by default, set by DAEMON_IDLE_TIMEOUT_SECS).
If the OS will not let the CLI read that file, remote debugging is usually still on. For the default profile the CLI then connects to port 9222 instead and prints Warning: cannot read ...DevToolsActivePort: Operation not permitted .... To use another port, pass --port <n> with the port shown at chrome://inspect/#remote-debugging. --port also works for a browser launched with --remote-debugging-port. See "Failure Handling: cannot read DevToolsActivePort" below for what to tell the user.
Microsoft Edge works the same — it is Chromium and speaks the same protocol. Add --browser edge so auto-connect reads Edge's profile instead of Chrome's (--channel still selects stable/beta/dev/canary, except that Edge ships no Canary for Linux — --browser edge --channel canary is rejected there rather than pointed at a directory that cannot exist). --ws-endpoint and --user-data-dir already say where to connect, so --browser is not needed to reach Edge — but pass it anyway when you are targeting Edge, because it is also the label recorded for the daemon (list-daemons) and the browser named in connection errors. Without it both say Chrome, the default, whatever the endpoint points at. Everything below applies unchanged — only the profile location differs.
The --remote-debugging-port launch flag is the other route, and it is for a throwaway instance rather than your everyday browser — see the headless recipe below. Two traps if you reach for it: it is ignored when that profile is already running (the launch hands off to the existing process and no port file appears, so quit first or use a different --user-data-dir), and a fresh Edge profile is not the clean room it looks like — Edge's first-run import pulls open tabs and extensions from your default browser, so a mktemp -d profile can come up holding your real session.
⚠️ Critical: How Page Targeting Works
Targets are NOT arbitrary strings. You cannot use --target main, --target page1, or any made-up name.
Targets are friendly word-pair names (like warm-squid, pink-hen) that the CLI derives from Chrome's internal target IDs. You get them from command output — never invent them.
Names are stable for the lifetime of a tab — navigating within the same tab keeps the same target name; closing and reopening the tab gives a new name.
The Correct Workflow
Step 1: Run `list-pages` to see what's open and get target names
Output:
Step 2: Use the friendly name from the output in subsequent commands
Alternative: Use `--page <index>` for numeric indexing (0-based)
If both `--target` and `--page` are omitted, the command runs on page 0 (leftmost tab). This is fine for single-tab workflows but should generally be avoided — always pin to a known page.
Core Capabilities
- Navigation:
navigate,navigate --back,navigate --forward,navigate --reload - Page management:
list-pages,new-page,close-page,select-page - Extraction:
screenshot,snapshot(accessibility tree),evaluate(JavaScript),read-page(page content as markdown),run-script(run local JS file),adapter(run site adapter) - Interaction:
click,fill,type-text,press-key,hover,click-at - Emulation:
emulate(viewport, mobile, geolocation, URL blocking) - Inspection:
console(logs),network(requests),sw-logs(extension service workers) - Third-party tools:
list-3p-tools,execute-3p-tool(tools exposed bywindow.__dtmcp) - Synchronization:
wait-for(wait for text on page) - Daemon control:
kill-daemon
Standard Patterns
Pattern 1: Navigate and Interact
navigate and new-page print the target name at the end — capture it to pin subsequent commands.
Note: The [navigated to: ...] and [target:...] lines go to stderr, not stdout. The stdout contains only the main command output ("Navigated to …", "Opened new page: …").
Pattern 2: Emulation (Viewport & Geolocation)
Overrides are per-tab: each page keeps its own viewport/geolocation/URL-blocks, persisting across navigation within that tab and isolated from other tabs (until cleared, the tab closes, or the daemon exits). emulate with no flags shows the active tab's state.
Pattern 3: URL Blocking (Network Debugging)
Block URL patterns using simple * wildcards: *.png (all PNG files), cdn.example.com/* (a domain path), *analytics* (any URL containing "analytics"). Patterns persist in the daemon until cleared.
Scope: blocking applies to subresources the page loads (images, scripts, fetch/XHR, stylesheets, CDN, trackers). It does not block the top-level navigation document itself — e.g.--block-url "*example.com*"thennavigate https://example.comstill loads the page, but anyexample.comsubresources are blocked. This is a ChromeNetwork.setBlockedURLslimitation, not a CLI bug.
Pattern 4: Form Interaction
Two ways to fill inputs — choose based on what the site expects:
fillsets the value directly viaelement.value = .... Fast, no key events. Works for text inputs, textareas,<select>, checkboxes, radio buttons. Often breaks React/Vue apps because these frameworks rely on real input events.type-textdispatches individual keyboard events. Slower but triggers all theinput,compositionstart/end, etc. events that frameworks listen for. Use this when `fill` seems to "not work" on interactive frameworks.
Pattern 5: Console & Network Inspection
The daemon maintains a persistent session for the current page that continuously collects network and console events across commands.
console and network return accumulated events and clear the buffer (drain). A second call immediately after returns empty unless new events arrived. Use this for inspecting what happened; use --duration for live monitoring.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskill/chrome-devtools/SKILL.md
Popularity
- Repository stars
- 239
- Repository forks
- 10
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aeroxy/chrome-devtools-cli/chrome-devtools)