From agentic-ai-skills
Batch converts local academic PDFs to Markdown with embedded images using PaddleOCR. Supports single files, directories, and file lists with dry-run and error handling.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agentic-ai-skills:batch-paper-pdf-to-markdownThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
当用户需要把一个或多个**本地论文 PDF** 转成可编辑 Markdown,并保留版面中的图片资源时,使用本 Skill。
当用户需要把一个或多个本地论文 PDF 转成可编辑 Markdown,并保留版面中的图片资源时,使用本 Skill。
适用于以下场景:
本 Skill 基于 PaddleOCR 文档解析能力完成 PDF 内容提取和图片整理,并在脚本侧补充整篇文档输出、图片资源落盘、相对路径改写、覆盖保护、超时控制和错误返回约束,减少手工摘录、手工改路径和重复整理成本。
.pdf 文件。--force。--file-path:单个本地 PDF 文件--input-dir:包含 PDF 的本地目录,可配合 --recursive--file-list:逐行列出 PDF 路径的 UTF-8 文本文件,空行和 # 开头的注释行会被忽略scripts/pdf_to_markdown.py 路径应写成可执行的相对/绝对路径。httpx 和可用的 PaddleOCR 文档解析接口。PADDLEOCR_DOC_PARSING_API_URLPADDLEOCR_ACCESS_TOKENPADDLEOCR_DOC_PARSING_TIMEOUT不要把 token、.env 或其他密钥文件放进 Skill 目录或仓库提交内容。
python -m pip install -r scripts/requirements.txt。--dry-run,确认将处理的 PDF 列表和目标输出路径。--file-path--input-dir,需要包含子目录时追加 --recursive--file-listpaper.md 或 paper/ 已存在,只有在明确允许覆盖时才追加 --force。--continue-on-error。paper.mdpaper/paper/imgs/example.jpg任务完成后检查:
ok、total、succeeded、failed 与实际处理结果一致。source_pdf、markdown_path、image_dir、image_count、pages。markdown_path 指向的 Markdown 文件存在且非空。image_dir 指向的目录存在;如 image_count > 0,目录下应有对应图片文件。单个 PDF:
python scripts/pdf_to_markdown.py --file-path "/absolute/path/to/paper.pdf"
覆盖已有结果:
python scripts/pdf_to_markdown.py --file-path "/absolute/path/to/paper.pdf" --force
批量预检,不调用 OCR:
python scripts/pdf_to_markdown.py --input-dir "/absolute/path/to/papers" --dry-run
目录批量:
python scripts/pdf_to_markdown.py --input-dir "/absolute/path/to/papers"
递归解析目录中的 PDF,并尽量继续处理其余文件:
python scripts/pdf_to_markdown.py --input-dir "/absolute/path/to/papers" --recursive --continue-on-error
按路径清单批量解析:
python scripts/pdf_to_markdown.py --file-list "/absolute/path/to/papers.txt"
references/output_schema.md:PaddleOCR 返回结构中本 Skill 实际依赖的字段说明references/batch_workflow.md:批量输入模式、覆盖策略和结果检查说明references/error_handling.md:常见失败类型、脚本行为和用户反馈要求references/paddleocr_context.md:PaddleOCR 能力来源和接口依赖说明scripts/lib.py:PaddleOCR API 包装逻辑scripts/pdf_to_markdown.py:Markdown 拼装和图片下载逻辑npx claudepluginhub agenticaiplan/agenticaiskills --plugin agentic-ai-skillsBatch downloads open-access PDFs from a DOI list using Unpaywall, PMC, OpenAlex, and Crossref APIs. Converts PDFs to Markdown for LLM analysis.
Converts legal PDFs and scanned images to Markdown using PaddleOCR, with archive retention for auditing. Designed for court files, medical records, invoices, tables, formulas, and multi-column layouts.
Converts files and office documents (PDF, DOCX, PPTX, XLSX, images with OCR, audio with transcription, HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs) to Markdown using Microsoft MarkItDown.