Screenshot ValidationSAFE
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-12Install
Commands as the repository documents them. They are shown, not run.
uv run python scripts/check_screenshots.py .agents/evidence/pr/
uv run python scripts/check_screenshots.py .agents/recordings/
uv run python scripts/check_screenshots.py path/to/specific-image.png
uv run python scripts/verify_screenshots.py .traces/trace_*.html
uv run python scripts/check_screenshots.py .agents/evidence/pr/
uv run python scripts/verify_screenshots.py .traces/trace_*.html
What 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: screenshot-validation description: Validate screenshot and viewer HTML quality for PR evidence. Run this after adding or modifying images under .agents/evidence/pr/ or .agents/recordings/, or after generating a new viewer HTML file. Combines image quality checks (resolution, blankness, file size) with Playwright-based viewer rendering verification. user_invocable: true --- # Screenshot Validation Validate that evidence images and viewer HTML files meet quality standards before committing. This catches issues that would otherwise fail CI or produce misleading PR evidence. ## Image quality check Checks PNG/JPG/GIF/WEBP files for: - **Minimum dimensions**: 400x400 pixels (hard fail) - **Desktop viewport width**: >= 1280px (warning if narrower) - **File size**: <= 5MB (warning if larger) - **Blankness detection** (PNG only): fails if > 90% of pixels are white/transparent ### Run on specific files or directories ```bash uv run python scripts/check_screenshots.py .agents/evidence/pr/ uv run python scripts/check_screenshots.py .agents/recordings/ uv run python scripts/check_screenshots.py path/to/specific-image.png ``` ### Run on git-staged images ```bash scripts/check_screenshots.sh ``` This shell wrapper automatically finds staged PNG/JPG files and runs the quality check on them — useful as a pre-commit sanity check. ## Viewer HTML rendering verification Uses Playwright (headless Chromium) to verify that generated viewer HTML files actually render correctly — not just raw JSON or Python errors. Checks: - No JavaScript errors on page load - Normal traces render a sidebar with entries and a detail panel - Empty embedded traces render the explicit "No API calls captured" state - Body text doesn't contain raw JSON dumps or Python tracebacks ### Run ```bash uv run python scripts/verify_screenshots.py .traces/trace_*.html ``` Requires Playwright to be installed (`uv pip install playwright && playwright install chromium`). ## Typical workflow After generating new evidence for a PR: ```bash # 1. Check image quality uv run python scripts/check_screenshots.py .agents/evidence/pr/ # 2. If you generated new viewer HTML, verify it renders uv run python scripts/verify_screenshots.py .traces/trace_*.html # 3. If all passes, stage and commit git add .agents/evidence/pr/ ``` ## Fixing common failures | Failure | Fix | |---------|-----| | `very small image (WxH; minimum is 400x400)` | Retake screenshot at a larger viewport or higher resolution | | `narrow desktop viewport (Wpx < 1280px)` | Resize browser window to >= 1280px wide before capturing | | `mostly blank/white image` | Ensure the screenshot captures actual content, not an empty page | | `No sidebar — viewer not rendered` | Viewer HTML is broken; regenerate from trace JSONL | | `JS errors` | Check viewer.html for syntax errors in embedded data |
Trust 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__screenshot-validation.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 Screenshot Validation 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 Screenshot Validation 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 Screenshot Validation 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.