markdown-to-pdf

Installation
SKILL.md

Markdown to PDF

Convert one or more Markdown files into styled PDFs using WeasyPrint and the Python markdown library. The default styling is neutral; apply your own brand stylesheet via --css.

How to use

Run the conversion script via uv run:

uv run "${SKILL_DIR}/scripts/convert.py" <files...> [-o output_dir] [--css custom.css]

${SKILL_DIR} is the directory containing this SKILL.md. The script resolves assets/style.css relative to its own location, so it works at any path. Its dependencies (markdown, weasyprint) are declared in the inline script metadata at the top of convert.py; uv run reads that block and installs them.

Steps

  1. Identify target .md files from the request. If none specified, look in the current directory and ask which to convert.
  2. Run the conversion:
Installs
12
GitHub Stars
3
First Seen
Apr 29, 2026