md2pdf

md2pdf is a skill for Claude Code, Codex from KerberosClaw/kc_ai_skills. It costs 123 tokens per session (4,230 once invoked), scanned A, original, MIT.

A workflow for converting one Markdown file into a publication-ready A4 PDF while leaving the original file unchanged. Markdown is plain text formatted with simple symbols for headings, lists, and other document elements.

In plain words
What is it for?
Use it to convert a Markdown document, including Mermaid diagrams, into an A4 PDF after checking the required conversion tools.
Why use it?
It handles common conversion issues involving diagrams, East Asian text, tables, and PDF formatting.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to convert a Markdown document, including Mermaid diagrams, into an A4 PDF after checking the required conversion tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kerberosclaw/kc_ai_skills/md2pdf
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.

Any agent
npx skills add KerberosClaw/kc_ai_skills --skill md2pdf
Clone the repo
git clone --depth 1 https://github.com/KerberosClaw/kc_ai_skills

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/kerberosclaw/kc_ai_skills/md2pdf/github.svg)](https://agentmods.dev/skills/kerberosclaw/kc_ai_skills/md2pdf)
Your own site
<a href="https://agentmods.dev/skills/kerberosclaw/kc_ai_skills/md2pdf"><img src="https://agentmods.dev/badge/skills/kerberosclaw/kc_ai_skills/md2pdf/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 md2pdf

Your own site · 80×15
<a href="https://agentmods.dev/skills/kerberosclaw/kc_ai_skills/md2pdf"><img src="https://agentmods.dev/badge/skills/kerberosclaw/kc_ai_skills/md2pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,230 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 239
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 277
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00123 $0.04230
Opus 5 $0.00062 $0.02115
Sonnet 5 $0.00025 $0.00846
Haiku 4.5 $0.00012 $0.00423

Measured 10d ago against content hash 46482401a1d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/build_pdf.sh, scripts/table_widths.py), 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.

md2pdf/SKILL.md · 293 lines

How it starts

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

md2pdf

You are a Markdown-to-PDF production assistant. You convert exactly one Markdown file at a time into a clean, publication-ready A4 PDF while preserving the original source file.

Trigger

/md2pdf path/to/file.md

Prerequisites Check

Before anything else, verify these tools exist. If any is missing, stop and show install commands:

# Check all three
which pandoc && which mmdc && which weasyprint

Missing tool install commands:

  • pandoc: brew install pandoc
  • mmdc: npm install -g @mermaid-js/mermaid-cli
  • weasyprint: pip install weasyprint or brew install weasyprint

Workflow

Step 1: Check for existing _pdf.md

If {filename}_pdf.md already exists, ask the user:

  • Use existing: convert _pdf.md directly to PDF (user may have manually tuned it)
  • Regenerate: copy from original and redo all conversions

Step 2: Ask style, and ask about a table of contents

2a. CSS style. Present options; if the user doesn't choose, pick the most suitable one automatically:

  • Professional — dark blue headers, gray alternating rows, blue accent blockquotes (good for client-facing docs)
  • Technical — compact, orange accent blockquotes, smaller fonts (good for dev manuals)
  • Minimal — black and white, no colored headers (good for printing)

2b. Table of contents — always ask, never assume. A contents page also pulls the title onto a cover sheet, so switching it on costs a full page before the reader reaches any content. That is right for a report and absurd for a two-page memo.

Ask outright. If the user has no opinion, decide by length and say which you picked:

Source length Default Why
Under ~6 pages of content No TOC A cover plus a contents list for a handful of sections is pure overhead
Longer, or many ## sections TOC Real page numbers make it navigable

2c. Version footer. If the document carries a > Version: ... (or > 版本:...) line under its H1, it is lifted out of the body and printed bottom-right on every page. If the document is going to a third party and has no version line, offer to add one — without it nobody can tell which draft they are holding.

Read the full file on GitHub · 293 lines

Files

What ships with it

3 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. 10d ago First seen · 293 lines · 123 tokens per session scan A 46482401a1d9

Subscribe to this mod's changes

md2pdf is a skill published in the GitHub repository KerberosClaw/kc_ai_skills (79 stars, last pushed 2d ago), licensed MIT. It adds 123 tokens to every session and 4,230 once invoked, about $0.0006 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

tageszeitung

Creates a personalised daily newspaper from RSS feeds and web sources. Ported from the BACH news system (news.py + newspapergenerator.py). Own SQLite store (no Origin-DB). feedparser optional — XML fallback via stdlib. PDF export via Edge Headless (msedge.exe).

ellmos-ai/skills · 63 tokens

docutranslate

Use when translating documents locally via LLM — PDF, Word, Excel, Markdown, SRT subtitles with format preservation. DocuTranslate: LLM-powered multi-format local file translation tool with MCP server support.

znlgis/opengis-skills · 47 tokens

llm-text-hygiene

Skill "llm-text-hygiene" from ellmos-ai/skills, covering übersicht & zweck, prüfkatalog, 2. platzhalter und baustellen-marker (eindeutig → auflösen), 4. ai-disclosure (prüfen → korrigieren) and ablauf.

ellmos-ai/skills · 0 tokens

steuer-assistent

Points to the standalone module steuer-assistent: a local, offline-first receipt worksheet for German employee income-related expenses (Werbungskosten) -- record, sum to the cent, private ZIP export. Use this skill when Werbungskosten receipts should be prepared in a structured way -- with a clear boundary: not tax…

ellmos-ai/skills · 0 tokens

finanz-versicherung

Strukturiert bereitgestellte Finanz- und Versicherungsunterlagen als neutrale Übersicht und Checkliste.

ellmos-ai/skills · 27 tokens

typst-cards

Generate PNG images and PDF carousels for online communication — social media, carousels, infographics, posts — using Typst. Use this skill whenever the user wants to create slides, cards, visual posts or any digital graphic content, even if they don't explicitly mention Typst. The skill drives an interview about…

ondata/skills · 153 tokens