vc:chrome-devtools
Skill0 starsChanged 3 months agoMITView on GitHub
Automate browsers with Puppeteer CLI scripts and persistent sessions. Use for screenshots, performance analysis, network monitoring, web scraping, form automation, JavaScript debugging.
- Installs packages
Files
Chrome DevTools
Browser automation via Puppeteer scripts with persistent sessions. All scripts output JSON.
Skill Location
Skills can be project-scope (.claude/skills/chrome-devtools/scripts/) or user-scope ($HOME/.claude/skills/chrome-devtools/scripts/). Project-scope wins when both exist. Scripts use __dirname for paths — no need to cd first.
Choosing Your Approach
| Scenario | Approach |
| Source-available sites | Read source code, write selectors directly |
| Unknown layouts | aria-snapshot.js for semantic discovery |
| Visual inspection | Screenshots to verify rendering |
| Debug issues | Console logs + session storage analysis |
| Accessibility audit | ARIA snapshot for semantic structure |
Project-Specific Setup
For project-specific connection patterns and when to prefer chrome-devtools over agent-browser, see process/context/tests/all-tests.md in the consuming repo. This file is a generic tool reference.
Browser Mode
Auto-resolved by resolveHeadless() in lib/browser.js:
| Environment | Default | Why |
| macOS / Windows | Headed | OAuth login support, debug visibility |
| Linux / WSL | Headless | No display |
CI (CI, GITHUB_ACTIONS, GITLAB_CI, JENKINS_URL) | Headless | No display |
Override per-script with --headless true|false.
ARIA Snapshot (Element Discovery)
# Stdout
node "$SKILL_DIR/aria-snapshot.js" --url https://example.com
# Save to file
node "$SKILL_DIR/aria-snapshot.js" --url https://example.com --output ./snap.yamlYAML output format:
- banner:
- link "Hacker News" [ref=e1]
- main:
- textbox [ref=e10]
/placeholder: "Search"[ref=eN] is a stable identifier you can pass to select-ref.js --action click|fill|text|screenshot|hover|focus.
Local HTML Files
Never browse file:// URLs — many browser features are blocked. Serve via local HTTP first:
npx serve ./dist -p 3000 &
node "$SKILL_DIR/navigate.js" --url http://localhost:3000Quick Start
# One-time setup
npm install --prefix "$SKILL_DIR"
# Linux/WSL only: install Chrome system libs
"$SKILL_DIR/install-deps.sh"
# Test (browser stays running for session reuse)
node "$SKILL_DIR/navigate.js" --url https://example.com
# Output: {"success": true, "url": "...", "title": "..."}Session Persistence
Browser state persists via .browser-session.json (WebSocket endpoint file). Default: scripts disconnect but keep browser running.
# First script: launch + navigate (browser stays running)
node "$SKILL_DIR/navigate.js" --url https://example.com/login
# Subsequent scripts: reuse page state
node "$SKILL_DIR/fill.js" --selector "#email" --value "user@example.com"
node "$SKILL_DIR/fill.js" --selector "#password" --value "secret"
node "$SKILL_DIR/click.js" --selector "button[type=submit]"
# End session
node "$SKILL_DIR/navigate.js" --url about:blank --close trueWorkflow Loop
- Execute focused script for single task
- Observe JSON output
- Assess completion status
- Decide next action
- Repeat until done
Screenshots
node "$SKILL_DIR/screenshot.js" --url https://example.com --output ./page.png
node "$SKILL_DIR/screenshot.js" --url https://example.com --output ./page.png --full-page true
node "$SKILL_DIR/screenshot.js" --url https://example.com --selector ".main" --output ./el.pngScreenshots >5MB auto-compress via Sharp. Use --max-size 3 for a lower threshold, --no-compress to disable.
Console + Network Capture
# Console: capture errors for 5s
node "$SKILL_DIR/console.js" --url https://example.com --types error --duration 5000
# Network: 4xx/5xx response scan
node "$SKILL_DIR/network.js" --url https://example.com | jq '.requests[] | select(.response.status >= 400)'Common Patterns
Web scraping — use evaluate.js to run JS in page context, return JSON.
Form automation — navigate.js → fill.js → click.js.
Performance — performance.js returns Core Web Vitals.
Error Recovery
- Capture current state with
screenshot.js(don't navigate — preserve state) - Get console errors with
console.js - Discover correct selector with
snapshot.js(oraria-snapshot.js) - Try XPath if CSS fails:
click.js --selector "//button[contains(text(),'Submit')]"
Authentication
Five methods (use the right one for the auth flow):
| Method | Best For |
inject-auth.js (cookies) | Simple session cookies, API tokens |
import-cookies.js (extension export) | Multi-cookie auth, OAuth tokens |
Default Chrome profile (--use-default-profile) | 2FA, SSO, complex OAuth — Chrome must be closed |
connect-chrome.js (remote debugging) | Debugging with visible browser |
--wait-for-login (interactive) | OAuth/SSO with manual browser interaction |
Auth sessions save to .auth-session.json (24h reuse). For the full contract of each method including the Chrome remote-debugging launch commands by OS, see references/authentication.md (extracted from the prior SKILL.md body).
Available Scripts
The 15+ scripts in scripts/ (navigate, click, fill, evaluate, snapshot, aria-snapshot, select-ref, console, network, performance, ws-debug, ws-full-debug, inject-auth, import-cookies, connect-chrome) are documented in references/scripts.md with per-script options. Load that file when you need exact flags.
Reference Documentation
./references/cdp-domains.md— Chrome DevTools Protocol domains./references/puppeteer-reference.md— Puppeteer API patterns./references/performance-guide.md— Core Web Vitals optimization./references/scripts.md— Per-script option reference./references/authentication.md— Full auth method contract./scripts/README.md— Detailed script options- ./references/browserbase-cloud-setup.md — Browserbase cloud browser setup
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- opencue/cuecards★ 610% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- vc:kitSkill
- vc:auditSkill
- vc:autoresearchSkill
- vc:context-engineeringSkill
- vc:debugSkill
- vc:docs-seekerSkill
- vc:generate-contextSkill
- vc:generate-planSkill
- vc:mcp-managementSkill
- vc:merge-worktreeSkill
- vc:previewSkill
- vc:problem-solvingSkill
- vc:publishSkill
- vc:repomixSkill
- vc:scoutSkill
- vc:securitySkill
- vc:sequential-thinkingSkill
- vc:setupSkill
- vc:stress-testSkill
- vc:tech-graphSkill
- vc:updateSkill
- vc:watzupSkill
- vc:web-testingSkill
- vc:xiaSkill
- vc:kitSkill
- vc:auditSkill
- vc:autoresearchSkill
- vc:chrome-devtoolsSkill
- vc:context-engineeringSkill
- vc:debugSkill
- vc:docs-seekerSkill
- vc:generate-contextSkill
- vc:generate-planSkill
- vc:mcp-managementSkill
- vc:merge-worktreeSkill
- vc:previewSkill
- vc:problem-solvingSkill
- vc:publishSkill
- vc:repomixSkill
- vc:scoutSkill
- vc:securitySkill
- vc:sequential-thinkingSkill
- vc:setupSkill
- vc:stress-testSkill
- vc:tech-graphSkill
- vc:updateSkill
- vc:watzupSkill
- vc:web-testingSkill
- vc:xiaSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

