Chrome DevTools

Chrome DevTools

Teaches an agent to drive a live Chrome browser through the Chrome DevTools MCP server: navigate, click, screenshot, inspect network and console, and profile performance.

Skill files1 file
SKILL.md98 lines
1
---
2
name: chrome-devtools
3
description: '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.'
4
license: MIT
5
---
6
7
# Chrome DevTools Agent
8
9
## Overview
10
11
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.
12
13
## When to Use
14
15
Use this skill when:
16
17
- **Browser Automation**: Navigating pages, clicking elements, filling forms, and handling dialogs.
18
- **Visual Inspection**: Taking screenshots or text snapshots of web pages.
19
- **Debugging**: Inspecting console messages, evaluating JavaScript in the page context, and analyzing network requests.
20
- **Performance Analysis**: Recording and analyzing performance traces to identify bottlenecks and Core Web Vital issues.
21
- **Emulation**: Resizing the viewport or emulating network/CPU conditions.
22
23
## Tool Categories
24
25
### 1. Navigation & Page Management
26
27
- `new_page`: Open a new tab/page.
28
- `navigate_page`: Go to a specific URL, reload, or navigate history.
29
- `select_page`: Switch context between open pages.
30
- `list_pages`: See all open pages and their IDs.
31
- `close_page`: Close a specific page.
32
- `wait_for`: Wait for specific text to appear on the page.
33
34
### 2. Input & Interaction
35
36
- `click`: Click on an element (use `uid` from snapshot).
37
- `fill` / `fill_form`: Type text into inputs or fill multiple fields at once.
38
- `hover`: Move the mouse over an element.
39
- `press_key`: Send keyboard shortcuts or special keys (e.g., "Enter", "Control+C").
40
- `drag`: Drag and drop elements.
41
- `handle_dialog`: Accept or dismiss browser alerts/prompts.
42
- `upload_file`: Upload a file through a file input.
43
44
### 3. Debugging & Inspection
45
46
- `take_snapshot`: Get a text-based accessibility tree (best for identifying elements).
47
- `take_screenshot`: Capture a visual representation of the page or a specific element.
48
- `list_console_messages` / `get_console_message`: Inspect the page's console output.
49
- `evaluate_script`: Run custom JavaScript in the page context.
50
- `list_network_requests` / `get_network_request`: Analyze network traffic and request details.
51
52
### 4. Emulation & Performance
53
54
- `resize_page`: Change the viewport dimensions.
55
- `emulate`: Throttling CPU/Network or emulating geolocation.
56
- `performance_start_trace`: Start recording a performance profile.
57
- `performance_stop_trace`: Stop recording and save the trace.
58
- `performance_analyze_insight`: Get detailed analysis from recorded performance data.
59
60
## Workflow Patterns
61
62
### Pattern A: Identifying Elements (Snapshot-First)
63
64
Always prefer `take_snapshot` over `take_screenshot` for finding elements. The snapshot provides `uid` values which are required by interaction tools.
65
66
```markdown
67
1. `take_snapshot` to get the current page structure.
68
2. Find the `uid` of the target element.
69
3. Use `click(uid=...)` or `fill(uid=..., value=...)`.
70
```
71
72
### Pattern B: Troubleshooting Errors
73
74
When a page is failing, check both console logs and network requests.
75
76
```markdown
77
1. `list_console_messages` to check for JavaScript errors.
78
2. `list_network_requests` to identify failed (4xx/5xx) resources.
79
3. `evaluate_script` to check the value of specific DOM elements or global variables.
80
```
81
82
### Pattern C: Performance Profiling
83
84
Identify why a page is slow.
85
86
```markdown
87
1. `performance_start_trace(reload=true, autoStop=true)`
88
2. Wait for the page to load/trace to finish.
89
3. `performance_analyze_insight` to find LCP issues or layout shifts.
90
```
91
92
## Best Practices
93
94
- **Context Awareness**: Always run `list_pages` and `select_page` if you are unsure which tab is currently active.
95
- **Snapshots**: Take a new snapshot after any major navigation or DOM change, as `uid` values may change.
96
- **Timeouts**: Use reasonable timeouts for `wait_for` to avoid hanging on slow-loading elements.
97
- **Screenshots**: Use `take_screenshot` sparingly for visual verification, but rely on `take_snapshot` for logic.
98

© awesome-copilot contributors · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…