md2pdf

md2pdf is a skill for Claude Code, Codex from joshukraine/dotfiles. It costs 22 tokens per session (315 once invoked), scanned A, original, MIT.

A document converter that turns Markdown files into PDF documents with GitHub-style formatting.

In plain words
What is it for?
Use it to create PDFs from guides, documentation, or other Markdown files, with an optional custom output filename.
Why use it?
It removes the need to convert and format Markdown files by hand. It can process one file or several matching files.

Skill for Claude CodeCodex

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/joshukraine/dotfiles/md2pdf
Any agent
npx skills add joshukraine/dotfiles --skill md2pdf
Clone the repo
git clone --depth 1 https://github.com/joshukraine/dotfiles

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 md2pdf

README.md
[![agentmods](https://agentmods.dev/badge/skills/joshukraine/dotfiles/md2pdf.svg)](https://agentmods.dev/skills/joshukraine/dotfiles/md2pdf)
Your own site
<a href="https://agentmods.dev/skills/joshukraine/dotfiles/md2pdf"><img src="https://agentmods.dev/badge/skills/joshukraine/dotfiles/md2pdf.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 315 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.00022 $0.00315
Opus 5 $0.00011 $0.00158
Sonnet 5 $0.00004 $0.00063
Haiku 4.5 $0.00002 $0.00032

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

Security

Grade A, and why

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

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.

claude/.claude/skills/md2pdf/SKILL.md · 42 lines

What it actually says

Markdown to PDF

Convert Markdown files to PDF with GitHub-style formatting using the md2pdf tool.

Command Options

  • $ARGUMENTS: File paths or glob patterns to convert (e.g., docs/guide.md, docs/*.md)
  • -o FILE: Custom output path (only valid with a single input file)

Your task

  1. Determine input files:

    • If $ARGUMENTS are provided, use them as the file paths
    • If no arguments are provided, ask the user which files to convert
  2. Run the conversion: Execute md2pdf with the specified files

  3. Report results: Confirm which PDFs were generated

Tool Details

The md2pdf tool uses pandoc + weasyprint with GitHub-style CSS. The CSS and script live in dotfiles (~/dotfiles/bin/.local/bin/). The MD2PDF_CSS environment variable can override the default CSS path.

Example Usage

# Convert a single file
/md2pdf docs/guide.md

# Convert multiple files with a glob
/md2pdf docs/qa-handoffs/qa-guide-*.md

# Convert with a custom output name
/md2pdf -o custom-name.pdf docs/guide.md
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 · 42 lines · 22 tokens per session scan A 9b823f1d33bd

Subscribe to this mod's changes

md2pdf is a skill published in the GitHub repository joshukraine/dotfiles (422 stars, last pushed 23d ago), licensed MIT. It adds 22 tokens to every session and 315 once invoked, about $0.0001 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

import-papers

Process PDFs in research/dump/, extract metadata, generate bibtex entries, and move files to research/papers/. Use when importing research papers or managing a paper bibliography. Only applies inside a checkout that has research/dump/ and research/papers.bib, and requires the pdftotext CLI (poppler-utils) — skip on…

DJRHails/dotfiles · 76 tokens

slidesync

Bidirectional sync between a Slidev markdown deck and Google Slides as native, editable objects (not images). Push markdown -> Slides, pull Slides -> markdown, and round-trip. Use when the user wants to author/version a Google Slides deck from markdown, replicate a deck's styling, or keep a .slidev.md in sync with a…

DJRHails/dotfiles · 154 tokens

notion

Fetch Notion pages as Markdown from the CLI using your existing browser session cookies — no per-page integration grants. Search workspaces, list logged-in identities across browser profiles. Use when the user references a Notion page URL/ID, says "import this Notion page", asks to search Notion, or wants to inspect…

DJRHails/dotfiles · 76 tokens

pdf

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

einverne/dotfiles · 50 tokens

gemini-document-processing

Guide for implementing Google Gemini API document processing - analyze PDFs with native vision to extract text, images, diagrams, charts, and tables. Use when processing documents, extracting structured data, summarizing PDFs, answering questions about document content, or converting documents to structured formats.…

einverne/dotfiles · 61 tokens

xlsx

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify…

DJRHails/dotfiles · 130 tokens