chromium-browser
Use Chrome DevTools through PRB's shared attach-only Chromium browser for browsing, debugging, automation, visual inspection, console or network analysis, performance or memory profiling, screencasts, and Wayback Machine research.
How do I install this agent skill?
npx skills add https://github.com/paulrberg/agent-skills --skill chromium-browserIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides a comprehensive interface for controlling a Chromium browser via the Chrome DevTools Protocol. It includes scripts for managing the browser lifecycle, integrating with 1Password for authentication, and performing research using the Wayback Machine. The skill grants high-privilege capabilities such as arbitrary JavaScript execution in the browser and broad file system access for saving snapshots, which are documented features necessary for its intended automation and debugging purposes.
- Socketpass
No alerts
- Snykfail
Risk: CRITICAL · 2 issues
What does this agent skill do?
Chromium Browser
Operate the configured Chrome DevTools MCP against the existing shared browser without disrupting unrelated tabs or authenticated state.
Prefer this skill for rendered web pages in shared Chromium. When they fit, use search, fetch, APIs, CLIs, or connectors
for retrieval. Use host computer-use/CUA tools for native apps, browser chrome, and browser-internal pages such as
chrome://extensions. Also use native controls for a user-requested browser without a usable browser integration.
Existing task authorization covers this controller choice without a separate permission request.
Use one controller at a time for each browser. Preserve existing profiles, sessions, and unrelated tabs across controllers. Native controls do not relax privacy rules or approval requirements for the action itself. If the user selects another available browser integration, follow its tool contract.
Environment Contract
- Treat the bundled
scripts/chrome-devtools-mcp.shwrapper and the tools exposed in the current session as authoritative. The wrapper runs the globally installedchrome-devtools-mcpexecutable and sets flags, logging, and browser attachment. Do not run the MCP package directly. - The MCP attaches to an existing remote-debugging browser and does not launch one.
- If an MCP call cannot attach to the browser, run the bundled
scripts/ensure-chromium.shonce. The helper launches Chromium with the shared profile on the configured port. It does nothing when the endpoint already responds. After it succeeds, retry the failed call once. If the call still fails, follow Troubleshooting. - Never launch Chromium another way, launch a fallback browser, or create another profile.
- Treat the browser as shared, authenticated, and concurrently used by the user and other agents. Inspect only pages relevant to the task and do not surface unrelated tab titles or content.
- Trust the live tool inventory. An absent tool is unavailable in this session. Do not advise editing client MCP configuration as a troubleshooting shortcut.
- The wrapper returns plain-text responses and permits file tools on every absolute path. Path capability is not write authorization.
For released tool behavior, consult the upstream tool reference. The current session's schemas determine which tools and parameters are available.
Reference Routing
For Wayback Machine capture discovery or replay research, read references/wayback-machine.md before making any Wayback
request. Otherwise do not load it. Discover captures through serial API requests outside Chromium. Then open only the
selected replay when rendered inspection adds evidence.
Call Budget
Every browser call costs a round trip, and every response costs context. Spend both deliberately.
- When the host loads tool schemas on demand, request the core set in one call:
list_pages,new_page,navigate_page,take_snapshot,evaluate_script,click,fill,type_text,press_key,wait_for,take_screenshot, andclose_page. Request other tools only when a step needs them. - Every response from
list_pages,new_page,select_page,close_page, andnavigate_pagelists all open pages. Do not calllist_pagesto confirm what one of those responses already shows. - Choose the cheapest evidence that answers the question.
evaluate_scriptreturns only the values you select.take_snapshotreturns the whole accessibility tree.take_screenshotreturns an image, which costs more context and more model time than either. - An inline snapshot is typically about 8 KB, and one in ten exceeds 20 KB. A long article, repository page, or feed can
produce hundreds of kilobytes, which exceeds the host's result limit and returns an error instead of the snapshot. For
such a page, extract the needed data with
evaluate_script, or save the snapshot withfilePathand search the file withrg. evaluate_scriptis exclusive. While it runs, every other call on this server waits, including calls on other pages. Keep scripts short and batch several reads into one script.
Page Ownership
The numbered steps below apply to MCP pages. With native controls, track task-created tabs through the native UI. Verify the requested result, then close only those tabs unless the user asked to leave them open.
- When a fresh page satisfies the task, start with
new_pageandbackground: true. Its response lists every open page and marks the created page[selected]. Record that page ID as owned by this task. Treat every other listed page as pre-existing. Calllist_pagesfirst only when the task must act on a pre-existing page. When the task changes page-local state, such as local storage, cookies, or a web app's saved progress, passisolatedContextwith a task name tonew_page. Pages in that named context share storage only with each other, so the user's real sessions and data in the default context stay untouched. Close those pages at completion like any other owned page. - When an input action response lists
## Opened pages, record those page IDs as created by this task. Never infer ownership from a later page-list difference. - Pass an explicit
pageIdto every page-scoped tool. Do not rely on selected-page state. Useselect_pageonly when deliberately bringing a page to the foreground. - Navigate or mutate a pre-existing page only when the task explicitly depends on that page's current state. Never close a pre-existing page.
- At completion, close only the recorded pages created by this task unless the user asked to leave one open. Call
close_pagewith each owned ID directly. The server selects another page itself, and the response lists the remaining pages. Use that list as closure evidence. Do not callselect_pagebefore the close orlist_pagesafter it.
Interaction and Evidence
- On one page, navigate first. Wait for a useful known signal only when the page renders content after load. Take a fresh snapshot. Then interact with identifiers from that snapshot. Refresh the snapshot after navigation or meaningful DOM changes.
- Prefer
take_snapshotfor structure and automation,take_screenshotfor visual evidence, andevaluate_scriptfor information absent from the accessibility tree. Keep the default non-verbose snapshot.verbose: trueroughly doubles its size. - Set
waitForStableDom: falseon everyevaluate_scriptcall that only reads. The default waits up to three seconds for DOM mutations to stop, which a read does not need. Return a compact JSON object. Bound every array to about 50 items. Never return a whole DOM, HTML document, or large array. wait_forreturns the full snapshot when the text appears and a short error on timeout. Do not calltake_snapshotafter a successfulwait_foron the same page. On a large page, check for the signal with a read-onlyevaluate_scriptinstead.- Input actions omit the snapshot by default. Pass
includeSnapshot: truetoclick,fill, or another input tool only when the next step needs the updated structure immediately. That replaces a separatetake_snapshot. Do not passincludeSnapshottonavigate_page, which does not accept it. - When a call returns
A dialog is open, the open dialog blocksevaluate_scriptand other dialog-sensitive tools on that page. Usehandle_dialogonly on a page that this task owns or depends on, within the task's authority. - Prefer
fill_formfor batches of inputs, selects, checkboxes, and radio buttons. Forupload_file, use the currentfilePathsarray schema with task-authorized files on the browser host. - For CSS cascade questions, use
get_css_styleswith a UID from a fresh snapshot. Paginate withpageIdxandpageSizeto inspect additional matched and inherited rules. - For a screenshot, pass
uidto capture one element when only that element matters. PassfilePathwhen the image is evidence for the user rather than input for your next decision. Accept wrapper screenshot defaults. Requestformat: "png"when lossless output is required. PNG,fullPage, andfilePathcannot bypass the wrapper's 1600-pixel width and height caps. Full-resolution output requires an authorized wrapper configuration change. AfullPagecapture of a page with CSS animations can show blank or stale regions, especially in a background tab, while computed styles report the finished state. To verify an animated end state, scroll the region into view and take a viewport screenshot, or emulateprefersReducedMotion: "reduce"before the capture. - Paginate and filter console, network, memory, and other high-volume results.
- To change the rendered size, use
emulatewithviewport. Useresize_pageonly when the OS window size itself matters. It fails withRestore window to normal state before setting content sizeon a maximized or full-screen window. On that error, useemulate. Ifemulateis absent, skip the resize and tell the user. - When a cookie consent popup appears, select only necessary or essential cookies by default, including through its settings when needed. If no such option is available, accept all cookies and continue.
- Use
filePathfor screenshots, snapshots, traces, recordings, response bodies, and large script results. Write only to a task-authorized absolute path, such as the host's scratch directory or a git-ignored.ai/directory under the current repository. - Within one MCP server, page-scoped calls on different pages can run in parallel. Calls on the same page run in order.
Exclusive tools, such as
list_pages,new_page,select_page,close_page,resize_page, andevaluate_script, wait for running calls and block later calls. Separate agent servers still share browser state. Preserve causal order and page ownership across concurrent work.
Website Sign-In with 1Password
When the requested task needs website authentication, try the existing 1Password extension before treating login as a human gate. Task authorization covers signing in to the intended account with its saved login. Follow explicit user restrictions. Do not ask for separate permission for this prerequisite.
- Open the site's sign-in flow. Verify the destination origin, including any expected identity provider, before using a saved login. Never override a domain-mismatch or browser security warning.
- Bring the task page to the front with
select_pageandbringToFront: true. 1Password shows its inline menu and passkey prompt only on the foreground tab. Pages in anisolatedContextrun without extensions, so never sign in through one. Then check for a 1Password sign-in prompt or field suggestion. If absent, open 1Password from Chromium's toolbar or Extensions menu. Confirm the extension is signed in and unlocked. Installation alone does not establish readiness. - Use page tools for exposed page controls. 1Password menus and prompts are not in the page's DOM or accessibility
tree. Use host computer-use/CUA for the toolbar, extension popup, or suggestions that DevTools cannot reach. Claude
Code computer-use grants browsers screenshot-only access, so it cannot click them. Try
click_atat the control's page coordinates. If the 1Password control does not respond, treat the step as a human gate. Finish outstanding browser calls before switching controllers. Keep the same profile and task tab. An absent DevTools control does not prove that 1Password is unavailable. - Select the saved login that matches the site and intended account. Use task context and visible account labels to distinguish multiple matches. If the intended account remains ambiguous, ask the user to choose before filling.
- Activate the matching 1Password sign-in or autofill action. The extension can submit automatically, so inspect the result before clicking the site's sign-in button. For a multi-step form, continue with the same account and verify each destination before filling. Use an existing saved passkey or saved one-time code when 1Password offers it.
- Verify success from a non-secret page signal and the expected account identity. Resume the requested task. After returning from native controls, identify the task page and refresh its state before further MCP actions.
Keep credentials inside the normal extension-to-site flow. Do not reveal or copy passwords, read clipboard secrets, or extract credentials from page fields, extension storage, network traffic, or processes. Avoid captures of filled secret fields. Check field presence or completion without returning their values.
If the extension is missing, signed out, or locked, use Human Gates for the required user action. Do the same when no matching login exists, credentials are rejected, or the required native controls are unavailable. Ask the user to unlock or sign in directly, never to send a password, Secret Key, or verification code in chat. After an unlock, retry this workflow before waiting for a website login. Do not install the extension, change its security settings, create accounts, or save or update credentials as a login workaround.
For current UI details, consult 1Password's browser guide, password sign-in guide, and passkey guide.
Human Gates
A human gate requires user action that the authorized sign-in workflow cannot complete. Examples include a 1Password unlock, captcha, biometric or security-key touch, phone verification, or external approval. Treat login and 2FA as human gates only after checking Website Sign-In with 1Password. New consent or permission grants still require their own task authority. Ending the turn immediately at a human gate is a premature stop.
- Stop all writes on the gated page. Never try to bypass the gate.
- Tell the user the exact page and the action the gate requires.
- Allow ten minutes in total unless the user states another response window. For an MCP page gate, use sequential
wait_forcalls on the gatedpageId, with eachtimeoutat most 10000. Each timed-out call returns a short error, and the successful call returns the snapshot you need next. Match text that appears only after the gate clears. Examples are the post-login heading or the next form label. Setvisible: truewhen the text can exist hidden before the gate clears. If no distinctive text exists, use snapshots separated by short, interruptible host waits. For a native prompt, use fresh native UI observations with those waits. Do not queue another browser call behind an outstandingwait_for. Canceling a host wait does not prove that its MCP call stopped. - After a user reply, inspect the relevant page or native prompt before waiting again. A cleared gate can leave the form awaiting another action. When the gate clears, resume from the same page state. Re-verify the form fields first, without reading secret values, because sites clear them.
- End the turn only after the total response window expires. Then report the exact step the user must complete and the step that resumes the task.
Audits and Profiling
Use these workflows only when the tools are exposed in the current session.
- For Lighthouse audits, choose
mode: "snapshot"to analyze current page state.mode: "navigation"reloads the page. Lighthouse excludes performance audits. Use performance traces for performance questions. - Navigate before
performance_start_trace. Setreload: falseto profile an interaction without reloading. Whenreload: true, setignoreCache: trueto measure a cold load. WhenautoStop: false, stop the trace withperformance_stop_traceafter the measured interaction, including during cleanup after a failed task. Stop only traces this task started. - For heap analysis, capture with
take_heapsnapshot, then start withget_heapsnapshot_summary. Use targeted, paginated queries for objects or retainers. Usecompare_heapsnapshotsfor growth between two snapshots andanalyze_heapsnapshot_contextsfor closures that retain dead captured values. Callclose_heapsnapshotfor each snapshot this task loaded to release server memory, including during cleanup after a failed task. - To trace values without pausing or editing code, use
set_logpoints, then read the output withlist_console_messages. Each call replaces the complete logpoint set for that page. Logpoints persist across reloads and navigations. Before completion, clear logpoints this task set on a page that stays open with an emptylogpointsarray. - Each server permits one active screencast. Record whether this task started it, then call
screencast_stopduring cleanup. Never stop another task's recording to make room.
Authority and Privacy
- Read-only inspection of task-relevant authenticated state is allowed when the task calls for it. Website sign-in follows the authorization above. Other form submissions, account changes, extension installation, purchases, and external mutations require the same authority they would require outside the browser.
- Network-header redaction is an intentional server boundary. Do not bypass it or seek credentials through page or process introspection.
Troubleshooting
-
If a page-scoped call returns
No page found, or a response notes that the browser was restarted or reconnected, the page ID is stale. Take IDs from the latest page-listing response. Do not infer ownership from that list or close unidentified pages. If you cannot identify an owned page reliably, report cleanup as unverified. -
On attachment or transport failure, distinguish the browser endpoint from the MCP process. First, check the debugging endpoint at
http://127.0.0.1:${PRB_AGENT_CHROMIUM_PORT:-9222}/json/version.scripts/ensure-chromium.shperforms this check. Then inspect the newest per-process log under$XDG_CACHE_HOME/chrome-devtools-mcp/logs/or, when unset,~/.cache/chrome-devtools-mcp/logs/. -
A responsive endpoint proves the browser process is alive, not that renderers can start. If
new_pagetimes out and tabs show a crashed icon orUntitled, stop repeated creation attempts and check browser health separately from MCP transport health. A failed creation can leave a tab without returning apageId. Do not infer ownership from a later page list or close unidentified tabs. -
After a macOS Homebrew Chromium upgrade, compare the endpoint's
Browserversion withplutil -extract CFBundleShortVersionString raw /Applications/Chromium.app/Contents/Info.plist. Confirm the running process uses that app bundle and inspect its start time and versioned framework/helper paths. Homebrew can replace the bundle while the old process keeps running. This can remove helpers it needs for new renderers. Existing pages and/json/versioncan still work. A version mismatch alone is a clue, not proof of the failure. -
Report the failed layer and evidence. Do not change client configuration or wrapper flags without authorization for that configuration work. Do not automatically restart the shared browser during ordinary browsing or from the wrapper. A launch of a closed browser with
scripts/ensure-chromium.shis not a restart.An explicit request to repair the browser authorizes a graceful restart using the same profile and debugging port. Record those arguments first. Preserve the session.
chrome://restartrequests a session-restoring restart. If the old process exits but cannot relaunch after an upgrade, confirm it has exited, then reopen the installed executable with the recorded profile/port arguments and--restore-last-session, never a fallback profile. Respect any unsaved-work prompt.Recheck the live version. Call
list_pagesfor fresh IDs. Verify that pre-existing pages were restored. Test creation and navigation on an owned page before closing it. -
When a requested capability is missing, confirm the current tool inventory and wrapper configuration. Use native controls for the browser UI cases described above, including an unsupported
chrome://extensionsURL. Otherwise, report the boundary. Do not weaken the configured privacy or concurrency defaults.
Completion requires fresh tool evidence for the requested outcome and confirmation that task-created pages were either closed or intentionally left open.
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/paulrberg/agent-skills/chromium-browser">View chromium-browser on skillZs</a>