ocr_kb

ocr_kb is a skill for Claude Code, Codex from TFboy1/academic-paper-writer. It costs 117 tokens per session (4,606 once invoked), scanned A, original, MIT.

A Chinese-language workflow for reading long research documents page by page with multimodal AI. It extracts text, formulas, and figures from PDFs, tracks progress, and produces checked DOCX files.

In plain words
What is it for?
Use it to turn research PDFs into structured Markdown and Word documents, extract figures, resume interrupted OCR work, and preserve outputs in the required folders.
Why use it?
It organizes lengthy PDF processing so intermediate files, failures, numbering, and quality checks are not lost.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is 用法: python resources/scripts/split_pdf.py <pdf_path> <output_dir> [--dpi 300].

Good fit Use it to turn research PDFs into structured Markdown and Word documents, extract figures, resume interrupted OCR work, and preserve outputs in the required folders.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/TFboy1/academic-paper-writer
agentmods
npx agentmods add skills/tfboy1/academic-paper-writer/ocr_kb

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ocr_kb

README.md
[![agentmods](https://agentmods.dev/badge/skills/tfboy1/academic-paper-writer/ocr_kb/github.svg)](https://agentmods.dev/skills/tfboy1/academic-paper-writer/ocr_kb)
Your own site
<a href="https://agentmods.dev/skills/tfboy1/academic-paper-writer/ocr_kb"><img src="https://agentmods.dev/badge/skills/tfboy1/academic-paper-writer/ocr_kb/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ocr_kb

Your own site · 80×15
<a href="https://agentmods.dev/skills/tfboy1/academic-paper-writer/ocr_kb"><img src="https://agentmods.dev/badge/skills/tfboy1/academic-paper-writer/ocr_kb.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,606 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.04606
Opus 5 $0.00059 $0.02303
Sonnet 5 $0.00023 $0.00921
Haiku 4.5 $0.00012 $0.00461

Measured 10d ago against content hash 017f5e850e77, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ocr_kb scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/latex_to_omml.py, scripts/page_to_image.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ocr_kb/SKILL.md · 351 lines

How it starts

The opening of the file, as written. The whole thing — 351 lines — stays where its author put it; the contents beside it link to each section on GitHub.

论文排版与整理完全工作流 (Iterative OCR & Typesetting Pipeline)

0. 目录规范 (Directory Convention)

所有中间文件和最终产物必须严格遵守以下目录结构,禁止在项目根目录下放置任何生成文件

项目根目录/
├── resources/
│   ├── pages/          # 切分出的单页 PNG 图片
│   ├── figures/        # 从页面中裁剪出的独立科研配图(全局编号)
│   ├── md/             # 每页的 Markdown 提取结果 (page_1.md, page_2.md, ...)
│   ├── scripts/        # 所有 Python 辅助脚本(可跨任务复用,清理时不删除)
│   ├── compiled_paper.md  # 最终汇总的完整 Markdown
│   ├── config.json     # 任务配置(源 PDF、格式规范),整个任务期间不变
│   └── checkpoint.json # 运行时进度(当前页、计数器、失败页),随处理更新
├── outputs/
│   ├── <name>_checkpoint_p<N>.docx   # 核查点中间版本
│   └── <name>_final_<date>.docx      # 最终交付版本
├── ocr_kb/
│   └── SKILL.md        # 本文件
└── <source>.pdf        # 用户提供的原始 PDF

0.5 resources/config.json 规范 (Task Configuration)

在每次新任务启动时创建,整个任务期间不修改。续作时直接读取。所有管道共用同一 schema。

{
  "source_file": "2103.10360v2.pdf",
  "source_type": "pdf",
  "pipeline": "A",
  "format_style": "IEEE",
  "template_file": null,
  "total_units": 16,
  "unit_type": "page",
  "created_at": "2026-04-02T13:00:00+08:00"
}
字段 说明
source_file 用户指定的源文件名(PDF / DOC / DOCX / MD)
source_type 文件类型:"pdf" / "doc" / "docx" / "md"
pipeline 管道类型:"A"(OCR)/ "B"(重排版)/ "C"(MD 直转)
format_style 排版格式(IEEE / APA / 用户自定义 / ...)
template_file 用户提供的 .docx 模板路径,无则 null
total_units 总处理单元数(Pipeline A = 页数,Pipeline B/C = 章节数)
unit_type 进度单位:"page"(Pipeline A)/ "section"(Pipeline B/C)
created_at 任务创建时间

[!NOTE] Pipeline A 固定使用 source_type: "pdf", pipeline: "A", unit_type: "page"


0.6 resources/checkpoint.json 规范 (Runtime Checkpoint)

在每完成一个单元(页或章节)的提取 + DOCX 追加后更新。**这是断点恢复的唯一依据。**所有管道共用同一 schema。

{
  "current_unit": 7,
  "unit_type": "page",
  "last_verified_unit": 6,
  "total_units": 16,
  "docx_path": "outputs/GLM_checkpoint_p6.docx",
  "global_figure_count": 4,
  "global_table_count": 2,
  "global_equation_count": 15,
  "needs_review": [3],
  "completed_units": [1, 2, 3, 4, 5, 6],
  "status": "suspended"
}

Read the full file on GitHub · 351 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 351 lines · 117 tokens per session scan A 017f5e850e77

Subscribe to this mod's changes

ocr_kb is a skill published in the GitHub repository TFboy1/academic-paper-writer (249 stars, last pushed 2mo ago), licensed MIT. It adds 117 tokens to every session and 4,606 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

pydicom

Use pydicom to read, inspect, write, transform, and safely preflight local DICOM datasets and pixel data. Applies to DICOM metadata, transfer syntaxes, compression plugins, frames, private elements, JSON, and bounded de-identification review.

K-Dense-AI/scientific-agent-skills · 56 tokens

pptx-posters

Create and audit editable scientific posters in macro-free PowerPoint (.pptx) from author-approved local content and assets. Use when the requested deliverable is a PowerPoint research/conference poster and exact physical, printer, accessibility, provenance, and package-security checks are required.

K-Dense-AI/scientific-agent-skills · 59 tokens

extracting-lab-tables

Detects and extracts tabular laboratory panels from PDFs, scans, and images into structured rows ready for OpenMed and FHIR. Use when the user has a CBC, CMP, lipid panel, or other lab report as a scanned image / PDF / spreadsheet and needs the test name, value, unit, reference range, and abnormal flag as clean rows.…

maziyarpanahi/openmed · 210 tokens

paper-spine

Build, rewrite, audit, submit, revise, or transfer scholarly papers end to end, producing verified LaTeX/PDF/Word and target-specific publication packages.

WUBING2023/PaperSpine · 37 tokens

paper-compile

A build workflow that turns LaTeX source files into a PDF and checks whether the paper compiles correctly. LaTeX is a text-based system commonly used for academic papers.

wanshuiyin/Auto-claude-code-research-in-sleep · 53 tokens

nsfc-budget

A tool that creates an editable LaTeX budget justification and renders it as a PDF for an NSFC research-funding application. NSFC is China’s National Natural Science Foundation, and a budget justification explains why proposed costs are needed.

huangwb8/ChineseResearchLaTeX · 138 tokens