Install
$ agentstack add skill-lilyuan258-pdf2md-by-mineru-api-skill-pdf2md-by-mineru-api-skill ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
MinerU PDF Reader
This skill is designed to handle PDF files effectively by converting them into Markdown (with images) using the MinerU / TextIn API before answering user queries.
核心动机与优势 (Core Motivation & Advantage): 传统的 PDF 解析工具往往只能生硬地提取纯文本,这会导致文档中的图片、复杂的表格布局等关键信息大量丢失。而通过本工作流,AI Agent 可以直接读取高质量的 Markdown 排版并结合本地保存的图片进行视觉分析。这不仅避免了因上下文过长导致的崩溃,更使得机器能够像人类一样完整、准确地阅读文档里的图表和复杂结构。
工作流 (Workflow)
对于用户提供的每一个 PDF 文件,执行以下步骤:
- 定位目标 PDF 文件: 找到用户想要阅读或处理的
.pdf文件路径(例如论文A.pdf)。 - 定位转换脚本: 脚本
convert_pdf.py位于本 Skill 目录下的scripts文件夹中(即与此SKILL.md同级的scripts/convert_pdf.py)。在执行命令前,你必须先动态获取或拼接出该脚本在当前系统中的绝对路径。 - 确定输出文件夹名称: 根据 PDF 的文件名动态创建一个专属的文件夹名称。规则为:去掉
.pdf后缀,加上md文档。例如:对于论文A.pdf,输出文件夹名称应为论文A md文档。对于多篇论文(如论文A和论文B),分别对应论文A md文档和论文B md文档。 - 转换 PDF: 运行打包好的 Python 脚本,将 PDF 转换为 Markdown 文档及包含图片的文件夹。
- 运行命令:
python "" - 例如:
python C:\path\to\skill\scripts\convert_pdf.py 论文A.pdf "论文A md文档"
- 获取并读取所有输出文件 (强制视觉): 转换完成后,你绝对不能只读取
document.md。你必须:
- 首先,使用文件系统工具(如
list_directory)列出该输出文件夹下的所有文件。 - 然后,主动调用你的文件读取工具(如
read_file)将列出的所有文件(包括document.md以及所有的.jpg,.png图片文件)全部读取进你的上下文中。 - 只有显式地对图片调用了
read_file,你才能真正“看到”它们。不要跳过这一步!
- 完成用户需求: 综合你刚刚同时读取到的 Markdown 文本结构和所有真实图片、表格的内容,准确回答用户的原始请求。
重要指令 (Critical Instructions)
- 绝对不要直接使用普通工具读取 PDF 文件。在执行任何读取操作前,必须先使用脚本进行转换。
- 强制多模态读取策略:由于大模型在纯文本读取时容易忽略图片,你被强制要求在转换完成后,使用
list_directory查看输出文件夹,并对其中的每一张图片主动执行read_file。如果你没有留下调用read_file读取图片的工具执行记录,说明你违背了本 Skill 的核心工作流! - 处理多个 PDF 时,请确保为每个 PDF 单独运行脚本,并指定各自独立的输出文件夹(基于其原文件名)。
- Python 脚本是独立运行的。它依赖
requests和urllib3库,并且需要读取系统环境变量MINERU_API_TOKEN作为访问凭证。如果脚本执行提示缺失 token,请提醒用户配置该环境变量。
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: lilyuan258
- Source: lilyuan258/PDF2md-by-MinerU-api-skill
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.