chrome-devtools-cli
Use when auditing, writing, or running bounded shell commands that drive Chrome DevTools through the `chrome-devtools` CLI.
Use when auditing, writing, or running bounded shell commands that drive Chrome DevTools through the `chrome-devtools` CLI.
Quick Start
Install:
npx skills add github:wyattowalsh/agents --skill chrome-devtools-cli -y -g --agent antigravity --agent claude-code --agent codex --agent crush --agent cursor --agent gemini-cli --agent github-copilot --agent grok --agent opencode Use: /chrome-devtools-cli
Works with Claude Code, Gemini CLI, OpenCode, and other agentskills.io-compatible agents.
What It Does
Section titled “What It Does”Use the chrome-devtools CLI for terminal-driven browser automation when the user explicitly needs shell commands or scripts. Prefer MCP tools directly when the current harness already exposes Chrome DevTools MCP tools.
| $ARGUMENTS | Action |
|---|---|
| Empty | Ask what page or CLI task should be automated |
| CLI examples | Provide bounded chrome-devtools <tool> commands with expected outputs |
| Shell script request | Write a script that calls chrome-devtools commands and handles failures |
| First-time setup | Surface installation guidance from references/installation.md; do not install automatically |
| Large output | Use CLI output files or JSON parsing instead of printing huge snapshots or traces |
| Service lifecycle | Use start, status, and stop only when diagnosing the CLI service itself |
Critical Rules
Section titled “Critical Rules”- Do not install or update global npm packages unless the user explicitly asks.
- Prefer MCP tools directly unless the user specifically needs CLI commands or scripts.
- Use
--helpbefore unfamiliar CLI flags. - Use JSON output for scripts that need stable parsing.
- Keep trace, screenshot, and snapshot artifacts out of version control.
Guardrails
Section titled “Guardrails”- Do not run
npm i -gor mutate global package state unless the user explicitly asks. - Run
chrome-devtools <tool> --helpbefore using unfamiliar flags. - Use
--output-format=jsonwhen a script needs stable parsing. - Do not read raw trace, screenshot, or heap snapshot artifacts into the context.
- Quote file paths and URLs in shell commands.
Command Shape
Section titled “Command Shape”chrome-devtools <tool> [arguments] [flags]Common Commands
Section titled “Common Commands”chrome-devtools list_pageschrome-devtools new_page "https://example.com"chrome-devtools navigate_page --url "https://example.com"chrome-devtools take_snapshotchrome-devtools click "uid"chrome-devtools fill "uid" "text"chrome-devtools press_key "Enter"chrome-devtools list_console_messages --types errorchrome-devtools list_network_requests --pageSize 50 --pageIdx 0chrome-devtools lighthouse_audit --mode "navigation" --device "desktop"chrome-devtools performance_start_trace true true --filePath "trace.json.gz"chrome-devtools take_screenshot --fullPage true --filePath "page.png"Workflow
Section titled “Workflow”-
Step — Verify the CLI exists with
chrome-devtools --helpor provide setup guidance if it does not. -
Step — Navigate or select a page.
-
Step — Take a snapshot to obtain
uids. -
Step — Act with focused commands such as
click,fill,press_key, orupload_file. -
Step — Verify with a fresh snapshot, console messages, network requests, or screenshot.
Canonical Vocabulary
Section titled “Canonical Vocabulary”| Term | Meaning |
|---|---|
| CLI | The chrome-devtools executable installed from chrome-devtools-mcp |
| Tool command | A bounded chrome-devtools <tool> invocation |
| JSON output | Stable machine-readable CLI output for scripts |
| Service lifecycle | start, status, and stop commands for diagnosing the CLI service |
Validation Contract
Section titled “Validation Contract”Run from this skill directory before declaring changes complete:
python scripts/check.pyCompletion criteria:
scripts/check.pyexits 0.- No portable-CLI violations remain under this skill directory.
| Field | Value |
|---|---|
| Source Type | repo-owned |
| Display Source | github:wyattowalsh/agents |
| Source Kind | repo |
| Installability | portable command |
| Review State | reviewed |
| Target Agents | antigravity, claude-code, codex, crush, cursor, gemini-cli, github-copilot, grok, opencode |
| Field | Value |
|---|---|
| Name | chrome-devtools-cli |
| License | Apache-2.0 |
| Version | 0.23.0 |
| Author | Google LLC |
| Field | Value |
|---|---|
| Compatibility | Requires the chrome-devtools binary from chrome-devtools-mcp 0.23.0 or compatible version and Node.js 20.19.0, 22.12.0, or newer. |
View Full SKILL.md
---name: chrome-devtools-clidescription: 'Use when auditing, writing, or running bounded shell commands that drive Chrome DevTools through the `chrome-devtools` CLI. NOT for MCP tool-call workflows, broad browser QA, unattended package installation, or replacing harness MCP configuration.'license: Apache-2.0compatibility: 'Requires the `chrome-devtools` binary from chrome-devtools-mcp 0.23.0 or compatible version and Node.js 20.19.0, 22.12.0, or newer.'metadata: author: Google LLC version: 0.23.0---
# Chrome DevTools CLI
Use the `chrome-devtools` CLI for terminal-driven browser automation when the user explicitly needs shell commands or scripts. Prefer MCP tools directly when the current harness already exposes Chrome DevTools MCP tools.
## Dispatch
| $ARGUMENTS | Action || --- | --- || Empty | Ask what page or CLI task should be automated || CLI examples | Provide bounded `chrome-devtools <tool>` commands with expected outputs || Shell script request | Write a script that calls `chrome-devtools` commands and handles failures || First-time setup | Surface installation guidance from `references/installation.md`; do not install automatically || Large output | Use CLI output files or JSON parsing instead of printing huge snapshots or traces || Service lifecycle | Use `start`, `status`, and `stop` only when diagnosing the CLI service itself |
## Guardrails
- Do not run `npm i -g` or mutate global package state unless the user explicitly asks.- Run `chrome-devtools <tool> --help` before using unfamiliar flags.- Use `--output-format=json` when a script needs stable parsing.- Do not read raw trace, screenshot, or heap snapshot artifacts into the context.- Quote file paths and URLs in shell commands.
## Command Shape
```shchrome-devtools <tool> [arguments] [flags]```
## Common Commands
```bashchrome-devtools list_pageschrome-devtools new_page "https://example.com"chrome-devtools navigate_page --url "https://example.com"chrome-devtools take_snapshotchrome-devtools click "uid"chrome-devtools fill "uid" "text"chrome-devtools press_key "Enter"chrome-devtools list_console_messages --types errorchrome-devtools list_network_requests --pageSize 50 --pageIdx 0chrome-devtools lighthouse_audit --mode "navigation" --device "desktop"chrome-devtools performance_start_trace true true --filePath "trace.json.gz"chrome-devtools take_screenshot --fullPage true --filePath "page.png"```
## Workflow
1. Verify the CLI exists with `chrome-devtools --help` or provide setup guidance if it does not.2. Navigate or select a page.3. Take a snapshot to obtain `uid`s.4. Act with focused commands such as `click`, `fill`, `press_key`, or `upload_file`.5. Verify with a fresh snapshot, console messages, network requests, or screenshot.
## Reference File Index
| File | Content | Read When || --- | --- | --- || `references/installation.md` | Optional global CLI install guidance and troubleshooting | The `chrome-devtools` binary is missing and the user wants CLI usage || `references/provenance.md` | Upstream source, commit, license, and adaptation notes | Before modifying this skill or auditing provenance |
## Critical Rules
1. Do not install or update global npm packages unless the user explicitly asks.2. Prefer MCP tools directly unless the user specifically needs CLI commands or scripts.3. Use `--help` before unfamiliar CLI flags.4. Use JSON output for scripts that need stable parsing.5. Keep trace, screenshot, and snapshot artifacts out of version control.
## Canonical Vocabulary
| Term | Meaning || --- | --- || CLI | The `chrome-devtools` executable installed from `chrome-devtools-mcp` || Tool command | A bounded `chrome-devtools <tool>` invocation || JSON output | Stable machine-readable CLI output for scripts || Service lifecycle | `start`, `status`, and `stop` commands for diagnosing the CLI service |
## Validation Contract
Run from this skill directory before declaring changes complete:
```bashpython scripts/check.py```
Completion criteria:
1. `scripts/check.py` exits 0.2. No portable-CLI violations remain under this skill directory.