markdown-to-pdf
Convert a markdown file to PDF using mistune + reportlab. Use when the user wants to convert a .md file to PDF, or when another skill needs to produce a PDF from markdown output.
How do I install this agent skill?
npx skills add https://github.com/staskh/trading_skills --skill markdown-to-pdfIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill is a utility for converting Markdown documents into PDF files. It uses established Python libraries for parsing and rendering, performs all operations locally, and includes logic to prevent remote image fetching, which mitigates SSRF risks.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Markdown to PDF Converter
Converts a markdown file to a professionally formatted PDF. Pure Python — no system tools required.
Dependencies
Requires two Python packages (already in pyproject.toml):
mistune>=3.2
reportlab>=4.0
Install with: uv sync (or pip install mistune reportlab)
Instructions
uv run python .claude/skills/markdown-to-pdf/scripts/markdown_to_pdf.py <input.md> [output.pdf]
input.md— path to the markdown file (required)output.pdf— output path (optional; defaults to same directory and basename as input)
Output
The script returns JSON with:
success—trueorfalseinput— resolved absolute path of the input fileoutput— resolved absolute path of the generated PDFerror— error message ifsuccessisfalsegenerated_at— NY timezone timestampdata_delay— always"n/a"(the converter reads no market data; the report states its own delay)
After conversion, tell the user the output PDF path.
Examples
# Convert sandbox/report.md → sandbox/report.pdf (default output)
uv run python .claude/skills/markdown-to-pdf/scripts/markdown_to_pdf.py sandbox/report.md
# Explicit output path
uv run python .claude/skills/markdown-to-pdf/scripts/markdown_to_pdf.py sandbox/report.md sandbox/AAPL_Report_2026-05-20_1430.pdf
Supported Markdown
- Headings (H1–H3)
- Paragraphs, bold, italic
- Tables (pipe syntax)
- Fenced code blocks
- Unordered and ordered lists
- Images:
with a local JPG or PNG, relative to the markdown file or absolute. Each is scaled down to fit the page width and three quarters of its height, keeping its aspect ratio. A missing file or a remote URL shows[image: alt]instead.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/staskh/trading_skills/markdown-to-pdf">View markdown-to-pdf on skillZs</a>