staskh avatar

Markdown To Pdf

This converts markdown files to PDFs using mistune for parsing and reportlab for rendering, no external tools needed. You get headings, tables, code blocks, lists, and basic formatting. The output defaults to the same directory as your input file with a PDF extension, which is the sensible behavior. It returns structured JSON with absolute paths and timestamps, clearly designed to play nice with other automation skills. The supported markdown subset is reasonable but not exhaustive, so don't expect every GitHub-flavored feature. Good for generating reports or documentation from markdown without wrestling with Pandoc or wkhtmltopdf installations.

GitHub stars
248
last updated
Jun 11, 2026

Install

$ npx -y skills add staskh/trading_skills --skill markdown-to-pdf --agent claude-code

Installs into .claude/skills of the current project.

Files

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 — true or false
  • input — resolved absolute path of the input file
  • output — resolved absolute path of the generated PDF
  • error — error message if success is false
  • generated_at — NY timezone timestamp
  • data_delay — always "real-time"

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

Sponsors

Details

Repository
github.com/staskh/trading_skills
Categories
Office & Documents, Finance & Trading
License
MIT
First seen
Jun 11, 2026

More from staskh/trading_skills

All 28
1tfriedel avatarpptxtfriedel/claude-office-skillsPresentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or e1.7Kskills.sh installs
2huyansheng3 avatarpptxhuyansheng3/ppt-skillsPresentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or e180skills.sh installs
3larksuite avatarmeeglelarksuite/meegle-cli飞书项目(Meego/Meegle)操作工具。支持查询和管理工作项、节点流转、视图查询、个人待办、排期统计等功能。 Use when user needs to work with Feishu/Lark Meego project management — including querying work items,16.9Kskills.sh installs
4claude-office-skills avatarinvoice-templateclaude-office-skills/skillsGenerate professional PDF invoices from templates4.8Kskills.sh installs
5claude-office-skills avatarcv-builderclaude-office-skills/skills>6.2Kskills.sh installs
6claude-office-skills avatarproposal-writerclaude-office-skills/skillsCreate compelling business proposals that win deals and partnerships6Kskills.sh installs