Loading...
Loading...
Browser automation via Puppeteer CLI scripts (JSON output). Capabilities: screenshots, PDF generation, web scraping, form automation, network monitoring, performance profiling, JavaScript debugging, headless browsing. Actions: screenshot, scrape, automate, test, profile, monitor, debug browser. Keywords: Puppeteer, headless Chrome, screenshot, PDF, web scraping, form fill, click, navigate, network traffic, performance audit, Lighthouse, console logs, DOM manipulation, element selector, wait, scroll, automation script. Use when: taking screenshots, generating PDFs from web, scraping websites, automating form submissions, monitoring network requests, profiling page performance, debugging JavaScript, testing web UIs.
npx skill4agent add samhvw8/dot-claude chrome-devtoolscd .claude/skills/chrome-devtools/scripts
./install-deps.sh # Auto-detects OS and installs required libsnpm install # Installs puppeteer, debug, yargsnode navigate.js --url https://example.com
# Output: {"success": true, "url": "https://example.com", "title": "Example Domain"}.claude/skills/chrome-devtools/scripts/./scripts/README.mdnavigate.jsscreenshot.jsclick.jsfill.jsevaluate.jssnapshot.jsconsole.jsnetwork.jsperformance.jscd .claude/skills/chrome-devtools/scripts
node screenshot.js --url https://example.com --output ./docs/screenshots/page.png./docs/screenshots# 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]"# 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.jsonnode 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'PERF=$(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"
finode fill.js --url https://example.com --selector "#search" --value "query" --close false
node click.js --selector "button[type=submit]"node console.js --url https://example.com --types error,warn --duration 5000 | jq '.messageCount'--headless false--close false--timeout 30000--wait-until networkidle2./scripts/README.md{
"success": true,
"url": "https://example.com",
... // script-specific data
}{
"success": false,
"error": "Error message"
}snapshot.jsnode snapshot.js --url https://example.com | jq '.elements[] | {tagName, text, selector}'npm install./install-deps.shsudo apt-get install -y libnss3 libnspr4 libasound2t64 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1ls ~/.cache/puppeteernpm rebuildnpm installnpm installnpx puppeteer browsers install chromenode snapshot.js --url <url>--timeout 60000--wait-until load--wait-until domcontentloaded--wait-until networkidle2--timeout 30000chmod +x *.sh./references/import { getBrowser, getPage, closeBrowser, outputJSON } from './lib/browser.js';
// Your automation logicconst client = await page.createCDPSession();
await client.send('Emulation.setCPUThrottlingRate', { rate: 4 });