Pages & navigation
يكتب سكربتات شل أو يشغل أوامر لأتمتة المهام في المتصفح.
Use this skill to write shell scripts or run shell commands to automate tasks in the browser or otherwise use Chrome DevTools via CLI.
Install
npx skills add ChromeDevTools/chrome-devtools-mcp --skill chrome-devtools-cliWorks with
claude-code (native), claude (native), codex (native), chatgpt (native), gemini-cli (native), cursor (native), copilot (native), opencode (native), amp (native), roo (native), kiro (native), goose (native), junie (native), trae (native), cline (compatible), continue (compatible), antigravity (compatible), windsurf (compatible), augment (compatible), qwen-code (compatible)
Content
Automate Chrome via chrome-devtools <tool> [args] [flags]. First-time setup: [references/installation.md](references/installation.md).
Workflow
- Execute: Run tools directly; the daemon starts implicitly (skip
start/status/stopunless changing startup flags). Uselist_pagesto find<pageId>. - Inspect: Run
chrome-devtools take_snapshot <pageId>for element<uid>s (uid=1_1 heading "Example" level="1"). - Act: Pass
<pageId>and<uid>to interaction tools. State persists across commands.
- Required args are positional; optional args use
--flag. Run<tool> --helpfor full options. - Output defaults to Markdown; pass
--output-format=jsonfor JSON. - Full filesystem access is on by default; pass
--allowUnrestrictedPaths=falseonstartto restrict to OS temp dir.
Core Commands
# Pages & navigation
chrome-devtools list_pages
chrome-devtools new_page "https://example.com"
chrome-devtools navigate_page 1 --url "https://example.com" # or --type reload|back
chrome-devtools select_page 1
chrome-devtools close_page 1
# Snapshots & input (<uid> from take_snapshot; most accept --includeSnapshot true)
chrome-devtools take_snapshot 1 # --verbose true --filePath s.txt
chrome-devtools click 1 "uid" # --dblClick true
chrome-devtools fill 1 "uid" "text"
chrome-devtools press_key 1 "Enter"
chrome-devtools type_text 1 "hello" --submitKey "Enter"
# Debugging & inspection
chrome-devtools evaluate_script "() => document.title" --pageId 1
chrome-devtools list_console_messages 1 # --types error
chrome-devtools get_console_message 1 1
chrome-devtools list_network_requests 1 # --resourceTypes fetch
chrome-devtools get_network_request 1 --reqid 1
chrome-devtools take_screenshot 1 # --fullPage true --filePath s.png
# Daemon (only for startup flags or --sessionId=<uuid>)
chrome-devtools start --headless=false # also: status | stop
References (Load on Demand)
- [references/debugging-and-network.md](references/debugging-and-network.md): Network mocking, body exports, CSS styles, logpoints, Lighthouse, screencasts, extra input (
hover,drag,handle_dialog,upload_file) and navigation flags. - [references/performance-and-memory.md](references/performance-and-memory.md): Performance traces/insights, heap snapshots, and heap-snapshot memory analysis.
- [references/emulation-extensions-and-pwa.md](references/emulation-extensions-and-pwa.md): Emulation, viewport resize, extensions, PWAs, experimental tools.
- [references/installation.md](references/installation.md): One-time installation and troubleshooting.
Source and license
- Source
- Chrome DevTools MCP
- Original
- ChromeDevTools/chrome-devtools-mcp/skills/chrome-devtools-cli/SKILL.md
- License
- Apache-2.0