Agent Skillsstaskh/trading_skills › markdown-to-pdf

markdown-to-pdf

GitHub

将Markdown文件转换为专业格式PDF的Python工具。支持标题、表格、代码块等语法,无需系统依赖。

.claude/skills/markdown-to-pdf/SKILL.md staskh/trading_skills

触发场景

用户请求将.md文件转为PDF 其他技能需要生成Markdown内容的PDF

安装

npx skills add staskh/trading_skills --skill markdown-to-pdf -g -y
更多选项

非标准路径

npx skills add https://github.com/staskh/trading_skills/tree/main/.claude/skills/markdown-to-pdf -g -y

不安装直接使用

npx skills use staskh/trading_skills@markdown-to-pdf

指定 Agent (Claude Code)

npx skills add staskh/trading_skills --skill markdown-to-pdf -a claude-code -g -y

安装 repo 全部 skill

npx skills add staskh/trading_skills --all -g -y

预览 repo 内 skill

npx skills add staskh/trading_skills --list

SKILL.md

Frontmatter
{
    "name": "markdown-to-pdf",
    "arguments": [
        {
            "name": "file",
            "required": true,
            "description": "Path to the input markdown file"
        },
        {
            "name": "output",
            "required": false,
            "description": "Output PDF path. Defaults to same directory and basename as the input file."
        }
    ],
    "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.",
    "dependencies": [
        "trading-skills"
    ],
    "user_invocable": true
}

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:

  • successtrue 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

版本历史

  • cc30858 当前 2026-07-05 11:04

依赖关系

  • required trading-skills

同 Skill 集合

.claude/skills/earnings-calendar/SKILL.md
.claude/skills/fundamentals/SKILL.md
.claude/skills/greeks/SKILL.md
.claude/skills/ib-account/SKILL.md
.claude/skills/ib-collar/SKILL.md
.claude/skills/ib-create-consolidated-report/SKILL.md
.claude/skills/ib-find-short-roll/SKILL.md
.claude/skills/ib-option-chain/SKILL.md
.claude/skills/ib-pmcc-advisor/SKILL.md
.claude/skills/ib-portfolio-action-report/SKILL.md
.claude/skills/ib-portfolio/SKILL.md
.claude/skills/ib-report-delta-adjusted-notional-exposure/SKILL.md
.claude/skills/ib-stop-loss/SKILL.md
.claude/skills/ib-trades-history/SKILL.md
.claude/skills/ib-trailing-stop/SKILL.md
.claude/skills/insider-trading/SKILL.md
.claude/skills/news-sentiment/SKILL.md
.claude/skills/option-chain/SKILL.md
.claude/skills/price-history/SKILL.md
.claude/skills/report-stock/SKILL.md
.claude/skills/risk-assessment/SKILL.md
.claude/skills/scanner-bullish/SKILL.md
.claude/skills/scanner-pmcc/SKILL.md
.claude/skills/spread-analysis/SKILL.md
.claude/skills/stock-quote/SKILL.md
.claude/skills/technical-analysis/SKILL.md
.claude/skills/whale-hunting/SKILL.md

元信息

文件数
0
版本
cc30858
Hash
89261f2c
收录时间
2026-07-05 11:04

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-14 00:26
浙ICP备14020137号-1 $访客地图$