html-to-pdf
Skill1 starsChanged 3 months agoMITView on GitHub
Use when converting one or more public website URLs into high-fidelity PDFs from browser-rendered screenshots, with cookie-consent handling, URL/timestamp provenance footers, and a configurable output folder.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- jsath/claude-skillstheir own version, first seen Oct 13, 2026
- t0ddharris/compound-marketingtheir own version, first seen Oct 8, 2026
- yugasun/skillstheir own version, first seen Jun 24, 2026
- yqdaddy/html-to-pdf-skilltheir own version, first seen Jun 23, 2026
- genecheung/claude-skillstheir own version, first seen Jun 9, 2026
- fulgur-rs/agent-skillstheir own version, first seen Apr 23, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- atypica-ai/marketing-skills★ 44same name
- jsath/claude-skills★ 14same name
- yugasun/skills★ 3same name
- jamesxjz/html-to-pdf-agent-skill★ 1same name
- t0ddharris/compound-marketing★ 1same name
- arbones/claude-skills★ 0same name
- callingcard1973/claude-skills★ 0same name
- fulgur-rs/agent-skills★ 0same name
- genecheung/claude-skills★ 0same name
- yqdaddy/html-to-pdf-skill★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 8 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use the browser-rendered screenshot workflow rather than page.pdf() or a browser print dialog when visual fidelity is the priority.
- Distinctive: line 12
Run the renderer from the skill directory with one URL or a list of URLs and choose the output folder:
- Distinctive: line 36
Wait for DOM content, fonts, network activity, lazy-loaded content, and images to settle.
- Distinctive: line 37
Search every frame for common cookie-consent controls.
- Distinctive: line 40
Remove advertising iframes, ad slots, publicity overlays, and their reserved blocks without removing article content.
- Distinctive: line 42
Add a footer to each captured page containing the source URL and the local access timestamp.
- Distinctive: line 47
Keep the browser viewport and locale explicit for reproducible output.
- Distinctive: line 48
Do not remove the provenance footer from public-source captures.
- Distinctive: line 49
Do not preserve advertisements or ad placeholders in the generated PDF.
- Very specific: line 50
Treat a Leia mais control belonging to the article body as a content control that should be expanded when possible.
- Very specific: line 51
If a consent banner remains, add its selector to accept_consent in ~/.config/opencode/skills/html-to-pdf/render_with_provenance.py and …
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
HTML to PDF
Use the browser-rendered screenshot workflow rather than page.pdf() or a browser print dialog when visual fidelity is the priority. This preserves the page's loaded fonts, responsive layout, images, colors, and fixed-position elements as seen in Chromium.
Command
Run the renderer from the skill directory with one URL or a list of URLs and choose the output folder:
python3 "$SKILL_DIR/render_with_provenance.py" \
--output-folder html-to-pdf \
https://example.com/page-a \
https://example.com/page-bFor pages that require an existing Chrome login, use a temporary copy of the saved Chrome user-data directory. Do not launch against a profile that is currently open in Chrome:
python3 "$SKILL_DIR/render_with_provenance.py" \
--chrome-profile /path/to/copied-chrome-profile \
--profile-directory Default \
--output-folder html-to-pdf \
https://example.com/private-pageThe output filename is derived from each URL path. If no output folder is supplied, PDFs are written to html-to-pdf/.
Workflow
- Launch Chromium through Playwright with a fixed desktop viewport and a high device scale factor.
- Wait for DOM content, fonts, network activity, lazy-loaded content, and images to settle.
- Search every frame for common cookie-consent controls. Accept the broadest consent option before capturing the page.
- Expand visible
Leia maiscontrols before capture. - Dismiss blocking sign-in, cookie, and modal overlays using their visible close or dismiss controls.
- Remove advertising iframes, ad slots, publicity overlays, and their reserved blocks without removing article content.
- Capture one viewport at a time while scrolling through the full document.
- Add a footer to each captured page containing the source URL and the local access timestamp.
- Combine the images into a PDF and inspect page count, dimensions, and readability.
Notes
- Keep the browser viewport and locale explicit for reproducible output.
- Do not remove the provenance footer from public-source captures.
- Do not preserve advertisements or ad placeholders in the generated PDF.
- Treat a
Leia maiscontrol belonging to the article body as a content control that should be expanded when possible. Do not open recommendation widgets such asVeja mais notícias. - If a consent banner remains, add its selector to
accept_consentin~/.config/opencode/skills/html-to-pdf/render_with_provenance.pyand rerun. - A screenshot-based PDF is intentionally image-based. Use browser print/PDF only when selectable text is more important than pixel fidelity.
- Capture only pages the user is authorized to access. Do not copy cookies, credentials, or private browser profiles into the repository or output folder.
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.

