From dstoic
Converts Markdown files with Mermaid diagrams to styled PDFs using Python script and Puppeteer. Useful for generating PDF documentation, reports, or printable documents with custom styles.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dstoic:convert-md-to-pdfsonnetThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Convert markdown files to professionally styled PDFs with Mermaid diagram support.
Convert markdown files to professionally styled PDFs with Mermaid diagram support.
python <skill_dir>/scripts/converter.py <input.md> [output.pdf] [--style=STYLE]
Note: The converter.py script automatically handles TMPDIR overrides to avoid /tmp/claude permission issues.
Check <skill_dir>/styles/ for options:
default - Clean sans-serif, professionalmodern - Bold headers, accent colorsminimal - Serif font, whitespacereport - Formal corporate styleInstall dependencies via install-dependency skill:
install-dependency to install from <skill_dir>/requirements.txtinstall-dependency for @mermaid-js/mermaid-cliNote: The install-dependency skill automatically sets up local TMPDIR to avoid permission conflicts.
Linux setup (Ubuntu 23.10+ or AppArmor systems):
Create puppeteer-config.json in your project root:
{
"args": ["--no-sandbox", "--disable-setuid-sandbox"]
}
This allows Puppeteer (used by Mermaid) to launch Chrome for diagram rendering.
Create .css file in <skill_dir>/styles/ directory.
npx claudepluginhub digital-stoic-org/agent-skills --plugin dstoicConverts Markdown to professionally styled PDFs with Mermaid diagrams, LaTeX/KaTeX math, tables, and syntax-highlighted code blocks.
Converts markdown files, globs, or directories to professional PDFs with Obsidian-style preview using pandoc and wkhtmltopdf. Supports custom output directories and auto-installs tools.
Converts Markdown documents to professionally typeset PDFs using reportlab (primary) or pandoc+XeLaTeX (fallback). Handles CJK/Latin mixed text, code blocks, tables, Obsidian callouts, math formulas, and 14 color themes. Triggered by "markdown to PDF", "md2pdf", "any2pdf", or export requests.