一键导入
read-pdf-mineru
Extract scientific journal article PDFs to lossless Markdown using MinerU. Assumes a pre-existing conda env named "mineru".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Extract scientific journal article PDFs to lossless Markdown using MinerU. Assumes a pre-existing conda env named "mineru".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Style guidelines for writing manuscript text.
Job dispatch infrastructure. Use when packaging a python script for batch / parallel execution, locally or on SLURM.
Guide for controlling Adobe Illustrator via MCP tools and osascript.
Agent roles, models, and the dispatch pattern for delegating to subagents.
Executive role for an agent that dispatches subagents.
Iterative polish of multi-panel publication figures. Patterns for long-lived layout-revision sessions where a human critiques each render.
基于 SOC 职业分类
| name | read-pdf-mineru |
| description | Extract scientific journal article PDFs to lossless Markdown using MinerU. Assumes a pre-existing conda env named "mineru". |
Goal: convert PDFs to Markdown as losslessly as possible (no summarization). This skill assumes a conda env named mineru already exists. If it doesn’t, stop and tell the user what is missing (create the env + install MinerU) and do not attempt installs.
Save the source PDF under agent_assets/<project_name>/artifacts/pdf_conversions/ before extraction. Use the same basename throughout the conversion outputs.
txt: Use for digital PDFs with selectable text. Fastest and most faithful for journals/preprints.ocr: Use for scanned PDFs or image-only PDFs. Slower; OCR errors are possible.auto: Let MinerU choose. Good when you’re unsure, but txt is usually best for scientific papers.SKILLS_DIR="$(readlink -f .agent/skills)"
conda activate mineru
python "$SKILLS_DIR/read-pdf-mineru/scripts/mineru_extract.py" \
--filepath_pdf agent_assets/<project_name>/artifacts/pdf_conversions/<paper>.pdf \
--output_dir agent_assets/<project_name>/pdf_conversions \
--method txt
If .agent/skills is unavailable, set SKILLS_DIR to your central skills checkout and reuse the same command.
Use Slurm by default. Follow the workspace-conventions skill's references.md for partition/cpu/mem/account values. Create a small dispatch script in agent_assets/<project_name>/code/ and submit it.
Example agent_assets/<project_name>/code/mineru_dispatch.sbatch:
#!/usr/bin/env bash
#SBATCH --account=<account_name>
#SBATCH --time=0-02:00:00
#SBATCH --partition=<partition>
#SBATCH --gres=gpu:1
#SBATCH -c <cpu>
#SBATCH --mem=<mem>
#SBATCH --output=agent_assets/<project_name>/artifacts/mineru_%j.out
#SBATCH --error=agent_assets/<project_name>/artifacts/mineru_%j.err
set -euo pipefail
source "$(conda info --base)/etc/profile.d/conda.sh"
conda activate mineru
SKILLS_DIR="$(readlink -f .agent/skills)"
python "$SKILLS_DIR/read-pdf-mineru/scripts/mineru_extract.py" \
--filepath_pdf agent_assets/<project_name>/artifacts/pdf_conversions/<paper>.pdf \
--output_dir agent_assets/<project_name>/pdf_conversions \
--method txt
Submit with:
sbatch agent_assets/<project_name>/code/mineru_dispatch.sbatch
If the PDF is small and you already have an interactive compute node, run the “Quick use” command directly. This avoids waiting for Slurm scheduling.
SSH to the <compute_node_name> defined in the workspace-conventions skill's references.md, activate mineru, then run the script:
ssh <compute_node_name>
source "$(conda info --base)/etc/profile.d/conda.sh"
conda activate mineru
SKILLS_DIR="$(readlink -f .agent/skills)"
python "$SKILLS_DIR/read-pdf-mineru/scripts/mineru_extract.py" \
--filepath_pdf agent_assets/<project_name>/artifacts/pdf_conversions/<paper>.pdf \
--output_dir agent_assets/<project_name>/pdf_conversions \
--method txt
mineru.mineru CLI is missing from PATH.--output_dir..md files.--preview-lines N to print the first N lines of each .md for quick context loading.Use agent_assets/<project_name>/pdf_conversions/ so outputs are easy to find and reuse.
After completion, confirm extraction:
find agent_assets/<project_name>/pdf_conversions -type f -name "*.md"
squeue -j <jobid>tail -f agent_assets/<project_name>/artifacts/mineru_<jobid>.err.err is empty, also check .out.After extraction, open the printed .md file and read it into context. If multiple .md files were produced, pick the one matching the PDF basename.
Example:
sed -n '1,200p' agent_assets/<project_name>/pdf_conversions/<basename>/<subdir>/<basename>.md
If conda activate mineru fails or MinerU isn’t on PATH, tell the user what to create/install and stop.
On GPU nodes, digital PDFs tested so far averaged ~20–60 seconds per page (short papers are slower per page). Expect variability by hardware, PDF layout complexity, and chosen method.
Never upload PDFs to external services without explicit approval.