Uploads a PDF to the AMiner PDF OCR platform, polls the async job, downloads the result ZIP, and extracts structured experiments into experiments.json.
The Python wrapper validates a PDF, uploads it to the AMiner PDF OCR open platform, handles queue backoff, polls the asynchronous job, downloads the temporary result ZIP, and writes compatible local artifacts. The Agent then reads result.md and follows references/experiment_prompt.md to create experiments.json.
AMINER_API_KEY exists (same token as other AMiner skills). If missing, stop and send the user to https://open.aminer.cn/open/board?tab=control. Never print its value. OPEN_PLATFORM_TOKEN is accepted only as a deprecated fallback.requests and pypdf from requirements.txt.python3 "${CLAUDE_PLUGIN_ROOT}/scripts/ocr.py" --input "/abs/path/to/paper.pdf"
Options include --output-dir, --request-timeout, --poll-timeout, --max-upload-attempts, --no-save-images, and --output. The old local parser, backend, page-range, formula, and table options are not supported.
POST /api/v3/paper/pdfocr/upload and GET /api/v3/paper/pdfocr/result on https://datacenter.aminer.cn/gateway/open_platform.AMINER_API_KEY) and send Authorization, X-Platform (current host: claude-code / cursor / codex / openclaw; unknown if it cannot be determined), X-Skill-Name: aminer-pdf-ocr, and X-Skill-Version (this file's frontmatter version).code: 202 means queued, not completed. A reused upload may return code: 200; always use its returned job_id.success, HTTP status, or code alone to decide success. Inspect data.status and data.is_finish.preparing, queued, and running are polled. success downloads the ZIP. failed, timeout, queue_timeout, expired, and unknown stop.data.queue_full is retried with bounded backoff using retry_after_seconds.response.json..md and _middle.json suffixes; document/ is not a protocol.Unless OCR-only is explicitly requested, read the complete result.md, follow references/experiment_prompt.md, write one JSON object to experiments.json, and show the same full JSON in the response. Do not add justification fields or invent unsupported experiments, datasets, metrics, or scores. If OCR fails, report the error and do not fabricate extraction output.
The default local sample is data/pdf/applsci-14-11736.pdf (untracked; place it yourself). The live test is opt-in: set RUN_PDFOCR_LIVE=1 together with AMINER_API_KEY. It is skipped by default and never runs without both the credential and fixture.
SKILL.zh.md (opens in a new tab)commands/aminer-pdf-ocr.md (opens in a new tab)evals/evals.json (opens in a new tab)references/experiment_prompt.md (opens in a new tab)requirements.txt (opens in a new tab)scripts/artifacts.py (opens in a new tab)scripts/ocr.py (opens in a new tab)scripts/pdf_validation.py (opens in a new tab)scripts/pdfocr_client.py (opens in a new tab)scripts/url_guard.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/aminer-pdf-ocr:aminer-pdf-ocr runs instead · from aminer-pdf-ocr
This skill never runs in Claude Code
It ships in aminer-pdf-ocr at SKILL.md, but /aminer-pdf-ocr:aminer-pdf-ocr (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
npx claudepluginhub aminerorg/aminer-research-skills --plugin aminer-pdf-ocrOther plugins' skills for the same job