playwright-trace
БесплатноБез исполняемых скриптовНе проверенInspect Playwright trace files from the command line — list actions, view requests, console, errors, snapshots and screenshots.
от PracticalSwan★ 25 звёзд на GitHubОб этом скилле
Playwright Trace CLI
Inspect .zip trace files produced by Playwright tests without opening a
browser. This is a file-analysis workflow, distinct from the live-browser
playwright-cli tracing-start/tracing-stop commands.
Prerequisites and entrypoint
Trace-file commands are provided by the project's playwright package, not by
the global @playwright/cli binary. Confirm the project dependency first:
npm ls --depth=0 playwright @playwright/test
Then prefer the local executable without an implicit network fetch:
npx --no-install playwright trace open test-results/my-test/trace.zip
If the project does not provide playwright, ask for approval before adding
@playwright/test or playwright; do not make a global test-runner install a
side effect of loading this skill. The global CLI can still record a live trace
with playwright-cli tracing-start and playwright-cli tracing-stop, but it
does not expose the playwright trace file-inspection command.
Workflow
- Start with
trace open <trace.zip>to extract the trace and see its metadata. - Use
trace actionsto see all actions with their action IDs. - Use
trace action <action-id>to drill into a specific action — see parameters, logs, source location, and available snapshots. - Use
trace requests,trace console, ortrace errorsfor cross-cutting views. - Use
trace snapshot <action-id>to get the DOM snapshot, or run a browser command against it. - Use
trace closeto remove the extracted trace data when done.
All commands after open operate on the currently opened trace — no need to pass the trace file again. Opening a new trace replaces the previous one.
Commands
Open a trace
# Extract trace and show metadata: browser, viewport, duration, action/error counts
npx --no-install playwright trace open <trace.zip>
Close a trace
# Remove extracted trace data
npx --no-install playwright trace close
Actions
# List all actions as a tree with action IDs and timing
npx --no-install playwright trace actions
# Filter by action title (regex, case-insensitive)
npx --no-install playwright trace actions --grep "click"
# Only failed actions
npx --no-install playwright trace actions --errors-only
Action details
# Show full details for one action: params, result, logs, source, snapshots
npx --no-install playwright trace action <action-id>
The action command displays available snapshot phases (before, action, after) and the exact command to extract them.
Requests
# All network requests: start time (on the `trace actions` clock), method, status, URL, duration, size
npx --no-install playwright trace requests
# Filter by URL pattern
npx --no-install playwright trace requests --grep "api"
# Filter by HTTP method
npx --no-install playwright trace requests --method POST
# Only failed requests (status >= 400)
npx --no-install playwright trace requests --failed
Request details
# Show full details for one request: headers, body, security
npx --no-install playwright trace request <request-id>
Console
# All console messages and stdout/stderr
npx --no-install playwright trace console
# Only errors
npx --no-install playwright trace console --errors-only
# Only browser console (no stdout/stderr)
npx --no-install playwright trace console --browser
# Only stdout/stderr (no browser console)
npx --no-install playwright trace console --stdio
# Filter by message text pattern
npx --no-install playwright trace console --grep "failed to fetch"
Errors
# All errors with stack traces and associated actions
npx --no-install playwright trace errors
Snapshots
The snapshot command loads the DOM snapshot for an action into a headless browser and runs a single browser command against it. Without a browser command, it returns the accessibility snapshot.
# Get the accessibility snapshot (default)
npx --no-install playwright trace snapshot <action-id>
# Use a specific phase
npx --no-install playwright trace snapshot <action-id> --phase before
# Run eval to query the DOM
npx --no-install playwright trace snapshot <action-id> -- eval "document.title"
npx --no-install playwright trace snapshot <action-id> -- eval "document.querySelector('#error').textContent"
# Eval on a specific element ref (from the snapshot)
npx --no-install playwright trace snapshot <action-id> -- eval "el => el.getAttribute('data-testid')" e5
# Take a screenshot of the snapshot
npx --no-install playwright trace snapshot <action-id> -- screenshot
# Redirect output to a file
npx --no-install playwright trace snapshot <action-id> -- eval "document.body.outerHTML" --filename=page.html
npx --no-install playwright trace snapshot <action-id> -- screenshot --filename=screenshot.png
Only three browser commands are useful on a frozen snapshot: snapshot, eval, and screenshot.
Attachments
Установить playwright-trace в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл playwright-trace?
Inspect Playwright trace files from the command line — list actions, view requests, console, errors, snapshots and screenshots.
Как установить скилл playwright-trace?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл playwright-trace запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic