playwright-trace

playwright-trace is a skill for Codex from PracticalSwan/agent-skills. It costs 29 tokens per session (1,954 once invoked), scanned A, original, MIT.

A command-line workflow for inspecting Playwright trace files, which are recordings of browser-test actions and results. It can show actions, requests, console output, errors, page snapshots, and screenshots without opening a browser.

In plain words
What is it for?
Use it to open trace archives, list actions, inspect individual actions, review network requests and errors, and examine captured page evidence.
Why use it?
It helps find why a browser test failed by examining its recorded steps and page state after the test has run.

Skill for Codex

Written for Codex: reads $CODEX_HOME. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it to open trace archives, list actions, inspect individual actions, review network requests and errors, and examine captured page evidence.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/playwright-trace
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PracticalSwan/agent-skills --skill playwright-trace
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for playwright-trace

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/playwright-trace/github.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/playwright-trace)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/playwright-trace"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/playwright-trace/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for playwright-trace

Your own site · 80×15
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/playwright-trace"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/playwright-trace.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,954 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.01954
Opus 5.5 $0.00012 $0.00782
Sonnet 5.5 $0.00006 $0.00391
Haiku 4.5 $0.00003 $0.00195

Measured 1mo ago against content hash 03d7e3536b3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

playwright-trace scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

playwright-trace/SKILL.md · 247 lines

How it starts

The opening of the file, as written. The whole thing — 247 lines — stays where its author put it; the contents beside it link to each section on 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

  1. Start with trace open <trace.zip> to extract the trace and see its metadata.
  2. Use trace actions to see all actions with their action IDs.
  3. Use trace action <action-id> to drill into a specific action — see parameters, logs, source location, and available snapshots.
  4. Use trace requests, trace console, or trace errors for cross-cutting views.
  5. Use trace snapshot <action-id> to get the DOM snapshot, or run a browser command against it.
  6. Use trace close to 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

Read the full file on GitHub · 247 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 247 lines · 29 tokens per session scan A 03d7e3536b3c

Subscribe to this mod's changes

playwright-trace is a skill published in the GitHub repository PracticalSwan/agent-skills (21 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 1,954 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-13.