pdf-html

pdf-html is a skill for Claude Code from slogsdon/skills-design. It costs 152 tokens per session (1,280 once invoked), scanned A, original, MIT.

A tool that exports selected design areas from HTML files as single-page PDFs using a browser engine. It preserves each canvas's exact dimensions and removes preview backgrounds and spacing.

In plain words
What is it for?
Use it for PDF versions of audit reports, deliverables, spec sheets, and other document-like HTML artifacts. Use PNG export instead for social graphics and stream overlays.
Why use it?
It avoids turning a design preview page into a cluttered PDF. The result contains the chosen document-style canvas by itself.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is $ node pdf-html.mjs ./design/<brand>/artifacts.

Part of the skills-design plugin — 19 skills shipped together

Good fit Use it for PDF versions of audit reports, deliverables, spec sheets, and other document-like HTML artifacts. Use PNG export instead for social graphics and stream overlays.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/slogsdon/skills-design
agentmods
npx agentmods add skills/slogsdon/skills-design/pdf-html

Made for: Claude Code.

Or install skills-design, the plugin that ships this one along with the rest of its 19 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 pdf-html

README.md
[![agentmods](https://agentmods.dev/badge/skills/slogsdon/skills-design/pdf-html.svg)](https://agentmods.dev/skills/slogsdon/skills-design/pdf-html)
Your own site
<a href="https://agentmods.dev/skills/slogsdon/skills-design/pdf-html"><img src="https://agentmods.dev/badge/skills/slogsdon/skills-design/pdf-html.svg" alt="Measured on agentmods" height="20"></a>
Per session 152 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,280 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.00152 $0.01280
Opus 5 $0.00076 $0.00640
Sonnet 5 $0.00030 $0.00256
Haiku 4.5 $0.00015 $0.00128

Measured 7d ago against content hash 8c6a0bd68bca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

pdf-html 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/pdf-html.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.

skills/pdf-html/SKILL.md · 118 lines

How it starts

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

Skill: pdf-html

Targeted per-canvas PDF export via headless Chromium. Strips preview-backdrop styles (dark page background, padding, gap) before rendering so the PDF contains only the canvas itself.

When to use

  • After any design-* skill that produces a document-style HTML artifact — audit reports, deliverables, spec sheets, long-form cards — and a PDF is the desired leave-behind format.
  • When the user says "export as PDF", "capture as PDF", "PDF version of this", etc.

Skip if:

  • The artifact is a social-media graphic (LinkedIn, Instagram, YouTube thumbnail, Twitter card). Use screenshot-html for those — PDFs don't add value and print media mode may alter the styling.
  • The artifact is a stream overlay or OBS scene pack. Use screenshot-html.

What it targets

Same canvas conventions as screenshot-html:

  • .canvas — primary fixed-size artifact wrapper.
  • [class*="canvas-"] — modifier variants: canvas-front / canvas-back, canvas-audit, canvas-og / canvas-hero, etc.
  • .scene — hash-routed scenes (captured at their hash-navigated state).

Nested matches are deduped — only top-level containers generate PDFs.

If a file has no matches, falls back to a full-page PDF. --full-page forces this for every file.

How to run

node skills/pdf-html/scripts/pdf-html.mjs <dir> [--output <dir>] [--width <px>] [--full-page]

Flags:

  • <dir> (positional, default .): directory to scan recursively for *.html. The screenshots/ and pdfs/ subdirectories and hidden dirs are skipped.
  • --output <dir> (default <dir>/pdfs): where PDFs are written. Flat output — one file per canvas target.
  • --width <px> (default 1920): browser viewport width. Only needs to be ≥ the widest canvas; PDF height is measured from the rendered DOM, not the viewport.
  • --full-page: force full-page PDFs for every file, skipping canvas targeting.

Height is always auto-measured from the canvas's rendered bounding box — no --height flag needed.

Read the full file on GitHub · 118 lines

Files

What ships with it

2 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. 7d ago First seen · 118 lines · 152 tokens per session scan A 8c6a0bd68bca

Subscribe to this mod's changes

pdf-html is a skill published in the GitHub repository slogsdon/skills-design (3 stars, last pushed 24d ago), licensed MIT. It adds 152 tokens to every session and 1,280 once invoked, about $0.0008 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

pdf-design

Designs PDF reports and proposals from HTML with previews and branding. Use to create, export, or securely upload a PDF.

jamditis/claude-skills-journalism · 28 tokens

document-design

Creates print-ready HTML that exports to PDF. Use to make a proposal, report, one-pager, newsletter, slides, or flyer.

jamditis/claude-skills-journalism · 31 tokens

design-export-repair

Fixes broken decks/PDFs exported from Claude's "Design" feature (or similar AI deck generators) — cut-off or clipped text, wrong/substituted fonts, and corrupted .pptx package structure that shows up only once you export to PDF, not while looking at it in the app. Use this skill whenever the user uploads a zip, .pptx…

OneWave-AI/claude-skills · 219 tokens

pdf-image-text-extractor

An OCR tool that reads text from images and PDF documents. OCR means converting text in a picture or scanned document into editable text, while keeping the source structure in the result.

redfox-data/redfox-community · 77 tokens

deck-design-pdf

Create presentation decks as high-fidelity PDF files using web technology (HTML, CSS, Tailwind, Font Awesome). Use when the user wants a polished, pixel-perfect deck with responsive layouts, rich typography, icons, and modern design. For editable PPTX output, use deck-design-ppt instead.

appautomaton/presentation · 65 tokens

Explainer

Generate dense, visual-first HTML explainers in a signature dark aesthetic — diagrams carry the design, prose is captions only. Every section has a custom inline-SVG visualization: pipeline DAGs, archetype grids, hub-and-spoke diagrams, decision trees, risk matrices, gantt timelines, layer cakes, palette swatches…

Angelopvtac/explainer-pack · 209 tokens