with one click
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.
// 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.
| name | markdown-to-pdf |
| description | 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. |
| user_invocable | true |
| 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}] |
| dependencies | ["trading-skills"] |
Converts a markdown file to a professionally formatted PDF. Pure Python — no system tools required.
Requires two Python packages (already in pyproject.toml):
mistune>=3.2
reportlab>=4.0
Install with: uv sync (or pip install mistune reportlab)
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)The script returns JSON with:
success — true or falseinput — resolved absolute path of the input fileoutput — resolved absolute path of the generated PDFerror — error message if success is falsegenerated_at — NY timezone timestampdata_delay — always "real-time"After conversion, tell the user the output PDF path.
# 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
Scan stocks for Poor Man's Covered Call (PMCC) suitability. Analyzes LEAPS and short call options for delta, liquidity, spread, IV, yield, trend direction, and earnings proximity. Use when user asks about PMCC candidates, diagonal spreads, or LEAPS strategies.
Generate comprehensive stock analysis report (PDF or markdown) with trend, PMCC, and fundamental analysis
Downside stop-loss management for PMCC, naked LEAPS, and stock positions in IB. Computes stop prices, detects alerts, and places conditional combo orders. Dry-run by default. Requires TWS or IB Gateway running locally.
Fetch trade executions from Interactive Brokers filtered by account, date range, or symbol. Supports live API (~7 days history) and FlexReport (full history). Use when user asks about their trades, executions, or transaction history. Requires TWS or IB Gateway running locally.
Analyze PMCC (Poor Man's Covered Call / diagonal spread) positions from IB portfolio. For each diagonal spread, reports short leg risk (delta, IV, assignment probability), daily P&L projections, top-3 roll candidates, and a side-by-side comparison table. Requires TWS or IB Gateway running locally.
Get upcoming earnings dates with timing (before/after market) and EPS estimates. Use when user asks about earnings dates, earnings calendar, when a company reports, or upcoming earnings.