headless-webapp-screenshots
Skill1 starsChanged 36 days agoMITView on GitHub
Capture clean, deterministic screenshots of a JavaScript web app without installing a browser automation framework. Use when needing product screenshots of an SPA for a README, portfolio, or design review, especially when the app shows onboarding modals, seedable demo data, animations, or needs mobile and desktop viewports. Not for native or mobile apps, video capture, or installing a browser automation framework.
In this repository30 other files it gives its agents.
- anna-app-publishSkill
- campus-jobs-radarSkill
- career-pivot-researchSkill
- cf-pages-deploySkill
- company-risk-checkSkill
- github-repo-launch-polishSkill
- github-repo-repair-auditSkill
- historical-remotion-filmSkill
- interview-debriefSkill
- job-application-screenerSkill
- job-application-trackerSkill
- llm-output-eval-gateSkill
- memory-sync-abcSkill
- offer-decision-frameworkSkill
- online-assessment-solverSkill
- personal-secretary-memorySkill
- personal-tone-writingSkill
- portfolio-github-workflowSkill
- recruiting-source-huntingSkill
- remotion-delivery-qaSkill
- resume-jd-matcherSkill
- resume-jd-tailorSkill
- resume-polish-craftSkill
- session-checkpointSkill
- session-log-archaeologySkill
- single-file-html-toolSkill
- static-site-deploy-verifySkill
- vibecoding-resume-storySkill
- video-portfolio-performanceSkill
- workflow-distillerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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 26
Always open the produced PNG and check it before using it.
- Distinctive: line 33
Keep the harness out of the deployed site and out of the public repo if it contains demo data.
- Distinctive: line 37
Before, a plain capture of a real SPA looks broken:
- Distinctive: line 44
After, the harness boots the app straight into its final state:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Headless Webapp Screenshots
Plain chrome --headless --screenshot fails on real apps: onboarding modals block the view, empty states look broken, and entry animations freeze the capture mid-fade. This skill captures final-state screenshots using only the Chrome/Edge already installed on the machine.
Method
- Build a local harness page next to the app (copy
assets/shot-harness-template.html). It loads the app's real CSS/JS but first runs an inline script that seedslocalStoragewith demo state:onboarded: true, realistic records, logs. Seeding must run before the app's scripts, so the app boots straight into the target state with no modal. - Add a
shot=1query param in the harness that injects CSS killing all animations and transitions. Without this, headless captures freeze fade-ins at partial opacity. - Add view/theme params (
?view=stats&theme=dark) that call the app's own view-switch API after boot, so every screen is reachable without clicking. - Capture with
scripts/capture.ps1(Windows) or the equivalent command:
chrome --headless=new --disable-gpu --hide-scrollbars \
--user-data-dir=<temp dir> --virtual-time-budget=8000 \
--window-size=1440,900 --screenshot=out.png "file:///.../harness.html?shot=1&view=today"--virtual-time-budgetfast-forwards timers and async work before the capture; raise it when the view triggers async flows (e.g. mock API calls) that must finish first.- Mobile shots:
--window-size=390,844 --force-device-scale-factor=2for retina-crisp output. - Always open the produced PNG and check it before using it.
Pitfalls
- Semi-transparent, washed-out captures mean animations were frozen mid-run: the
shot=1style is missing or injected too late. Inject it in<head>before other stylesheets. - An empty or modal-covered capture means the seed did not land: confirm the storage key matches exactly what the app reads, and that the seed script runs before app init.
file://pages share one localStorage origin in Chrome; give each capture run its own--user-data-dirto avoid state leaking between shots.- Keep the harness out of the deployed site and out of the public repo if it contains demo data.
Before / After
Before, a plain capture of a real SPA looks broken:
chrome --headless --screenshot=shot.png --window-size=1440,900 http://localhost:5173
# 结果:新手引导弹窗挡住整个界面,列表是空的,入场动画卡在半透明After, the harness boots the app straight into its final state:
chrome --headless=new --disable-gpu --hide-scrollbars \
--user-data-dir=<temp dir> --virtual-time-budget=8000 \
--window-size=1440,900 --screenshot=stats.png \
"file:///.../harness.html?shot=1&view=stats&theme=dark"
# 结果:演示数据已注入、动画被禁用、直接进入目标视图Same machine, same Chrome, no Puppeteer and no Playwright installed.
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.

