Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/microck-chrome-devtools/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 104% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 45% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 92% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 54% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 83% | 0% |
Browser automation via executable Puppeteer scripts. All scripts output JSON for easy parsing.
CRITICAL: Always check pwd before running scripts.
On Linux/WSL, Chrome requires system libraries. Install them first:
bashpwd # 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)
bashnpm install # Installs puppeteer, debug, yargs
ImageMagick enables automatic screenshot compression to keep files under 5MB:
macOS:
bashbrew install imagemagick
Ubuntu/Debian/WSL:
bashsudo apt-get install imagemagick
Verify:
bashmagick -version # or: convert -version
Without ImageMagick, screenshots >5MB will not be compressed (may fail to load in Gemini/Claude).
bashnode navigate.js --url https://example.com # Output: {"success": true, "url": "https://example.com", "title": "Example Domain"}
All scripts are in .claude/skills/chrome-devtools/scripts/
CRITICAL: Always check pwd before running scripts.
./scripts/README.mdnavigate.js - Navigate to URLsscreenshot.js - Capture screenshots (full page or element)click.js - Click elementsfill.js - Fill form fieldsevaluate.js - Execute JavaScript in page contextsnapshot.js - Extract interactive elements with metadataconsole.js - Monitor console messages/errorsnetwork.js - Track HTTP requests/responsesperformance.js - Measure Core Web Vitals + record tracesbashpwd # 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.
Screenshots are automatically compressed if they exceed 5MB to ensure compatibility with Gemini API and Claude Code (which have 5MB limits). This uses ImageMagick internally:
bash# Default: auto-compress if >5MB node screenshot.js --url https://example.com --output page.png # Custom size threshold (e.g., 3MB) node screenshot.js --url https://example.com --output page.png --max-size 3 # Disable compression node screenshot.js --url https://example.com --output page.png --no-compress
Compression behavior:
Output includes compression info:
json{ "success": true, "output": "/path/to/page.png", "compressed": true, "originalSize": 8388608, "size": 3145728, "compressionRatio": "62.50%", "url": "https://example.com" }
bash# Keep browser open with --close false node navigate.js --url https://example.com/login --close false node fill.js --selector "#email" --value "user@example.com" --close false node fill.js --selector "#password" --value "secret" --close false node click.js --selector "button[type=submit]"
bash# Extract specific fields with jq node performance.js --url https://example.com | jq '.vitals.LCP' # Save to file node network.js --url https://example.com --output /tmp/requests.json
BEFORE executing any script:
pwd.claude/skills/chrome-devtools/scripts/ directorycd to correct locationExample:
bashpwd # Should show: .../chrome-devtools/scripts # If wrong: cd .claude/skills/chrome-devtools/scripts
AFTER screenshot/capture operations:
ls -lh <output-path>Example:
bashnode screenshot.js --url https://example.com --output ./docs/screenshots/page.png ls -lh ./docs/screenshots/page.png # Verify file exists # Then use Read tool to visually inspect
If script fails:
Example:
bash# CSS selector fails node click.js --url https://example.com --selector ".btn-submit" # Error: waiting for selector ".btn-submit" failed # Discover correct selector node snapshot.js --url https://example.com | jq '.elements[] | select(.tagName=="BUTTON")' # Try XPath node click.js --url https://example.com --selector "//button[contains(text(),'Submit')]"
❌ Wrong working directory → output files go to wrong location ❌ Skipping output validation → silent failures ❌ Using complex CSS selectors without testing → selector errors ❌ Not checking element visibility → timeout errors
✅ Always verify pwd before running scripts ✅ Always validate output after screenshots ✅ Use snapshot.js to discover selectors ✅ Test selectors with simple commands first
bashnode evaluate.js --url https://example.com --script " Array.from(document.querySelectorAll('.item')).map(el => ({ title: el.querySelector('h2')?.textContent, link: el.querySelector('a')?.href })) " | jq '.result'
bashPERF=$(node performance.js --url https://example.com) LCP=$(echo $PERF | jq '.vitals.LCP') if (( $(echo "$LCP < 2500" | bc -l) )); then echo "✓ LCP passed: ${LCP}ms" else echo "✗ LCP failed: ${LCP}ms" fi
bashnode fill.js --url https://example.com --selector "#search" --value "query" --close false node click.js --selector "button[type=submit]"
bashnode console.js --url https://example.com --types error,warn --duration 5000 | jq '.messageCount'
All scripts support:
--headless false - Show browser window--close false - Keep browser open for chaining--timeout 30000 - Set timeout (milliseconds)--wait-until networkidle2 - Wait strategySee ./scripts/README.md for complete options.
All scripts output JSON to stdout:
json{ "success": true, "url": "https://example.com", ... // script-specific data }
Errors go to stderr:
json{ "success": false, "error": "Error message" }
Use snapshot.js to discover selectors:
bashnode snapshot.js --url https://example.com | jq '.elements[] | {tagName, text, selector}'
"Cannot find package 'puppeteer'"
npm install in the scripts directory"error while loading shared libraries: libnss3.so" (Linux/WSL)
./install-deps.sh in scripts directorysudo apt-get install -y libnss3 libnspr4 libasound2t64 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1"Failed to launch the browser process"
ls ~/.cache/puppeteernpm rebuild then npm installChrome not found
npm installnpx puppeteer browsers install chromeElement not found
node snapshot.js --url <url>Script hangs
--timeout 60000--wait-until load or --wait-until domcontentloadedBlank screenshot
--wait-until networkidle2--timeout 30000Permission denied on scripts
chmod +x *.shScreenshot too large (>5MB)
--max-size 3--format jpeg --quality 80--selector .main-contentCompression not working
magick -version or convert -version"compressed": true--selector to capture only needed areaDetailed guides available in ./references/:
Create custom scripts using shared library:
javascriptimport { getBrowser, getPage, closeBrowser, outputJSON } from './lib/browser.js'; // Your automation logic
javascriptconst client = await page.createCDPSession(); await client.send('Emulation.setCPUThrottlingRate', { rate: 4 });
See reference documentation for advanced patterns and complete API coverage.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | pass→pass | 13,693 | 15,142 | +11% | 1 | 1 | 0% | 2,339 | 5,346 | +129% | 0 | 0 | — |
case-01 | fail→fail | 5,670 | 5,508 | -3% | 1 | 1 | 0% | 853 | 2,961 | +247% | 0 | 0 | — |
case-02 | fail→fail | 6,748 | 13,124 | +94% | 1 | 1 | 0% | 1,161 | 2,959 | +155% | 0 | 0 | — |
case-03 | fail→fail | 8,601 | 4,926 | -43% | 1 | 1 | 0% | 1,636 | 2,941 | +80% | 0 | 0 | — |
case-04 | fail→pass | 10,283 | 4,313 | -58% | 1 | 1 | 0% | 1,694 | 3,464 | +104% | 0 | 0 | — |
case-05 | fail→pass | 15,449 | 4,888 | -68% | 1 | 1 | 0% | 2,427 | 3,521 | +45% | 0 | 0 | — |
case-06 | fail→pass | 10,452 | 2,984 | -71% | 1 | 1 | 0% | 1,669 | 3,203 | +92% | 0 | 0 | — |
case-07 | fail→pass | 11,819 | 2,437 | -79% | 1 | 1 | 0% | 2,018 | 3,116 | +54% | 0 | 0 | — |
case-08 | fail→pass | 10,640 | 1,760 | -83% | 1 | 1 | 0% | 1,632 | 2,992 | +83% | 0 | 0 | — |
case-09 | fail→pass | 14,617 | 7,567 | -48% | 1 | 1 | 0% | 2,401 | 4,051 | +69% | 0 | 0 | — |
case-10 | fail→pass | 10,351 | 4,352 | -58% | 1 | 1 | 0% | 1,886 | 3,372 | +79% | 0 | 0 | — |
case-11 | fail→pass | 11,468 | 6,032 | -47% | 1 | 1 | 0% | 2,064 | 3,923 | +90% | 0 | 0 | — |
case-12 | fail→pass | 9,151 | 2,429 | -73% | 1 | 1 | 0% | 1,659 | 3,145 | +90% | 0 | 0 | — |
case-13 | fail→pass | 9,564 | 3,088 | -68% | 1 | 1 | 0% | 1,553 | 3,247 | +109% | 0 | 0 | — |
case-14 | pass→pass | 3,720 | 2,110 | -43% | 1 | 1 | 0% | 611 | 3,023 | +395% | 0 | 0 | — |
case-15 | pass→fail | 4,353 | 1,502 | -65% | 1 | 1 | 0% | 670 | 2,964 | +342% | 0 | 0 | — |
case-16 | fail→pass | 6,039 | 2,000 | -67% | 1 | 1 | 0% | 1,056 | 3,027 | +187% | 0 | 0 | — |
case-17 | fail→fail | 7,048 | 5,599 | -21% | 1 | 1 | 0% | 1,340 | 3,723 | +178% | 0 | 0 | — |
case-18 | pass→pass | 4,282 | 1,950 | -54% | 1 | 1 | 0% | 788 | 3,016 | +283% | 0 | 0 | — |
case-19 | fail→pass | 10,752 | 3,207 | -70% | 1 | 1 | 0% | 1,939 | 3,227 | +66% | 0 | 0 | — |
case-20 | pass→pass | 8,737 | 6,399 | -27% | 1 | 1 | 0% | 1,658 | 3,868 | +133% | 0 | 0 | — |
case-21 | pass→pass | 12,004 | 8,675 | -28% | 1 | 1 | 0% | 2,124 | 4,076 | +92% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +50 percentage points is the difference between those two pass rates over the 19 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.