html-to-pdf

html-to-pdf is a skill for Claude Code from atman-33/workhub. It costs 83 tokens per session (1,546 once invoked), scanned A, original, MIT.

A tool that converts an HTML file into a PDF using headless Chromium, a browser engine that runs without a visible window. It supports print-style documents and slide decks with page layout, margins, bookmarks, and page numbers where provided by the input.

In plain words
What is it for?
Use it to turn reports, one-page documents, dashboards, or HTML presentations into PDF files.
Why use it?
It lets browser-rendered HTML be exported for printing or sharing while preserving browser layout features such as CSS, web fonts, SVG, and JavaScript.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the visuals plugin — 4 skills shipped together

Good fit Use it to turn reports, one-page documents, dashboards, or HTML presentations into PDF files.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add atman-33/workhub
Claude Code
/plugin install visuals

Made for: Claude Code.

Or install visuals, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for html-to-pdf

README.md
[![agentmods](https://agentmods.dev/badge/skills/atman-33/workhub/html-to-pdf/github.svg)](https://agentmods.dev/skills/atman-33/workhub/html-to-pdf)
Your own site
<a href="https://agentmods.dev/skills/atman-33/workhub/html-to-pdf"><img src="https://agentmods.dev/badge/skills/atman-33/workhub/html-to-pdf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for html-to-pdf

Your own site · 80×15
<a href="https://agentmods.dev/skills/atman-33/workhub/html-to-pdf"><img src="https://agentmods.dev/badge/skills/atman-33/workhub/html-to-pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,546 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00083 $0.01546
Opus 5 $0.00042 $0.00773
Sonnet 5 $0.00017 $0.00309
Haiku 4.5 $0.00008 $0.00155

Measured 3d ago against content hash 524aacd7b237, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

html-to-pdf scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/html-to-pdf.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/visuals/skills/html-to-pdf/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

HTML to PDF

Chromium renders the file exactly as a browser would — @page, flexbox, grid, webfonts, SVG, @media print, and JavaScript all work — and writes a PDF.

Source: the option surface and troubleshooting come from html-to-pdf-skill; the deck capture from frontend-slides. See the plugin's NOTICE.md.

Pick the mode first

This is the only decision that matters, and getting it wrong produces a PDF that looks plausible in the file listing and is wrong when opened.

Input Mode
Report, one-pager, explainer, dashboard — anything that scrolls --mode page (default)
Slide deck whose slides carry class="slide" --mode slides

A deck's print stylesheet un-hides every slide and page-breaks between them, so --mode page does emit one page per slide — at paper size, in portrait, with a 1920x1080 composition squeezed into it, and with every slide but the one that was active rendered blank, because entrance animations key off a class the deck only sets on the current slide. Measured on a four-slide deck: A4 portrait pages, three of them empty.

--mode slides shows each slide in turn at stage resolution, pins the entrance animations to their finished state, captures each one and assembles the captures into a 16:9 PDF.

If the file's mode is not obvious, grep it: class="slide" on repeated elements means a deck.

Run it

node "${CLAUDE_PLUGIN_ROOT}/skills/html-to-pdf/scripts/html-to-pdf.mjs" report.html

Output defaults to the input path with a .pdf extension. Pass a second path to choose the output, or several .html inputs to convert them in one run.

First run installs Playwright into ~/.workhub/visuals-playwright, which downloads Chromium and takes about a minute. Nothing is installed into the project. Tell the user before starting so the pause is expected. If the automatic install fails, fall back to:

npm install -g playwright
npx playwright install chromium

Read the full file on GitHub · 146 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 146 lines · 83 tokens per session scan A 524aacd7b237

Subscribe to this mod's changes

html-to-pdf is a skill published in the GitHub repository atman-33/workhub (2 stars, last pushed 3d ago), licensed MIT. It adds 83 tokens to every session and 1,546 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

researcher

Use when asked to create research documents, generate PDFs, make one-pagers, or create cheatsheets. Triggers: "research document", "generate PDF", "one-pager", "cheatsheet", "distinctive design". Provides HTML/Markdown/PDF with Terminal, Editorial, Corporate, Industrial, Fresh aesthetic presets.

jontsai/claude-plugins · 68 tokens

gemini-file-analysis

Analyze files (PDFs, images, audio, video, large source files) via Gemini's multi-modal file analysis. Use when a file is too large for Claude's context or when the file is a non-text format requiring visual/audio understanding.

azmym/gemini-plugin · 49 tokens

pdf-processor

A workflow for working with PDF files, a document format that preserves page layout across devices.

lfyxhappy/lfcode · 82 tokens

export-pdf

Convert a markdown file to PDF using mdpdf. Use when exporting proposals, SOPs, or any markdown document to PDF.

martineserios/thebrana · 29 tokens

learn

Ingests an external data source into the Second Brain. Fetches content from Confluence, Google Docs, GitHub repositories, remote URLs, or any local file format supported by docling (DOCX, PPTX, XLSX, PDF, HTML, EPUB, images, Markdown, CSV, and more), converts non-markdown formats to markdown via docling, runs the…

iurykrieger/claude-bedrock · 169 tokens

paddleocr-doc-parsing

PaddleOCR document parsing guidance for PDFs and images hosted on Baidu AI Studio. Use when the user wants to extract text or structured markdown from scans, screenshots, photos, tables, or PDFs and needs help choosing PaddleOCR options such as fileType, orientation correction, unwarping, layout detection, chart…

openmaster-ai/clawmaster · 0 tokens