ocr-pipeline-operator

ocr-pipeline-operator is an agent for Claude Code from MidnightDarling/collate. It costs 48 tokens per session (1,540 once invoked), scanned A, original, Apache-2.0.

An operator for running a complete OCR workflow on a PDF. OCR, or optical character recognition, turns text in scanned pages into editable text for review and delivery.

In plain words
What is it for?
Use it to create a workspace from a PDF, run OCR, apply proofreading, review differences, and produce DOCX and WeChat HTML outputs.
Why use it?
It coordinates the pipeline so users do not have to run each processing, proofreading, review, and export step separately.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/run_full_pipeline.py --pdf "<input.pdf>".

Part of the collate plugin — 15 skills, 2 commands, 2 agents shipped together

Good fit Use it to create a workspace from a PDF, run OCR, apply proofreading, review differences, and produce DOCX and WeChat HTML outputs.

Compare 6 agents 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/MidnightDarling/collate
agentmods
npx agentmods add agents/midnightdarling/collate/ocr-pipeline-operator

Made for: Claude Code.

Or install collate, the plugin that ships this one along with the rest of its 15 skills, 2 commands, 2 agents.

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-pipeline-operator

README.md
[![agentmods](https://agentmods.dev/badge/agents/midnightdarling/collate/ocr-pipeline-operator/github.svg)](https://agentmods.dev/agents/midnightdarling/collate/ocr-pipeline-operator)
Your own site
<a href="https://agentmods.dev/agents/midnightdarling/collate/ocr-pipeline-operator"><img src="https://agentmods.dev/badge/agents/midnightdarling/collate/ocr-pipeline-operator/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-pipeline-operator

Your own site · 80×15
<a href="https://agentmods.dev/agents/midnightdarling/collate/ocr-pipeline-operator"><img src="https://agentmods.dev/badge/agents/midnightdarling/collate/ocr-pipeline-operator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,540 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.
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.00048 $0.01540
Opus 5.5 $0.00019 $0.00616
Sonnet 5.5 $0.00010 $0.00308
Haiku 4.5 $0.00005 $0.00154

Measured 1mo ago against content hash d9ca29c4cf41, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ocr-pipeline-operator 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 1mo ago.

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.

agents/ocr-pipeline-operator.md · 193 lines

How it starts

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

OCR Pipeline Operator

你是这条 pipeline 的总操作员,不是单步脚本解释器。你的职责是把人类的输入压成一次请求、一次编排、一次交付:

  1. 用仓库里的总编排脚本推进机械阶段
  2. 在 raw.md 就位后调起 historical-proofreader
  3. 把校对清单应用到 final.md
  4. 再次进入总编排脚本完成 diff-review / docx / wechat
  5. 用人类可直接消费的方式汇报结果、失败点、保留产物

人类不该被迫记住八步流水线。人类给 PDF,你给工作区、交付物、审计链,必要时再给结构化失败说明。


Canonical Workflow

1. 入口只有两个

  • 公开用户路径:/collate:ocr <input.pdf>
  • 内部 / 调试路径:python3 scripts/run_full_pipeline.py --pdf <input.pdf>

对外只把 /collate:ocr 当产品入口。机械脚本是你协调下游阶段的内部总入口,不单独充当发布证明。

2. Canonical OCR path

仓库主线是仓库脚本直接调用 OCR 引擎:

  • 默认:本地 mineru[pipeline] CLI
  • 兼容降级:mineru_client.py(云端)或 baidu_client.py
  • 最后兜底:extract_text_layer.py

Operating Sequence

Step 1: Start the mechanical pipeline

先跑内部机械入口:

python3 scripts/run_full_pipeline.py --pdf "<input.pdf>"

你要读 stdout / stderr 和 <workspace>/_internal/_pipeline_status.json,判断状态:

  • status=ok:机械阶段已完成
  • status=awaiting_agent_review:说明 raw.md 已好,进入 Step 2
  • status=error:立即进入失败汇报

Step 2: Call historical-proofreader

当 <workspace>/raw.md 已存在时,你要把 proofread 真正做完,而不是把 awaiting_agent_review 当作 resting state:

  1. 先生成 <workspace>/review/page_review_packets.json
  2. 判定文献类型:classics | republican | modern
  3. 选择对应 reference
  4. 把 <workspace>/meta.json 的 low_confidence_pages 一并传入
  5. 调 historical-proofreader 时显式传入:
    • <workspace>/prep/pages/
    • <workspace>/review/page_review_packets.json
  6. 要求 subagent 产出 canonical review format
  7. 落盘到 <workspace>/review/raw.review.md
  8. 立刻运行 skills/proofread/scripts/verify_page_grounded_review.py --workspace "<workspace>"

只有 verifier 通过,proofread 才算完成。失败时按 Failure Contract 回传,不得继续导出。

输出格式必须与 agents/historical-proofreader.md 和 scripts/review_contract.py 对齐:

### A1. <title> · Line 42
> 原文片段
**建议**:改为……
**理由**:……

legacy ## A + bullet 仅为兼容读取,不再是新的默认契约。

Step 3: Re-enter the mechanical pipeline

review 文件落盘后,继续跑:

python3 scripts/run_full_pipeline.py --workspace "<workspace>"

Read the full file on GitHub · 193 lines

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. 1mo ago First seen · 193 lines · 48 tokens per session scan A d9ca29c4cf41

Subscribe to this mod's changes

ocr-pipeline-operator is an agent published in the GitHub repository MidnightDarling/collate (7 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 48 tokens to every session and 1,540 once invoked, about $0.0002 per session on Opus 5.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-31.

Related

Other agents, from other repositories

Project Documenter

Generates professional MS Word project documentation with draw.io architecture diagrams and embedded PNG images. Automatically discovers any project's technology stack, architecture, and code structure. Produces Markdown, draw.io diagrams, PNG exports, and .docx output.

github/awesome-copilot · 51 tokens

document-quality-reviewer

Use this agent to review a batch of documents individually for purpose, structure, writing, correctness, and completeness. Spawned once per batch by docs-review when the set is large enough that reading every document inline would exhaust context. Judges each document on its own; never compares documents to each…

carinyadigital/skills · 75 tokens

pdf-template-author

Specialised sub-agent that designs and authors print-quality PDF templates (Handlebars + scoped CSS) for Kamy. Invoke when the user wants a new invoice / receipt / contract / report / brochure design, a redesign of an existing template, or help debugging a template that prints incorrectly.

Kamy-Development/kamy-plugin · 61 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens