md-to-pdf

md-to-pdf is a skill for Claude Code 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 Code

Written for Claude Code: disable-model-invocation in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

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

Good fit Use it to render an .md file as a shareable PDF, either beside the source file or at a chosen output path.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ericboehs/claude-plugins
Claude Code
/plugin install md-to-pdf

Made for: Claude Code.

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/github.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/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 md-to-pdf

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00054 $0.00763
Opus 5.5 $0.00022 $0.00305
Sonnet 5.5 $0.00011 $0.00153
Haiku 4.5 $0.00005 $0.00076

Measured 2mo ago against content hash 73be458a538a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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

  • pandoc — brew 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 mode — MD2PDF_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. 2mo 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 2mo ago), licensed MIT. It adds 54 tokens to every session and 763 once invoked, about $0.0002 per session on Opus 5.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

md-to-pdf compared with skills from other repositories

md-to-pdf next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
md-to-pdfericboehs/claude-pluginsSkill22mo agoMITA54Claude Code
apify-youtube-transcript-scrapersickn33/agentic-awesome-skillsSkill49kyesterdayMITA48Claude Code
foundry-hosted-agent-validationmicrosoft/agent-frameworkSkill15kyesterdayMITA82Claude Code, Codex
report-to-pdfasgeirtj/system_prompts_leaksSkill71kyesterdayCC0-1.0A17Claude Code, Codex
skill-doc-deliverynyldn/claude-octopusSkill4.4ktodayMITA29Claude Code
meta-web-to-pdf-briefingopensquilla/opensquillaSkill7.1k7d agoApache-2.0A45Claude Code, Codex
chat-complex-documentsvellum-ai/vellum-assistantSkill1.5k2d agoMITA90Claude Code, Codex