Agent skill
chrome-debug
How to use Chrome DevTools MCP for browser debugging. Use when you need to inspect pages, take screenshots, debug UI issues, or verify visual changes.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/chrome-debug
SKILL.md
Chrome DevTools Debugging
This skill explains how to use the Chrome DevTools MCP for browser debugging and UI verification.
Setup
Before using Chrome DevTools MCP, you must launch Chrome in headless mode with remote debugging enabled:
npm run chrome &
This runs Chrome with the required flags for Docker/containerized environments:
--remote-debugging-port=9222- Enables MCP connection--no-sandbox- Required for Docker--headless- Runs without display--disable-gpu- Avoids GPU issues in containers
Wait a few seconds for Chrome to start before using MCP tools.
Screenshots
IMPORTANT: Always save screenshots to the .screenshots directory using the filePath parameter:
mcp__chrome-devtools__take_screenshot with filePath: ".screenshots/descriptive-name.png"
Use descriptive filenames like:
.screenshots/homepage-initial.png.screenshots/login-form-error.png.screenshots/after-click-submit.png
This allows debugging and visual comparison later.
Workflow Example
-
Start Chrome:
bashnpm run chrome &Wait 2-3 seconds for startup.
-
Navigate to the dev server:
mcp__chrome-devtools__navigate_page url="http://localhost:5173" -
Take a snapshot to see page structure:
mcp__chrome-devtools__take_snapshotThe snapshot shows element UIDs you can use for interactions.
-
Take a screenshot for visual verification:
mcp__chrome-devtools__take_screenshot filePath=".screenshots/page-state.png" -
Interact with elements using UIDs from snapshot:
mcp__chrome-devtools__click uid="1_4" mcp__chrome-devtools__fill uid="1_5" value="[email protected]"
Tips
- Prefer snapshots over screenshots - Snapshots are faster and provide element UIDs for interaction
- Always save screenshots locally - Use
.screenshots/directory with descriptive names - Check if Chrome is running - If tools fail to connect, run
npm run chrome &again - Wait after navigation - Use
wait_forto ensure page content loads before interacting
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?