generate-pdf

generate-pdf is a skill for Claude Code, Codex from TrendTweekers/mintpdf. It costs 28 tokens per session (459 once invoked), scanned A, original, MIT.

A skill for turning HTML, Markdown, or a public web page into a styled PDF file. PDF is a fixed-layout document format commonly used for sharing finished documents.

In plain words
What is it for?
Creating invoices, receipts, reports, summaries, and PDFs from public web pages, with options such as page numbers, paper size, margins, headers, and footers.
Why use it?
It turns text or web content into a printable, shareable document without requiring manual layout work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

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.

agentmods
npx agentmods add skills/trendtweekers/mintpdf/generate-pdf
Any agent
npx skills add TrendTweekers/mintpdf --skill generate-pdf
Clone the repo
git clone --depth 1 https://github.com/TrendTweekers/mintpdf

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 generate-pdf

README.md
[![agentmods](https://agentmods.dev/badge/skills/trendtweekers/mintpdf/generate-pdf.svg)](https://agentmods.dev/skills/trendtweekers/mintpdf/generate-pdf)
Your own site
<a href="https://agentmods.dev/skills/trendtweekers/mintpdf/generate-pdf"><img src="https://agentmods.dev/badge/skills/trendtweekers/mintpdf/generate-pdf.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 459 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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.00028 $0.00459
Opus 5 $0.00014 $0.00230
Sonnet 5 $0.00006 $0.00092
Haiku 4.5 $0.00003 $0.00046

Measured 5d ago against content hash 690ab7fc9c3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

generate-pdf scanned grade A with 1 finding 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 5d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST https://mintpdf.dev/v1/pdf \
public/.well-known/agent-skills/generate-pdf/SKILL.md · 51 lines

What it actually says

Generate a PDF with MintPDF

Use this when a user needs a finished document rather than text: an invoice, a receipt, a report, a summary they will send to someone else.

Fastest path (no key, no signup)

curl -X POST https://mintpdf.dev/v1/pdf \
  -H "Content-Type: application/json" \
  -d '{"markdown":"# Invoice #42\n\n| Item | Price |\n|---|---|\n| Widget | $9.00 |","pageNumbers":true}' \
  --output invoice.pdf

Add "output":"url" to get JSON with a download link (valid one hour) instead of raw bytes.

As an MCP server

Remote: https://mintpdf.dev/mcp (streamable HTTP) Local: npx -y mintpdf-mcp

Tools: generate_pdf (html or markdown in) and pdf_from_url (public URL in).

Options

format (A4, Letter, Legal, A3, A5), landscape, margin (e.g. "18mm"), headerText, footerText, pageNumbers.

Choosing the input

  • markdown — the default choice. A clean stylesheet is applied automatically, so tables, code blocks and headings come out looking right with no design work.
  • html — when you need full control. Your own CSS is used as-is.
  • url — to capture a public page as it renders.

Limits

10 renders/day anonymously, 100/month with a free key (POST /v1/keys with an email, no card), then 3,000/month on Solo ($19), 12,000 on Team ($49) and 50,000 on Scale ($129). Send the key as Authorization: Bearer pm_….

Privacy

Generated files are deleted after one hour. No document storage. Requests to private or internal network addresses are refused.

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. 5d ago First seen · 51 lines · 28 tokens per session scan A 690ab7fc9c3d

Subscribe to this mod's changes

generate-pdf is a skill published in the GitHub repository TrendTweekers/mintpdf (1 stars, last pushed 13d ago), licensed MIT. It adds 28 tokens to every session and 459 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

n8n-binary-and-data

Handle files and binary data in n8n correctly. Use when working with files, images, PDFs, attachments, uploads or downloads, base64, vision/multimodal input, or when an AI agent needs a file as tool input or output — and whenever the user mentions $binary, binaryPropertyName, "read the PDF", "attach the file", "send…

czlonkowski/n8n-mcp · 135 tokens

markdown-to-pdf

Convert a markdown file to PDF using mistune + reportlab. Use when the user wants to convert a .md file to PDF, or when another skill needs to produce a PDF from markdown output.

staskh/trading_skills · 45 tokens

csv-to-executive-report

Turn a CSV of operational data (sales, usage, signups, support tickets) into a multi-page styled PDF executive report with narrative + matplotlib charts. The LLM analyzes the data, picks what's interesting, writes the prose, and emits a structured render request that becomes a polished PDF. Use when given a CSV and…

skrun-dev/skrun · 81 tokens

receipts-to-expenses

Read a batch of receipt images directly via vision, classify each into expense categories, optionally reconcile against a bank statement CSV, and produce a multi-sheet Excel workbook + a PDF summary. Use when given receipt photos and asked for an expense report.

skrun-dev/skrun · 54 tokens

pdf-processing

Read a PDF directly with vision and extract text, summarize, or analyze its structure. Use when the user passes a PDF file.

skrun-dev/skrun · 29 tokens

pdf-processing

Extract PDF text, fill forms, merge files. Use when handling PDFs.

skrun-dev/skrun · 18 tokens