screenshot-validation
Skill3.3k starsChanged 3 months agoMITView on GitHub
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.
- Installs packages
Trending
Quiet since September.thin dataabout the whole repository
Who's talking about liaohch3/claude-tap
- sudosubin/agents.nix“agent-skills.github.liaohch3.claude-tap: init at 0.1.145”GitHub · Sep 29, 2026
- chenhg5/cc-connect“[Bug] I am using both cc-connect and claude-tap, but response is missing in claude-tap”GitHub · Jun 6, 2026
- jianshuo/ccglass“feat: surface API errors, non-2xx responses, and retry loops in the dashboard”GitHub · May 24, 2026
- jianshuo/ccglass“feat: harden & expand request-format rendering (OpenAI Responses/Codex edge cases, Gemini)”GitHub · May 24, 2026
The biggest 4 of 4 mentions linking to the repository that our crawl found. Each line is their own headline.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- codex-e2e-testSkill
- demo-videoSkill
- e2e-testSkill
- js-in-html-testingSkill
- legibility-checkSkill
- playwright-screen-recordingSkill
- pr-preflightSkill
- push-releaseSkill
- real-e2e-testSkill
- translate-i18nSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
No JavaScript errors on page load
- Distinctive: line 55
After generating new evidence for a PR:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
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.pngRun on git-staged images
scripts/check_screenshots.shThis 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
uv run python scripts/verify_screenshots.py .traces/trace_*.htmlRequires Playwright to be installed (uv pip install playwright && playwright install chromium).
Typical workflow
After generating new evidence for a PR:
# 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 |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

