screenshot-validation

Featured

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.

Code & Development 3,113 stars 267 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 Playwr...

Details

Author
liaohch3
Repository
liaohch3/claude-tap
Created
6 months ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category