md-to-pdf

md-to-pdf is a skill for Claude Code, Codex from ericboehs/claude-plugins. It costs 54 tokens per session (763 once invoked), scanned A, original, MIT.

A converter that turns GitHub-flavored Markdown documents into PDFs styled like GitHub pages. It uses Pandoc and a browser running without a visible window.

In plain words
What is it for?
Use it to render an .md file as a shareable PDF, either beside the source file or at a chosen output path.
Why use it?
It removes the manual work of converting Markdown while keeping familiar GitHub-like formatting, including support for local images.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the md-to-pdf plugin — 1 skill shipped together

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/ericboehs/claude-plugins/md-to-pdf
Any agent
npx skills add ericboehs/claude-plugins --skill md-to-pdf
Clone the repo
git clone --depth 1 https://github.com/ericboehs/claude-plugins

Made for: Claude Code, Codex.

Or install md-to-pdf, the plugin that ships this one along with the rest of its 1 skill.

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 md-to-pdf

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericboehs/claude-plugins/md-to-pdf.svg)](https://agentmods.dev/skills/ericboehs/claude-plugins/md-to-pdf)
Your own site
<a href="https://agentmods.dev/skills/ericboehs/claude-plugins/md-to-pdf"><img src="https://agentmods.dev/badge/skills/ericboehs/claude-plugins/md-to-pdf.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 763 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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 $0.00054 $0.00763
Opus 5 $0.00027 $0.00381
Sonnet 5 $0.00011 $0.00153
Haiku 4.5 $0.00005 $0.00076

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

Security

Grade A, and why

md-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.

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/md-to-pdf/skills/md-to-pdf/SKILL.md · 63 lines

How it starts

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

md-to-pdf Skill

Convert a GitHub-flavored markdown file to a PDF that looks like github.com's rendering (real github-markdown-css through headless Chrome, not LaTeX).

Usage

User says: "/md-to-pdf", "convert this markdown to pdf", "render X.md as a pdf", "make a pdf out of this doc".

Optional arguments:

  • Input path — the .md file to convert (required)
  • Output path — where to write the PDF (defaults to <input>.pdf next to the source)

Running It

"${CLAUDE_PLUGIN_ROOT}/scripts/md2pdf" "/path/to/input.md"                    # writes /path/to/input.pdf
"${CLAUDE_PLUGIN_ROOT}/scripts/md2pdf" "/path/to/input.md" "/tmp/output.pdf"  # custom output path

If CLAUDE_PLUGIN_ROOT is not set, find the script relative to this SKILL.md (../../scripts/md2pdf).

Then open the result:

open "/path/to/input.pdf"

How It Works

  1. pandoc — parses GFM into standalone HTML5, embedding local images
  2. github-markdown-css — fetched once into ~/.cache/md2pdf/ and concatenated with the plugin's assets/github-print.css, which adds page size, wide-table wrapping, and avoid-break rules
  3. headless Chrome — prints the HTML to PDF via --print-to-pdf

The script wraps pandoc's output in <article class="markdown-body"> because github-markdown-css scopes all of its selectors to that class — without the wrapper, none of the GitHub styling applies.

Prerequisites

  • pandocbrew install pandoc (or your package manager)
  • Chrome or Chromium — the script checks Google Chrome, Chromium, and Chrome Canary in /Applications, then google-chrome/chromium/chromium-browser on PATH
  • Network access on first run only — to cache github-markdown-css

Options

  • Dark modeMD2PDF_THEME=dark md2pdf input.md (fetches the dark stylesheet and forces the page background)

When Things Go Wrong

  • Tables still overflow — in assets/github-print.css, drop .markdown-body table font-size to 8pt, or change @page size to Letter landscape
  • Images missing — pandoc uses --embed-resources, so make sure paths in the markdown resolve from the source file's directory
  • Blank PDF or Chrome errors — try --headless (old) instead of --headless=new in the script
  • Stale styling — delete ~/.cache/md2pdf/ to refetch the base stylesheet

Read the full file on GitHub · 63 lines

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 · 63 lines · 54 tokens per session scan A 73be458a538a

Subscribe to this mod's changes

md-to-pdf is a skill published in the GitHub repository ericboehs/claude-plugins (2 stars, last pushed 10d ago), licensed MIT. It adds 54 tokens to every session and 763 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

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens

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

format-specific-extraction

Format-specific document extraction workflows.

xberg-io/xberg · 10 tokens

parse-document

Convert a PDF, scan, image of a page, or office file to clean markdown through the connected Superlinked MCP edge, so the source document is not read into model context directly. Use when the user asks to read, parse, OCR, extract from, summarize, or answer questions about a document.

superlinked/sie · 64 tokens

make-resume

中文可编辑简历制作技能:根据用户经历选择或复刻模板,生成可编辑 HTML 简历并提供 PDF 导出;当用户输入“/make-resume”或要求制作、修改、复刻简历文件时使用。.

Hisn00w/ASu-skills · 56 tokens

pandic-office

Convert Markdown to PDF (or DOCX/EPUB/HTML) using the pandoc CLI. Use when asked to produce a PDF report, brief, summary, or any document where the input is Markdown and the output should be a polished, paginated file.

Team-Commonly/commonly · 59 tokens