html-to-pdf

html-to-pdf is a skill for Claude Code, Codex from yonggao/claude-plugins. It costs 58 tokens per session (1,614 once invoked), scanned A, original, MIT.

A conversion tool for turning HTML files or web pages into PDF documents or PNG images, including printable pages and long, unbroken images.

In plain words
What is it for?
It helps export HTML reports, create PDFs, capture page images, produce long-form images, and preserve backgrounds and page layouts.
Why use it?
It removes the need to reproduce a web layout manually when a report or page must be shared, printed, archived, or presented.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps export HTML reports, create PDFs, capture page images, produce long-form images, and preserve backgrounds and page layouts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yonggao/claude-plugins/html-to-pdf
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yonggao/claude-plugins --skill html-to-pdf
Clone the repo
git clone --depth 1 https://github.com/yonggao/claude-plugins

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin html-to-pdf/plugin install html-to-pdf after adding the marketplace above.

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/yonggao/claude-plugins/html-to-pdf/github.svg)](https://agentmods.dev/skills/yonggao/claude-plugins/html-to-pdf)
Your own site
<a href="https://agentmods.dev/skills/yonggao/claude-plugins/html-to-pdf"><img src="https://agentmods.dev/badge/skills/yonggao/claude-plugins/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/yonggao/claude-plugins/html-to-pdf"><img src="https://agentmods.dev/badge/skills/yonggao/claude-plugins/html-to-pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,614 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.00058 $0.01614
Opus 5 $0.00029 $0.00807
Sonnet 5 $0.00012 $0.00323
Haiku 4.5 $0.00006 $0.00161

Measured 8d ago against content hash 2776f5b726b2, 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 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (html_to_long_image.py), 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.

skills/html-to-pdf/SKILL.md · 253 lines

How it starts

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

HTML to PDF/PNG Converter Skill

This skill helps you convert HTML files to PDF or PNG format with various options for output quality and page layout.

When to Use This Skill

Use this skill when the user wants to:

  • Convert HTML files to PDF
  • Generate PNG screenshots from HTML
  • Create printable documents from web pages
  • Export HTML reports as PDFs
  • Generate long-form images without page breaks
  • Create presentation-ready PDFs from HTML

Available Conversion Methods

Method 1: Multi-Page PDF (Standard A4)

Best for: Printing, archiving, traditional documents

Command:

python html_to_pdf_final.py input.html output.pdf

Features:

  • Standard A4 page format
  • Zero margins for seamless appearance
  • Background colors and gradients preserved
  • Multiple pages with page breaks
  • Optimized file size (~5-6 MB for typical reports)

Method 2: Single-Page Long Image PDF

Best for: Online viewing, presentations, no page breaks

Command:

python html_to_long_image.py input.html

Features:

  • Generates a full-page PNG screenshot first
  • Converts PNG to single-page PDF
  • NO page breaks - entire content on one page
  • Perfect for presentations and online viewing
  • Smaller file size (~1-2 MB)
  • Two output files: .png and .pdf

Method 3: Advanced Multi-Method Converter

Best for: Fallback options, compatibility

Command:

python html_to_pdf_converter.py input.html output.pdf

Features:

  • Tries WeasyPrint first (best CSS support)
  • Falls back to Playwright if needed
  • Automatic dependency installation
  • Handles complex CSS and gradients

Required Dependencies

The skill requires Playwright and Pillow. The scripts auto-install dependencies if missing:

pip install playwright pillow pypdf
playwright install chromium

Step-by-Step Instructions

For Standard Multi-Page PDF:

  1. Verify the HTML file exists:

    ls -la *.html
    
  2. Run the converter:

    python html_to_pdf_final.py your_file.html
    

Read the full file on GitHub · 253 lines

Files

What ships with it

5 files 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. 8d ago First seen · 253 lines · 58 tokens per session scan A 2776f5b726b2

Subscribe to this mod's changes

html-to-pdf is a skill published in the GitHub repository yonggao/claude-plugins (2 stars, last pushed 8mo ago), licensed MIT. It adds 58 tokens to every session and 1,614 once invoked, about $0.0003 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-08-31.

Related

Other skills, from other repositories