# Chrome DevTools Agent

 

'Expert-level browser automation, debugging, and performance analysis using Chrome DevTools MCP. Use for interacting with web pages, capturing screenshots, analyzing network traffic, and profiling performance.'

 

**Licence** MIT

 

**Source** github/awesome-copilot

 [Download zip](<https://delaparra-services.nl/skills/chrome-devtools/download>)   

# Chrome DevTools Agent

 

## Overview

 

A specialized skill for controlling and inspecting a live Chrome browser. This skill leverages the ` chrome-devtools ` MCP server to perform a wide range of browser-related tasks, from simple navigation to complex performance profiling.

 

## When to Use

 

Use this skill when:

 

- **Browser Automation**: Navigating pages, clicking elements, filling forms, and handling dialogs. 
- **Visual Inspection**: Taking screenshots or text snapshots of web pages. 
- **Debugging**: Inspecting console messages, evaluating JavaScript in the page context, and analyzing network requests. 
- **Performance Analysis**: Recording and analyzing performance traces to identify bottlenecks and Core Web Vital issues. 
- **Emulation**: Resizing the viewport or emulating network/CPU conditions.

 

## Tool Categories

 

### 1. Navigation & Page Management

 

- ` new_page `: Open a new tab/page. 
- ` navigate_page `: Go to a specific URL, reload, or navigate history. 
- ` select_page `: Switch context between open pages. 
- ` list_pages `: See all open pages and their IDs. 
- ` close_page `: Close a specific page. 
- ` wait_for `: Wait for specific text to appear on the page.

 

### 2. Input & Interaction

 

- ` click `: Click on an element (use ` uid ` from snapshot). 
- ` fill ` / ` fill_form `: Type text into inputs or fill multiple fields at once. 
- ` hover `: Move the mouse over an element. 
- ` press_key `: Send keyboard shortcuts or special keys (e.g., "Enter", "Control+C"). 
- ` drag `: Drag and drop elements. 
- ` handle_dialog `: Accept or dismiss browser alerts/prompts. 
- ` upload_file `: Upload a file through a file input.

 

### 3. Debugging & Inspection

 

- ` take_snapshot `: Get a text-based accessibility tree (best for identifying elements). 
- ` take_screenshot `: Capture a visual representation of the page or a specific element. 
- ` list_console_messages ` / ` get_console_message `: Inspect the page's console output. 
- ` evaluate_script `: Run custom JavaScript in the page context. 
- ` list_network_requests ` / ` get_network_request `: Analyze network traffic and request details.

 

### 4. Emulation & Performance

 

- ` resize_page `: Change the viewport dimensions. 
- ` emulate `: Throttling CPU/Network or emulating geolocation. 
- ` performance_start_trace `: Start recording a performance profile. 
- ` performance_stop_trace `: Stop recording and save the trace. 
- ` performance_analyze_insight `: Get detailed analysis from recorded performance data.

 

## Workflow Patterns

 

### Pattern A: Identifying Elements (Snapshot-First)

 

Always prefer ` take_snapshot ` over ` take_screenshot ` for finding elements. The snapshot provides ` uid ` values which are required by interaction tools.

 

```
1. `take_snapshot` to get the current page structure.
2. Find the `uid` of the target element.
3. Use `click(uid=...)` or `fill(uid=..., value=...)`.
```

 

### Pattern B: Troubleshooting Errors

 

When a page is failing, check both console logs and network requests.

 

```
1. `list_console_messages` to check for JavaScript errors.
2. `list_network_requests` to identify failed (4xx/5xx) resources.
3. `evaluate_script` to check the value of specific DOM elements or global variables.
```

 

### Pattern C: Performance Profiling

 

Identify why a page is slow.

 

```
1. `performance_start_trace(reload=true, autoStop=true)`
2. Wait for the page to load/trace to finish.
3. `performance_analyze_insight` to find LCP issues or layout shifts.
```

 

## Best Practices

 

- **Context Awareness**: Always run ` list_pages ` and ` select_page ` if you are unsure which tab is currently active. 
- **Snapshots**: Take a new snapshot after any major navigation or DOM change, as ` uid ` values may change. 
- **Timeouts**: Use reasonable timeouts for ` wait_for ` to avoid hanging on slow-loading elements. 
- **Screenshots**: Use ` take_screenshot ` sparingly for visual verification, but rely on ` take_snapshot ` for logic.

 

## Files

 

- ` LICENSE ` 
- ` SKILL.md ` 
- ` SOURCE.md `

 

## Related terms

 

- [200 OK](<https://delaparra-services.nl/knowledge-hub/200-ok>) 
- [201 Created](<https://delaparra-services.nl/knowledge-hub/201-created>) 
- [204 No Content](<https://delaparra-services.nl/knowledge-hub/204-no-content>) 
- [206 Partial Content](<https://delaparra-services.nl/knowledge-hub/206-partial-content>) 
- [301 Moved Permanently](<https://delaparra-services.nl/knowledge-hub/301-moved-permanently>) 
- [302 Found](<https://delaparra-services.nl/knowledge-hub/302-found>) 
- [304 Not Modified](<https://delaparra-services.nl/knowledge-hub/304-not-modified>) 
- [400 Bad Request](<https://delaparra-services.nl/knowledge-hub/400-bad-request>) 
- [404 Not Found](<https://delaparra-services.nl/knowledge-hub/404-not-found>) 
- [405 Method Not Allowed](<https://delaparra-services.nl/knowledge-hub/405-method-not-allowed>) 
- [409 Conflict](<https://delaparra-services.nl/knowledge-hub/409-conflict>) 
- [422 Unprocessable Entity](<https://delaparra-services.nl/knowledge-hub/422-unprocessable-entity>) 
- [429 Too Many Requests](<https://delaparra-services.nl/knowledge-hub/429-too-many-requests>) 
- [Accept](<https://delaparra-services.nl/knowledge-hub/accept>) 
- [Accept-Encoding](<https://delaparra-services.nl/knowledge-hub/accept-encoding>) 
- [Accept-Language](<https://delaparra-services.nl/knowledge-hub/accept-language>) 
- [Access-Control-Allow-Credentials](<https://delaparra-services.nl/knowledge-hub/access-control-allow-credentials>) 
- [Access-Control-Allow-Headers](<https://delaparra-services.nl/knowledge-hub/access-control-allow-headers>) 
- [Access-Control-Allow-Methods](<https://delaparra-services.nl/knowledge-hub/access-control-allow-methods>) 
- [Access-Control-Allow-Origin](<https://delaparra-services.nl/knowledge-hub/access-control-allow-origin>) 
- [Access-Control-Max-Age](<https://delaparra-services.nl/knowledge-hub/access-control-max-age>) 
- [Cache-Control](<https://delaparra-services.nl/knowledge-hub/cache-control>) 
- [Content-Length](<https://delaparra-services.nl/knowledge-hub/content-length>) 
- [Content-Type](<https://delaparra-services.nl/knowledge-hub/content-type>) 
- [CORSError](<https://delaparra-services.nl/knowledge-hub/corserror>) 
- [ETag](<https://delaparra-services.nl/knowledge-hub/etag>) 
- [Expires](<https://delaparra-services.nl/knowledge-hub/expires>) 
- [If-Match](<https://delaparra-services.nl/knowledge-hub/if-match>) 
- [If-Modified-Since](<https://delaparra-services.nl/knowledge-hub/if-modified-since>) 
- [If-None-Match](<https://delaparra-services.nl/knowledge-hub/if-none-match>) 
- [Last-Modified](<https://delaparra-services.nl/knowledge-hub/last-modified>) 
- [Location](<https://delaparra-services.nl/knowledge-hub/location>) 
- [Origin](<https://delaparra-services.nl/knowledge-hub/origin>) 
- [Range](<https://delaparra-services.nl/knowledge-hub/range>) 
- [Referer](<https://delaparra-services.nl/knowledge-hub/referer>) 
- [Retry-After](<https://delaparra-services.nl/knowledge-hub/retry-after>) 
- [User-Agent](<https://delaparra-services.nl/knowledge-hub/user-agent>) 
- [Vary](<https://delaparra-services.nl/knowledge-hub/vary>) 
- [X-Rate-Limit-\*](<https://delaparra-services.nl/knowledge-hub/x-rate-limit>)

 

[Installing an agent skill in Claude Code, Codex, Cursor and Copilot](<https://delaparra-services.nl/manuals/een-skill-installeren-in-je-ai-assistent>)

[HTML version](https://delaparra-services.nl/skills/chrome-devtools)
