
Chrome Devtools Cli
Drive Chrome and DevTools from shell scripts and terminal commands while building or testing agent-driven browser workflows.
Overview
Chrome-devtools-cli is an agent skill most often used in Build (also Ship testing) that shows how to automate browser and DevTools tasks via the chrome-devtools terminal CLI.
Install
npx skills add https://github.com/chromedevtools/chrome-devtools-mcp --skill chrome-devtools-cliWhat is this skill?
- Global `chrome-devtools` CLI after one-time `npm i chrome-devtools-mcp@latest -g`
- `chrome-devtools status` smoke check and documented PATH or permission fixes without sudo
- Execute tools directly from the terminal (e.g. `chrome-devtools list_pages`) with implicit background server start
- Automate browser tasks from shell scripts alongside your agent workflow
- Installation is explicitly one-time and outside the regular AI execution loop
Adoption & trust: 1.3k installs on skills.sh; 43.1k GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+200% hot-view momentum).
What problem does it solve?
You want browser automation driven from scripts or your agent’s shell, but MCP browser tools feel chat-only and the CLI install path is unclear.
Who is it for?
Indie builders wiring Claude Code or Cursor to real Chrome sessions for scripting, debugging, or quick UI checks from the terminal.
Skip if: Teams that forbid global npm installs or need managed CI browser farms without a local Chrome/DevTools MCP setup.
When should I use this skill?
Use this skill to write shell scripts or run shell commands to automate tasks in the browser or otherwise use Chrome DevTools via CLI.
What do I get? / Deliverables
You can run documented chrome-devtools commands from the terminal with a verified global install and a repeatable execute-first workflow for MCP browser tools.
- Working global chrome-devtools CLI installation verified with status
- Shell scripts or command sequences that invoke MCP browser tools from the terminal
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Browser MCP automation is primarily adopted while wiring agent tooling and local dev integrations, before repeatable Ship-phase checks. Agent-tooling is the canonical shelf for skills that expose CLI commands atop an MCP server the coding agent orchestrates.
Where it fits
Wire a coding agent to call `chrome-devtools list_pages` from a Makefile during local feature work.
Script a pre-release smoke flow that opens targets and asserts pages load via CLI-driven navigation.
Capture repeatable browser steps for content QA on a marketing site without manual DevTools clicking.
Re-run CLI browser commands to reproduce a user-reported UI issue in a controlled Chrome session.
How it compares
CLI wrapper around Chrome DevTools MCP tools, not a standalone headless browser farm or Playwright skill pack.
Common Questions / FAQ
Who is chrome-devtools-cli for?
Solo builders and small teams using coding agents who want shell-level control of Chrome DevTools MCP for automation and browser tasks.
When should I use chrome-devtools-cli?
Use it in Build while connecting agent-tooling, and in Ship testing when you script page listing, navigation, or similar CLI-driven browser checks before release.
Is chrome-devtools-cli safe to install?
It implies a global npm package and local browser access; review the Security Audits panel on this Prism page and treat CLI install scope like any global Node tool.
Workflow Chain
Then invoke: skill chromedevtools chrome devtools mcp trouble
SKILL.md
READMESKILL.md - Chrome Devtools Cli
# Installation Install the package globally to make the `chrome-devtools` command available. You only need to do this the first time you use it. ```sh npm i chrome-devtools-mcp@latest -g chrome-devtools status # check if install worked. ``` ## Troubleshooting - **Command not found:** If `chrome-devtools` is not recognized, ensure your global npm `bin` directory is in your system's `PATH`. Restart your terminal or source your shell configuration file (e.g., `.bashrc`, `.zshrc`). - **Permission errors:** If you encounter `EACCES` or permission errors during installation, avoid using `sudo`. Instead, use a node version manager like `nvm`, or configure npm to use a different global directory. - **Old version running:** Run `chrome-devtools stop && npm uninstall -g chrome-devtools-mcp` before reinstalling, or ensure the latest version is being picked up by your path. --- name: chrome-devtools-cli description: Use this skill to write shell scripts or run shell commands to automate tasks in the browser or otherwise use Chrome DevTools via CLI. --- The `chrome-devtools-mcp` CLI lets you interact with the browser from your terminal. ## Setup _Note: If this is your very first time using the CLI, see [references/installation.md](references/installation.md) for setup. Installation is a one-time prerequisite and is **not** part of the regular AI workflow._ ## AI Workflow 1. **Execute**: Run tools directly (e.g., `chrome-devtools list_pages`). The background server starts implicitly; **do not** run `start`/`status`/`stop` before each use. 2. **Inspect**: Use `take_snapshot` to get an element `<uid>`. 3. **Act**: Use `click`, `fill`, etc. State persists across commands. Snapshot example: ``` uid=1_0 RootWebArea "Example Domain" url="https://example.com/" uid=1_1 heading "Example Domain" level="1" ``` ## Command Usage ```sh chrome-devtools <tool> [arguments] [flags] ``` Use `--help` on any command. Output defaults to Markdown, use `--output-format=json` for JSON. ## Input Automation (<uid> from snapshot) ```bash chrome-devtools take_snapshot --help # Help message for commands, works for any command. chrome-devtools take_snapshot # Take a text snapshot of the page to get UIDs for elements chrome-devtools click "id" # Clicks on the provided element chrome-devtools click "id" --dblClick true --includeSnapshot true # Double clicks and returns a snapshot chrome-devtools drag "src" "dst" # Drag an element onto another element chrome-devtools drag "src" "dst" --includeSnapshot true # Drag an element and return a snapshot chrome-devtools fill "id" "text" # Type text into an input or select an option chrome-devtools fill "id" "text" --includeSnapshot true # Fill an element and return a snapshot chrome-devtools handle_dialog accept # Handle a browser dialog chrome-devtools handle_dialog dismiss --promptText "hi" # Dismiss a dialog with prompt text chrome-devtools hover "id" # Hover over the provided element chrome-devtools hover "id" --includeSnapshot true # Hover over an element and return a snapshot chrome-devtools press_key "Enter" # Press a key or key combination chrome-devtools press_key "Control+A" --includeSnapshot true # Press a key and return a snapshot chrome-devtools type_text "hello" # Type text using keyboard into a focused input chrome-devtools type_text "hello" --submitKey "Enter" # Type text and press a submit key chrome-devtools upload_file "id" "file.txt" # Upload a file through a provided element chrome-devtools upload_file "id" "file.txt" --includeSnapshot true # Upload a file and return a snapshot ``` ## Navigation ```bash chrome-devtools close_page 1 # Closes the page by its index chrome-devtools list_pages # Get a list of pages open in the browser chrome-devtools navigate_page --url "https://example.com" # Navigates the currently selected page to a URL chrome-devtools navigate_page --type "reload" --ignoreCache true # Reload page ignoring cache chrome-devtools navigate_page --url "https://example.com" --time