Playwright pdf snapshot
Skill baronguyen001/ai-automation-skills/skills/playwright-pdf-snapshot
Render any URL to a headless PDF or PNG snapshot with Playwright and no committed cookies. Use when the user asks to archive a page, capture a dashboard/report, make a PDF snapshot, or save a page screenshot for downstream review.From its SKILL.md
npx -y skills add baronguyen001/ai-automation-skills --skill playwright-pdf-snapshotAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.1 KB, 416 tokens by cl100k_base, as published. Nobody here has run it
Playwright PDF Snapshot
Use this skill when a script needs a browser-rendered artifact from a URL: a PDF report, a full-page PNG, or a dashboard capture. The helper runs Chromium headless through Playwright, accepts optional extra headers from the caller, and does not ship cookies or credentials.
When to invoke
- User says: "save this page as PDF", "capture a PNG snapshot", "archive the dashboard", "render this report URL".
- The page needs browser rendering rather than a raw HTTP download.
When NOT to invoke
- The URL is a static file that can be downloaded directly.
- The page requires a persisted login session; use [[playwright-login-session]] first and keep state files gitignored.
Concrete example
User input:
Render the public report URL to both a PDF and a PNG after the run finishes.
Output:
# Copy assets/snapshot.py into your project, then:
from snapshot import snapshot
paths = snapshot("https://example.com/report", out_dir="artifacts", name="report")
print(paths)
Install Playwright in the target project with pip install playwright and python -m playwright install chromium. Do not commit cookies, storage state, or private headers.
Pattern to apply
- Use headless Chromium and wait for network idle or a specific selector before capturing.
- Save both PDF and PNG only when the downstream workflow needs both.
- Keep auth out of this helper; pass public URLs or combine with a local, gitignored Playwright state file.
- Use stable filenames so artifact upload steps can find them.
- Pair with object storage when snapshots need to survive the local run.
Reference: assets/snapshot.py.
Source
Distilled from production use across the author's automation projects. v1.0.0. See also: [[playwright-login-session]], [[s3-uploader]], [[csv-report-writer]].
→ Build the full runnable bot with Trawlkit.
What ships with it: 1 file
2.6 KB alongside SKILL.md, 1 of them executable
assets/
- snapshot.pyruns2.6 KB
Gives 0 of the 12 instructions most pdf office docs skills give in 416 tokens
Counted across 569 of the 585 authors here whose files we hold, read 2026-09-06
- Ensure every slide fits inside one viewportin 20 of 569, across 11 files
- Check for product marketing context firstin 15 of 569, across 5 files
- Ask for the minimum neededin 15 of 569, across 5 files
- Set the API key environment variablein 15 of 569, across 10 files
- Support keyboard and touch navigationin 14 of 569, across 5 files
- Match the buyer stagein 13 of 569, across 3 files
- Split overflowing content into multiple slidesin 12 of 569, across 3 files
- Set page size explicitly for consistent resultsin 12 of 569, across 5 files
- Convert documents to markdown using pandocin 12 of 569, across 6 files
- Read STYLE_PRESETS.md before generatingin 12 of 569, across 7 files
- Send multipart POST requests to the APIin 12 of 569, across 7 files
- Use smart quotes for new contentin 11 of 569, across 4 files
Said here and by no other author read
- Use headless Chromium for rendering
- Wait for network idle before capturing
- Use stable filenames for artifacts
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.