Playwright Screen RecordingSAFE
Intercept and inspect Coding Agent API traffic from Claude Code, Codex CLI, Gemini CLI, Cursor CLI, OpenCode, Kimi/Kimi Code, Pi, and Hermes in a local trace viewer.
Overview
Intercept and inspect Coding Agent API traffic from Claude Code, Codex CLI, Gemini CLI, Cursor CLI, OpenCode, Kimi/Kimi Code, Pi, and Hermes in a local trace viewer.
4c2d422a35f5OBSERVED · 2026-10-12What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: playwright-screen-recording
description: Record browser test videos with Playwright for PR review and bug fix verification
user_invocable: false
---
# Playwright Screen Recording for Test Verification
Use Playwright's video recording to capture headless browser operations as .webm videos for PR review or bug fix verification.
## Core Usage
```python
from playwright.sync_api import sync_playwright
import tempfile
from pathlib import Path
video_dir = Path(tempfile.mkdtemp())
with sync_playwright() as pw:
browser = pw.chromium.launch(headless=True)
context = browser.new_context(
viewport={"width": 1400, "height": 900},
record_video_dir=str(video_dir),
record_video_size={"width": 1400, "height": 900},
)
page = context.new_page()
page.goto(f"file:///path/to/test.html")
# ... perform test actions, add pauses for readability ...
page.wait_for_timeout(800) # pause so viewers can see the current state
page.close()
context.close() # video is finalized after context.close()
browser.close()
# Retrieve the recorded video
videos = list(video_dir.glob("*.webm"))
if videos:
videos[0].rename("demo.webm")
```
## Use Cases
- **Bug fix verification**: record before/after comparisons showing button state changes, UI behavior differences
- **PR Review**: attach .webm video so reviewers can visually understand the change
- **Regression test evidence**: record critical interaction paths as visual proof of passing tests
## Recording Tips
### Add pauses between actions
```python
page.click(".some-button")
page.wait_for_timeout(800) # let viewers see the click effect
page.keyboard.press("ArrowRight")
page.wait_for_timeout(600) # let viewers see the navigation result
```
### Combine assertions with terminal logging
```python
state = get_nav_state(page)
print(f"[1] Title: {state['title']}")
print(f" prev disabled: {state['prevDisabled']} (expected: True)")
assert state["prevDisabled"] is True
print(" PASS")
```
Terminal output paired with the recorded video provides dual verification.
### Prefer real data
Use existing real trace data from the project rather than synthetic data for more convincing demos:
```python
# Build test HTML from a real trace file
records = []
with open(".traces/trace_xxx.jsonl") as f:
for line in f:
# Escape </script> to prevent breaking the HTML script block
records.append(line.strip().replace("</script>", '</scr" + "ipt>'))
```
## Notes
- Video format is `.webm` (VP8 codec), supported by most players and browsers
- Each `page` produces a separate video file
- `record_video_size` controls video resolution — keep it consistent with `viewport`
- Recording works in headless mode, no display required
- Video files are typically a few hundred KB, suitable for attaching to PRs or chatTrust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | NA |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (1)
.claude/skills
Gates applied: no_behavioural_pass.
4c2d422a35f5full audit observations/trust-audit/skill/liaohch3__playwright-screen-recording.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-12 | 4c2d422a35f5 | SAFE | B | 89 | first audit |
Questions
What does the Playwright Screen Recording skill do?
Intercept and inspect Coding Agent API traffic from Claude Code, Codex CLI, Gemini CLI, Cursor CLI, OpenCode, Kimi/Kimi Code, Pi, and Hermes in a local trace viewer.
Is Playwright Screen Recording safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Playwright Screen Recording access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (4c2d422a35f5), read on 2026-10-12. The repository is watched, and a new audit runs when it changes — this is the first audit.