wiki_ingest_ocr — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited wiki_ingest_ocr (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Resolving script paths (read first): Commands below invoke scripts as<BIN>/X.py(and a few as<SKILLS>/...). Resolve these to absolute paths once before running anything:
>
-<SKILL_DIR>= the directory thisSKILL.mdlives in. -<SKILLS>= theskills/folder containing this skill =<SKILL_DIR>/..-<BIN>= thebin/folder beside it =<SKILL_DIR>/../../bin
>
Do not hardcode a fixed prefix like.agents/binor../bin: shell relative paths resolve against the current working directory (usually the topic root), not this skill's location. Once resolved,<BIN>is typically.agents/binwhen invoked from the hub root, or.claude/binfrom inside a topic directory.
This skill handles converting external PDF documents (especially academic papers or scanned articles inside inbox/ or custom local paths) into high-fidelity clean Markdown using the local OCR model configured in config.yaml (default: glm-ocr at 130 DPI).
Figures are handled automatically. Both the PDF path (pdf2md-agent) and the TeX path (tex2md.py) extract figures into animages/folder beside the output Markdown and embed them inline (). Figure files are prefixed with the document slug, so multiple papers can share oneraw/<type>/images/folder without collisions. Vector figures and.epssources are rasterised to PNG. You do not need to handle figures manually.
When the user asks to ingest PDFs using local OCR (or runs the command without a path):
inbox/ directory for any .pdf, .md, or .tex files.inbox/ contains multiple target files, you MUST loop through all of them and process them one by one in a batch.inbox/ is empty of target files, only then prompt the user to specify a file path.raw/papers/, other articles to raw/articles/.pdf2md-agent script on the PDF: python <BIN>/pdf2md-agent/agent.py "<PDF_PATH>" -o "<TOPIC_DIR>/raw/<type>" -t "<DOC_TITLE>".md files or general inbox files, call the ingest helper script:python <BIN>/ingest_helper.py --source-file \"<MD_FILE>\" --type \"<TYPE>\" --topic-dir \"<TOPIC_DIR>\" [--date \"<DATE>\"] This script handles parsing/injecting standard YAML frontmatter, slugifying, and moving/copying the file.
python <BIN>/tex2md.py "<TEX_OR_TARGZ_PATH>" -o "<TOPIC_DIR>\raw\<type>" Note: This script automatically generates YAML frontmatter, writes the file, and extracts/converts referenced figures into `images/` (rasterising `.pdf`/`.eps` figures to PNG). Check the printed `Figures: N embedded, M unresolved` line; if any are unresolved, the source bundle may be missing those figure files.
python <BIN>/ingest_pipeline.py "<ORIGINAL_FILE_PATH>" --topic-dir "<TOPIC_DIR>" --md-file "<GENERATED_MD_FILE>" --skip-lint --log-msg "Ingested <DOC_TITLE> via OCR"ingest_pipeline.py outputs any warnings like [WARNING] Math syntax errors in <FILE>:, you MUST immediately stop and fix them.Double subscript or Unexpected end of stream.python <BIN>/pdf_math_crop.py "<PDF_PATH>" --text "<search_text_near_error>" --out "<TOPIC_DIR>\scratch\crop.png"
crop.png, then manually edit the Markdown file to correct the semantic math errors based on the ground truth in the original paper, and re-run python <BIN>/validate_math_latex.py <FILE> to confirm all errors are gone.inbox/ have been processed through steps 1-5, you MUST run the global lint and index operation ONCE outside the loop: python <BIN>/ingest_pipeline.py "none" --topic-dir "<TOPIC_DIR>" --lint-only~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.