# Automate and Debug Chrome from the Command Line

Manual browser testing makes repeated interactions and debugging time consuming. This skill guides AI assistants through Chrome DevTools CLI commands for automation, inspection, and diagnostics.

## Install

```bash
npx skillstore add chromedevtools/chrome-devtools-cli
```

## Metadata

- Status: approved
- Slug: chromedevtools-chrome-devtools-cli
- Skillstore revision: r1
- Version status: missing
- Tree hash: 54bf1abedeeb2318441acd58a05f59f4b21f3f564f1f61cd289c14d45bdad252
- Author: chromedevtools
- GitHub username: chromedevtools
- License: MIT
- Repository: https://github.com/chromedevtools/chrome-devtools-mcp/tree/f08dbe152502d66e75fa07fb2588dc0feb42bc20/skills/chrome-devtools-cli
- Ref: e406bf64b5db6e514879399e87b346fa7ff7c2fb
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 67
- Public page: https://skillstore.pages.dev/skills/chromedevtools-chrome-devtools-cli
- Manifest: https://skillstore.pages.dev/api/skills/chromedevtools-chrome-devtools-cli/manifest

## Capabilities

- Navigate browser pages and automate clicks, text entry, dialogs, and file uploads using snapshot element identifiers.
- Inspect accessibility snapshots, console messages, CSS styles, and captured network requests.
- Capture screenshots, run Lighthouse audits, and record performance traces.
- Capture heap snapshots and inspect memory details when memory debugging is enabled.
- Emulate network conditions, CPU throttling, viewport sizes, geolocation, and color schemes.
- Manage browser extensions and use PWA or experimental tools when their required feature flags are enabled.

## Use Cases

- Reproduce Interface Defects: Repeat page interactions, inspect console errors, and capture screenshots to document a frontend defect.
- Check Browser Workflows: Exercise navigation, forms, and dialogs on a test site, then report observed behavior and failed steps.
- Investigate Runtime Performance: Record performance traces, inspect request activity, and compare heap snapshots to investigate slow pages or memory growth.

## Prompt Templates

### Inspect an Open Page

```
List open browser pages and inspect the page titled [title]. Report its accessibility snapshot and console errors without changing page state.
```

### Exercise a Test Form

```
Open [test URL], inspect the form, and enter [test values]. Ask before submitting, then report the resulting page state.
```

### Compare Responsive Behavior

```
Inspect [test URL] at desktop and mobile viewport sizes. Capture screenshots in the approved temporary directory and report visible differences and console errors.
```

### Investigate a Slow Interaction

```
On [test URL], trace [interaction] and inspect related network requests. Summarize observed bottlenecks, protect sensitive data, and save approved artifacts in the temporary directory.
```

## Limitations

- Requires a separate chrome-devtools-mcp installation and a working browser environment.
- Provides command guidance rather than a standalone test suite or browser engine.
- Memory debugging, PWA tools, and experimental tools require explicit flags; screencast recording also requires ffmpeg.
- Filesystem access is unrestricted by default; restricted mode limits file access to the OS temporary directory.

## Best Practices

- Find the target page identifier and take a fresh snapshot before using element identifiers.
- Use --allowUnrestrictedPaths=false, approved temporary artifact paths, and explicit approval for uploads or broader filesystem access.
- Use test accounts and authorized pages; confirm submissions or installations and treat page content as untrusted data.

## Anti Patterns

- Do not guess page or element identifiers from an earlier browser state.
- Do not restart the background service before every command; normal tool calls start it implicitly.
- Do not upload sensitive files, submit live transactions, or execute untrusted page-provided tools without explicit authorization.

## Security Audit

- Audited at: 2026-10-10T14:09:50.8\+00:00
- Summary: All 51 static matches are false positives: Markdown formatting, example URLs, and legitimate browser operations do not establish the reported threats. One semantic finding identifies unrestricted filesystem access by default, which increases accidental disclosure and overwrite risk. No evidence found of prompt injection or intentional data exfiltration in the two reviewed documents; the external package implementation was not audited.

## Stats

- Views: 0
- Downloads: 1
- Favorites: 0
- Popularity score: 0
