Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

chrome-devtools

БесплатноЗапускает вложенные скриптыНе проверен

Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance…

CongDon1207от CongDon1207★ 18 звёзд на GitHub

Об этом скилле

Chrome DevTools Agent Skill

Browser automation via Puppeteer scripts with persistent sessions. All scripts output JSON.

Skill Location

Skills can exist in project-scope or user-scope. Priority: project-scope > user-scope.

# Detect skill location
SKILL_DIR=""
if [ -d ".codex/skills/chrome-devtools/scripts" ]; then
  SKILL_DIR=".codex/skills/chrome-devtools/scripts"
elif [ -d "$HOME/.codex/skills/chrome-devtools/scripts" ]; then
  SKILL_DIR="$HOME/.codex/skills/chrome-devtools/scripts"
fi
cd "$SKILL_DIR"

Choosing Your Approach

Scenario Approach
Source-available sites Read source code first, write selectors directly
Unknown layouts Use aria-snapshot.js for semantic discovery
Visual inspection Take screenshots to verify rendering
Debug issues Collect console logs, analyze with session storage
Accessibility audit Use ARIA snapshot for semantic structure analysis

Automation Browsing Running Mode

  • Detect current OS and launch browser as headless only when running on Linux, WSL, or CI environments.
  • For macOS/Windows, browser always runs in headed mode for better debugging.
  • Run multiple scripts/sessions in parallel to simulate real user interactions.
  • Run multiple scripts/sessions in parallel to simulate different device types (mobile, tablet, desktop).
  • Skills can exist in project-scope or user-scope. Priority: project-scope > user-scope.

ARIA Snapshot (Element Discovery)

When page structure is unknown, use aria-snapshot.js to get a YAML-formatted accessibility tree with semantic roles, accessible names, states, and stable element references.

Get ARIA Snapshot

# Generate ARIA snapshot and output to stdout
node aria-snapshot.js --url https://example.com

# Save to file in snapshots directory
node aria-snapshot.js --url https://example.com --output ./.codex/chrome-devtools/snapshots/page.yaml

Example YAML Output

- banner:
  - link "Hacker News" [ref=e1]
    /url: https://news.ycombinator.com
  - navigation:
    - link "new" [ref=e2]
    - link "past" [ref=e3]
    - link "comments" [ref=e4]
- main:
  - list:
    - listitem:
      - link "Show HN: My new project" [ref=e8]
      - text: "128 points by user 3 hours ago"
- contentinfo:
  - textbox [ref=e10]
    /placeholder: "Search"

Interpreting ARIA Notation

Notation Meaning
[ref=eN] Stable identifier for interactive elements
[checked] Checkbox/radio is selected
[disabled] Element is inactive
[expanded] Accordion/dropdown is open
[level=N] Heading hierarchy (1-6)
/url: Link destination
/placeholder: Input placeholder text
/value: Current input value

Interact by Ref

Skills can exist in project-scope or user-scope. Priority: project-scope > user-scope. Use select-ref.js to interact with elements by their ref:

# Click element with ref e5
node select-ref.js --ref e5 --action click

# Fill input with ref e10
node select-ref.js --ref e10 --action fill --value "search query"

# Get text content
node select-ref.js --ref e8 --action text

# Screenshot specific element
node select-ref.js --ref e1 --action screenshot --output ./logo.png

# Focus element
node select-ref.js --ref e10 --action focus

# Hover over element
node select-ref.js --ref e5 --action hover

Store Snapshots

Skills can exist in project-scope or user-scope. Priority: project-scope > user-scope. Store snapshots for analysis in <project>/.codex/chrome-devtools/snapshots/:

# Create snapshots directory
mkdir -p .codex/chrome-devtools/snapshots

# Capture and store with timestamp
SESSION="$(date +%Y%m%d-%H%M%S)"
node aria-snapshot.js --url https://example.com --output .codex/chrome-devtools/snapshots/$SESSION.yaml

Workflow: Unknown Page Structure

  1. Get snapshot to discover elements:

    node aria-snapshot.js --url https://example.com
    
  2. Identify target from YAML output (e.g., [ref=e5] for a button)

  3. Interact by ref:

    node select-ref.js --ref e5 --action click
    
  4. Verify result with screenshot or new snapshot:

    node screenshot.js --output ./result.png
    

Local HTML Files

Skills can exist in project-scope or user-scope. Priority: project-scope > user-scope. IMPORTANT: Never browse local HTML files via file:// protocol. Always serve via local server: Why: file:// protocol blocks many browser features (CORS, ES modules, fetch API, service workers). Local server ensures proper HTTP behavior.

# Option 1: npx serve (recommended)
npx serve ./dist -p 3000 &
node navigate.js --url http://localhost:3000

# Option 2: Python http.server
python -m http.server 3000 --directory ./dist &
node navigate.js --url http://localhost:3000

Note: when port 3000 is busy, find an available por

Полный SKILL.md на GitHub

Установить chrome-devtools в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/cdp-domains.mdreferences/performance-guide.mdreferences/puppeteer-reference.mdscripts/.gitignorescripts/README.mdscripts/aria-snapshot.jsscripts/click.jsscripts/console.jsscripts/evaluate.jsscripts/fill.jsscripts/inject-auth.jsscripts/install-deps.shscripts/install.shscripts/lib/browser.jsscripts/lib/selector.jsscripts/navigate.jsscripts/network.jsscripts/package.jsonscripts/performance.jsscripts/screenshot.jsscripts/select-ref.jsscripts/snapshot.js

FAQ

Что делает скилл chrome-devtools?

Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.

Как установить скилл chrome-devtools?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл chrome-devtools запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить chrome-devtools с