| name | pdf |
| description | PDF processing toolkit. Extract text/tables/images, merge/split/watermark, format conversion, AI summarization/translation, OCR, encryption/decryption, form handling. Use when working with PDF files, extracting content, converting formats, or applying AI enhancements. |
| argument-hint | <action> [file] [options] |
| allowed-tools | ["Bash","Read","Glob","Grep"] |
| user-invocable | true |
PDF-Master
全能型 PDF 处理工具,提供 40+ 种操作。
快速命令
/pdf extract document.pdf
/pdf extract --text document.pdf
/pdf extract --tables document.pdf
/pdf extract --images document.pdf
/pdf extract --metadata document.pdf
/pdf merge file1.pdf file2.pdf -o merged.pdf
/pdf split document.pdf
/pdf rotate document.pdf --angle 90
/pdf watermark document.pdf --image stamp.png
/pdf convert --to-excel document.pdf
/pdf convert --to-markdown document.pdf
/pdf convert --to-images document.pdf
/pdf pdfa document.pdf -o archive.pdf --level 2b
/pdf summarize document.pdf
/pdf ask document.pdf "主要观点是什么?"
/pdf translate document.pdf --to en
/pdf ocr scanned.pdf
/pdf encrypt document.pdf --password secret
/pdf decrypt encrypted.pdf --password secret
/pdf redact document.pdf --text "sensitive"
/pdf sign document.pdf --cert cert.p12 --password secret
/pdf verify document.pdf
/pdf audit document.pdf
/pdf form-check document.pdf
/pdf form-fill document.pdf --data fields.json
/pdf bookmarks list document.pdf
/pdf bookmarks add document.pdf --title "第一章" --page 1
/pdf bookmarks remove document.pdf --all
/pdf links list document.pdf
/pdf links add document.pdf --page 1 --rect "100,100,200,120" --url "https://example.com"
/pdf links remove document.pdf --suspicious
/pdf annotations list document.pdf
/pdf annotations add document.pdf --page 1 --pos "100,100" --contents "重要"
/pdf annotations remove document.pdf --type Highlight
/pdf rename *.pdf --rule metadata --template "{author} - {title}"
/pdf rename *.pdf --rule date --template "{date:%Y-%m-%d}_{filename}"
/pdf rename *.pdf --rule content --template "{title}"
/pdf rename *.pdf --rule custom --template "Document_{counter:04d}"
/pdf rename *.pdf --dry-run
执行脚本
所有脚本位于 ${CLAUDE_SKILL_DIR}/scripts/:
python ${CLAUDE_SKILL_DIR}/scripts/extract_text.py input.pdf -o output.txt
python ${CLAUDE_SKILL_DIR}/scripts/merge_pdfs.py *.pdf -o merged.pdf
python ${CLAUDE_SKILL_DIR}/scripts/summarize_pdf.py document.pdf --provider claude
AI Provider 配置
零配置设计
安装即用! PDF-Master 自动检测 Claude Code 已有的 API Key:
/pdf summarize document.pdf
内置 Provider 预设(40+)
| 分类 | Provider | 环境变量 | 特点 |
|---|
| 官方 | Claude | ANTHROPIC_API_KEY | 默认使用,无需配置 |
| OpenAI | OPENAI_API_KEY | GPT 系列 |
| Gemini | GOOGLE_API_KEY | Google 最新模型 |
| 国内 | DeepSeek | DEEPSEEK_API_KEY | 性价比极高 |
| 通义千问 | QWEN_API_KEY | 中文效果优秀 |
| 智谱 GLM | ZHIPU_API_KEY | 国产大模型 |
| Moonshot | MOONSHOT_API_KEY | 长文本能力强 |
| 聚合 | OpenRouter | OPENROUTER_API_KEY | 一个 Key 访问所有模型 |
| 本地 | Ollama | 无需 | 隐私安全,免费 |
快速切换 Provider
python ${CLAUDE_SKILL_DIR}/scripts/summarize_pdf.py doc.pdf --provider deepseek
export PDF_MASTER_PROVIDER=qwen
cp config/providers.yaml ~/.pdf-master/providers.yaml
详细文档
依赖安装
pip install pypdf pdfplumber PyMuPDF reportlab Pillow
pip install anthropic openai google-generativeai zhipuai ollama
pip install pytesseract pdf2image
pip install pandas openpyxl