All skills
staskh avatar

/markdown-to-pdf

@3cb2db2
by staskhstaskh/trading_skills373 stars
85

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.

Use this Skill: https://skilld.dev/gh/staskh/trading_skills/markdown-to-pdf

This session only. Nothing lands on disk.

SKILL.md

≈49 tokens always: the name and description. ≈361 when used: this file.

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

# 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

Source: SKILL.md on GitHub

No alerts12d3 checks · Risk SAFE
  • Gen Agent Trust Hub12d

    This skill is safe. It provides a utility to convert Markdown files into PDF documents using established Python libraries (mistune and reportlab) and performs all operations locally without network access.

  • Socket12d

    No alerts

  • Snyk12d

    Risk: LOW · No issues

Signed by skilld at 3cb2db2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 4 months ago
user_invocable
true
dependencies
[
  "trading-skills"
]
Other metadata
arguments
[
  {
    "name": "file",
    "description": "Path to the input markdown file",
    "required": true
  },
  {
    "name": "output",
    "description": "Output PDF path. Defaults to same directory and basename as the input file.",
    "required": false
  }
]

README badge

README badge for staskh/trading_skills/markdown-to-pdf