ocr-pipeline-and-quality

ocr-pipeline-and-quality is a skill for Claude Code, Codex from xberg-io/xberg. It costs 47 tokens per session (909 once invoked), scanned A, original, MIT.

Development guidance for Xberg's OCR pipeline, which converts text in scanned images or PDFs into machine-readable text. It covers OCR engines, preprocessing, caching, page checks, layout, and tables.

In plain words
What is it for?
Changing or testing OCR backends, language handling, preprocessing, cache keys, page acceptance, text geometry, hOCR output, or table reconstruction.
Why use it?
OCR backends can produce different results and quality measurements, so changes need to be evaluated across the full processing pipeline.

Skill for Claude CodeCodex

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

Good fit Changing or testing OCR backends, language handling, preprocessing, cache keys, page acceptance, text geometry, hOCR output, or table reconstruction.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xberg-io/xberg/ocr-pipeline-and-quality
About the project

Xberg is a document-intelligence engine that reads files, URLs, archives, and source trees and extracts text, metadata, images, tables, and structured data, with additional code-language understanding. Developers use it through language bindings, a command-line tool, REST API, or MCP server, and the catalogue entries support those integrations.

xberg-io/xberg · 9,448 stars · on GitHub · docs.xberg.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xberg-io/xberg --skill ocr-pipeline-and-quality
Clone the repo
git clone --depth 1 https://github.com/xberg-io/xberg

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-pipeline-and-quality

README.md
[![agentmods](https://agentmods.dev/badge/skills/xberg-io/xberg/ocr-pipeline-and-quality/github.svg)](https://agentmods.dev/skills/xberg-io/xberg/ocr-pipeline-and-quality)
Your own site
<a href="https://agentmods.dev/skills/xberg-io/xberg/ocr-pipeline-and-quality"><img src="https://agentmods.dev/badge/skills/xberg-io/xberg/ocr-pipeline-and-quality/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-and-quality

Your own site · 80×15
<a href="https://agentmods.dev/skills/xberg-io/xberg/ocr-pipeline-and-quality"><img src="https://agentmods.dev/badge/skills/xberg-io/xberg/ocr-pipeline-and-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 909 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.00047 $0.00909
Opus 5.5 $0.00019 $0.00364
Sonnet 5.5 $0.00009 $0.00182
Haiku 4.5 $0.00005 $0.00091

Measured 14d ago against content hash 1c00378d2aa3, 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-and-quality 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 14d 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.

.ai-rulez/skills/ocr-pipeline-and-quality/SKILL.md · 66 lines

How it starts

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

OCR pipeline and quality

OCR flows through preprocessing, backend execution, structured conversion, page acceptance, and caching. Backend outputs are not interchangeable measurements.

Backends and execution

  • All backends implement OcrBackend. Tesseract is the default and is bound through the in-repo crates/xberg-tesseract C FFI crate; there is no leptess dependency.
  • OcrBackendType is Tesseract | PaddleOCR | Candle | Custom. Sceptre is selected by name through Custom, not a dedicated enum variant.
  • Run blocking OCR work through tokio::task::spawn_blocking, minimize runtime/FFI lock duration, and respect backend resource limits.
  • Check PageOrientationHandling before assuming a backend handles rotated input.
  • Validate ISO 639 language codes and required tessdata before execution. Language detection runs after extraction and does not choose traineddata automatically.

Configuration and cache

  • Public types::formats::TesseractConfig and internal ocr::types::TesseractConfig have independent defaults. Change both and keep their synchronization test passing.
  • The OCR cache key combines a build-identity tag, image hash, backend, config hash, and output format. The config hash includes TESSERACT_RESULT_SCHEMA_VERSION and the ordered Tesseract variable set and carries no build identity of its own, but it is not the whole key: OcrCache::generate_cache_key prefixes cache_version_tag(), which hashes CARGO_PKG_VERSION, CACHE_SCHEMA_VERSION, env!("XBERG_BUILD_ID") and the debug/release bit. Two builds from different commits therefore never share entries.
  • Bump TESSERACT_RESULT_SCHEMA_VERSION when unchanged image/config inputs can produce different output, or disable the cache for an A/B or revert check.
  • Default preprocessing is 300 DPI, deskew, and Otsu binarization. Auto-rotation, denoise, contrast enhancement, and color inversion are off unless configured. Native PSM defaults to 3; WASM defaults to 6.

Read the full file on GitHub · 66 lines

Files

What ships with it

1 file 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. 14d ago Changed · +3 lines · -6 tokens per session 1c00378d2aa3
  2. 29d ago Changed · +3 lines 385595ec8842
  3. 1mo ago First seen · 60 lines · 53 tokens per session scan A c16597e2ff2f

Subscribe to this mod's changes

ocr-pipeline-and-quality is a skill published in the GitHub repository xberg-io/xberg (9,448 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 909 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-30.

Related

Other skills, from other repositories

servicenow-import-attachment-batch

ServiceNow data-ingest, file, and batched-REST surface — push rows through Import Sets (single and bulk), upload/get/delete record attachments, and bundle many REST calls into one batch request via the servicenow-api MCP server. Use when the agent must load external data through a transform-mapped import set, attach…

Knuckles-Team/servicenow-api · 144 tokens

extraction-pipeline-patterns

Kreuzberg's format detection -> extraction -> fallback orchestration for 75+ file formats.

kreuzberg-dev/kreuzberg-lts · 4 tokens

2slides-ppt-generator

AI-powered presentation generation via the 2slides API — create slides from text, match a reference image style, summarize documents into decks, add AI voice narration, and export pages/audio. Use f.

ranbot-ai/awesome-skills · 45 tokens

advogado-criminal

Assistente de pesquisa informativa, sem credenciais profissionais, sobre em Maria da Penha, violencia domestica, feminicidio, direito penal brasileiro, medidas protetivas, inquerito policial e acao pe.

ranbot-ai/awesome-skills · 49 tokens

doc-reader

PDF/DOCX/XLSX/image document intelligence — text extraction, table parsing, OCR, financial statement analysis, contract clause detection, document classification, and format conversion. Use when reading, analyzing, extracting data from, or converting documents.

JansenAnalytics/claudex · 51 tokens

sf-metadata-parser

Use this skill whenever the user wants to parse, analyze, document, or export SAP SuccessFactors OData metadata ($metadata XML). Triggers include: any mention of 'metadata', '$metadata', 'OData entities', 'entity fields', 'SF metadata', 'SuccessFactors schema', 'data dictionary', or requests to understand, compare, or…

shaktibarath/sf-metadata-parser · 175 tokens