Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.
用和首页一致的趋势图,快速判断这个 skill 最近是否还在被持续下载和使用。
---
name: chrome-devtools
description: Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.
license: Apache-2.0
---
# Chrome DevTools Agent Skill
Browser automation via executable Puppeteer scripts. All scripts output JSON for easy parsing.
## Quick Start
**CRITICAL**: Always check `pwd` before running scripts.
### Installation
#### Step 1: Install System Dependencies (Linux/WSL only)
On Linux/WSL, Chrome requires system libraries. Install them first:
```bash
pwd # Should show current working directory
cd .claude/skills/chrome-devtools/scripts
./install-deps.sh # Auto-detects OS and installs required libs
```
Supports: Ubuntu, Debian, Fedora, RHEL, CentOS, Arch, Manjaro
**macOS/Windows**: Skip this step (dependencies bundled with Chrome)
#### Step 2: Install Node Dependencies
```bash
npm install # Installs puppeteer, debug, yargs
```
#### Step 3: Install ImageMagick (Optional, Recommended)
ImageMagick enables automatic screenshot compression to keep files under 5MB:
**macOS:**
```bash
brew install imagemagick
```
**Ubuntu/Debian/WSL:**
```bash
sudo apt-get install imagemagick
```
**Verify:**
```bash
magick -version # or: convert -version
```
Without ImageMagick, screenshots >5MB will not be compressed (may fail to load in Gemini/Claude).
### Test
```bash
node navigate.js --url https://example.com
# Output: {"success": true, "url": "https://example.com", "title": "Example Domain"}
```
## Available Scripts
All scripts are in `.claude/skills/chrome-devtools/scripts/`
**CRITICAL**: Always check `pwd` before running scripts.
### Script Usage
- `./scripts/README.md`
### Core Automation
- `navigate.js` - Navigate to URLs
- `screenshot.js` - Capture screenshots (full page or element)
- `click.js` - Click elements
- `fill.js` - Fill form fields
- `evaluate.js` - Execute JavaScript in page context
### Analysis & Monitoring
- `snapshot.js` - Extract interactive elements with metadata
- `console.js` - Monitor console messages/errors
- `network.js` - Track HTTP requests/responses
- `performance.js` - Measure Core Web Vitals + record traces
## Usage Patterns
### Single Command
```bash
pwd # Should show current working directory
cd .claude/skills/chrome-devtools/scripts
node screenshot.js --url https://example.com --output ./docs/screenshots/page.png
```
**Important**: Always save screenshots to `./docs/screenshots` directory.
### Automatic Image Comp预览已截断。下载完整技能包可查看全部文件内容。
1. 先判断它是否匹配你的任务、运行环境和依赖边界。
2. 再结合最近 7 天下载趋势,决定是直接安装还是先下载完整包审阅。
3. 需要程序化集成时,再去 Docs 查看 API 和 OpenAPI 描述。