html-to-pdf

html-to-pdf is a skill for Claude Code, Codex from atypica-ai/marketing-skills. It costs 126 tokens per session (1,101 once invoked), scanned A, original, MIT.

A skill for converting HTML pages into PDF files with Puppeteer, a tool that controls a headless Chrome browser without showing its window.

In plain words
What is it for?
Useful for exporting HTML reports, webpages, or snapshots as single-page or paginated PDFs.
Why use it?
It provides a repeatable way to preserve the page’s rendered appearance and supports both long single-page reports and printed page layouts.

Skill for Claude CodeCodex

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

Good fit Useful for exporting HTML reports, webpages, or snapshots as single-page or paginated PDFs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/atypica-ai/marketing-skills/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 atypica-ai/marketing-skills --skill html-to-pdf
Clone the repo
git clone --depth 1 https://github.com/atypica-ai/marketing-skills

Made for: Claude Code, Codex.

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/atypica-ai/marketing-skills/html-to-pdf/github.svg)](https://agentmods.dev/skills/atypica-ai/marketing-skills/html-to-pdf)
Your own site
<a href="https://agentmods.dev/skills/atypica-ai/marketing-skills/html-to-pdf"><img src="https://agentmods.dev/badge/skills/atypica-ai/marketing-skills/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/atypica-ai/marketing-skills/html-to-pdf"><img src="https://agentmods.dev/badge/skills/atypica-ai/marketing-skills/html-to-pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,101 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.00126 $0.01101
Opus 5 $0.00063 $0.00550
Sonnet 5 $0.00025 $0.00220
Haiku 4.5 $0.00013 $0.00110

Measured 12d ago against content hash ed711955b324, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/html-to-pdf.js), 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 · 110 lines

How it starts

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

Overview

This skill converts an HTML file to PDF using Puppeteer (headless Chromium), exactly how atypica exports its AI research reports. Two modes are supported:

Mode When to use
Single-page (default) Design/report pages meant to look like one tall poster — no page breaks. Full-width at 1440 px.
Paginated Documents meant to be printed or read page-by-page (A4, Letter, etc.).

Quickstart (3 steps)

# 1. Copy the bundled scripts to a working directory
cp <skill-dir>/scripts/html-to-pdf.js ./
cp <skill-dir>/scripts/package.json ./

# 2. Install the only dependency (downloads Chromium automatically, ~170 MB, one-time)
npm install

# 3. Run
node html-to-pdf.js report.html report.pdf

<skill-dir> is the directory that contains this SKILL.md file.

Note: npm install puppeteer (~170 MB) downloads a pinned Chromium binary. This is the only install step — no system Chrome, no wkhtmltopdf, no separate server needed. If the environment already has Puppeteer installed, skip step 2.


Command reference

node html-to-pdf.js <input.html> <output.pdf> [options]

Options:
  --paginated         A4-paginated mode (respects @media print, page-breaks)
  --format <fmt>      Page format: A4 (default), A3, Letter, Legal
  --width <px>        Viewport width for single-page mode (default: 1440)
  --wait <ms>         Extra milliseconds to wait after page load (for JS-rendered content)
  --header-footer     Add page-number footer in paginated mode

Examples

# Single-page full-height (atypica report style)
node html-to-pdf.js report.html report.pdf

# A4 paginated document
node html-to-pdf.js document.html document.pdf --paginated

# A4 with page numbers
node html-to-pdf.js document.html document.pdf --paginated --header-footer

# Narrower single-page layout
node html-to-pdf.js report.html report.pdf --width 1280

# Wait 2 s for JavaScript-rendered charts
node html-to-pdf.js dashboard.html dashboard.pdf --wait 2000

Read the full file on GitHub · 110 lines

Files

What ships with it

3 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. 12d ago First seen · 110 lines · 126 tokens per session scan A ed711955b324

Subscribe to this mod's changes

html-to-pdf is a skill published in the GitHub repository atypica-ai/marketing-skills (44 stars, last pushed 5mo ago), licensed MIT. It adds 126 tokens to every session and 1,101 once invoked, about $0.0006 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-30.

Related

Other skills, from other repositories