artifact-to-pdf
Skill4 starsChanged 4 months agoMITView on GitHub
Convert a Claude artifact (or any URL / exported .html file) into a SINGLE continuous, pixel-accurate PDF with no page cuts — one long page sized to the whole content. Use when the user wants to export, save, download, or "turn into PDF" an artifact, HTML file, or web page, especially as one long page with no page breaks / no pagination.
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- ryanramtin/claude-skillstheir own version, first seen Sep 7, 2026
- davidgrahamsites/Claude-Skillstheir own version, first seen Jul 19, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- ryanramtin/claude-skills★ 1same name
- davidgrahamsites/Claude-Skills★ 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
4 rules. About 0 are common, 2 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
If the user did not give an input, ask for the .html file path or URL before running.
- Distinctive: line 28
Run the converter (foreground.
- Very specific: line 33
Default output name is <input>.pdf (or artifact.pdf for a URL) in the current directory.
- Distinctive: line 34
Read the tool's stdout — it prints the page size and, if the content exceeded the 200in cap, the scale it applied.
≈ “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
artifact-to-pdf
Turn a Claude artifact (or any URL / exported .html) into one continuous, pixel-accurate PDF — a single long page sized to the whole content, no page cuts. It renders the HTML in headless Chromium (the same engine the artifact viewer uses), so the PDF matches what you see on screen.
When to use
The user asks to export / save / download / "turn into PDF" an artifact, an .html file, or a URL — especially when they want one long page or a PDF without page breaks.
Inputs
- A path to an exported
.htmlfile (best fidelity for a Claude artifact), OR anhttp(s)URL. - Optional output path and render width.
If the user did not give an input, ask for the .html file path or URL before running.
How to run
The converter is a bundled Node script sitting next to this SKILL.md.
- Set
SKILL_DIRto the directory that contains this SKILL.md. - First-run setup only — install dependencies if missing (downloads a bundled Chromium ~120MB the first time; tell the user this is one-time):
[ -d "$SKILL_DIR/node_modules/playwright" ] || ( cd "$SKILL_DIR" && npm install ) - Run the converter (foreground; ~5–20s):
node "$SKILL_DIR/artifact-to-pdf.mjs" "<input-file-or-url>" -o "<output>.pdf" [--width <px>]--widthdefaults to 1200; set it to the artifact's design width if the layout is responsive and reflows.- Default output name is
<input>.pdf(orartifact.pdffor a URL) in the current directory.
- Read the tool's stdout — it prints the page size and, if the content exceeded the 200in cap, the scale it applied. Report that to the user.
- Offer to send the PDF to the user with SendUserFile so they can see it.
Notes / limits
- Emits exactly ONE page sized to the artifact's full height — no page cuts.
- A PDF page caps at 200in (ISO 32000 = 14,400pt ≈ 19,200px) per side. Artifacts taller than that are auto-scaled down to fit one page (nothing is cut); the tool prints the scale used. Absurdly tall content warns it may clip in strict viewers.
- For a Claude artifact, prefer the exported
.html— aclaude.aipage URL also captures the app chrome around the artifact. npm test(inSKILL_DIR) renders a tall sample and asserts single-page output.
Source
Full source, README, and issues: https://github.com/yheshamx/artifact-to-pdf
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.

