inspect-in-devtools
Use this skill to connect to the Chrome DevTools UI for interactive debugging, UI/UX review, Q&A, showing elements/network requests/panels to the user, inspecting the user's current DevTools selection, and addressing or polling for DevTools UI comment threads.
How do I install this agent skill?
npx skills add https://github.com/chromedevtools/chrome-devtools-mcp --skill inspect-in-devtoolsIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill enables interactive debugging and UI review through Chrome DevTools. It includes capabilities to read and respond to comment threads directly within the browser interface, which introduces a potential surface for indirect prompt injection from external UI content.
- Socketpass
No alerts
- Snykwarn
Risk: MEDIUM · 1 issue
What does this agent skill do?
Debug, Review, and Q&A in DevTools
Use this skill to:
- Show a target to the user: Open DevTools and reveal a panel, a DOM element, or a network request.
- Inspect the user's selection: Read the element or network request that the user selected in DevTools.
- Address DevTools comments: Fetch comment threads, answer questions or apply fixes, and resolve the threads.
Prerequisites
- Chrome version: Chrome M159 or later.
- Required flag:
--devtools-commentsin the MCP server config. Without it,open_devtools,reveal_in_devtools,get_devtools_comments, andresolve_devtools_commentare not available. - Headed browser: Chrome must not run in
--headlessmode. - Page targeting: All tools require a
pageIdfromlist_pagesornew_page.
Workflows
1. Open DevTools
Call open_devtools with pageId. Do this before you call reveal_in_devtools, get_devtools_comments, or resolve_devtools_comment.
2. Reveal a panel, element, or network request
Call reveal_in_devtools with pageId and these optional parameters:
panelName:"elements","network","sources", or"console". Pass it alone to switch panels.uid: Elementuidfromtake_snapshot. Reveals the element in the Elements panel.reqid: Requestreqidfromlist_network_requests. Reveals the request in the Network panel.
uid and reqid are mutually exclusive.
3. Inspect the user's selection
- DOM element: Call
take_snapshot. The snapshot marks the element selected in the Elements panel. Pass itsuidtoget_css_styles,take_screenshot, orevaluate_script. - Network request: Call
get_network_requestand omitreqid. It returns the request selected in the Network panel.
4. Handle comment threads
Select the mode from the user's request.
Mode A: One-shot (comments already exist)
Use this mode when the user says the comments are already in DevTools, or asks you not to poll.
- Call
get_devtools_commentsonce. - Process and resolve each returned thread.
- Summarize your changes and answers in chat, then end your turn. Do not poll.
Mode B: Watch (wait for user feedback)
Use this mode when the user asks you to wait while they debug, review, or add comments.
- Call
get_devtools_commentsimmediately. - While the result is
"No open DevTools comments found.", wait 10 seconds, then call it again. Call it immediately if a"DevTools comment threads updated"notification arrives. - Stop after 12 consecutive empty polls (about 2 minutes) or when the user asks you to stop.
- When threads appear, process and resolve them. Then reset the empty-poll counter and continue polling.
Rules for polling:
- Use a background sub-agent when sub-agent tools are available, so the main thread stays responsive. The sub-agent returns the threads to the main agent, or resolves them itself if it has workspace and MCP tools.
- Poll inline only when sub-agent tools are unavailable. Do not end your turn early.
- Never call
get_devtools_commentsback-to-back without the 10-second delay.
Process and resolve a thread
For each ### Thread: <id>:
- Inspect the anchored target:
Related element uid: Useget_css_styles,take_snapshot, ortake_screenshotwith theuid.Related network reqid: Useget_network_requestwith thereqid.- Optionally call
reveal_in_devtoolsto show the target to the user.
- Address the comment:
- For a code or styling request, apply the fix in the workspace. Reload and verify the page if needed.
- For a question or root-cause investigation, collect diagnostic data. Do not make unnecessary code edits.
- Resolve: Call
resolve_devtools_commentwithpageId,threadId, andreplyText:- For a question or root cause, write a detailed answer.
- For a straightforward fix, write 1–2 sentences that state the change and the file.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/chromedevtools/chrome-devtools-mcp/inspect-in-devtools">View inspect-in-devtools on skillZs</a>