ocr-document

ocr-document is a skill for Claude Code, Codex from fuyuxiang/echo-agent. It costs 27 tokens per session (483 once invoked), scanned A, original, MIT.

A document-processing toolset for extracting text from PDFs, scanned images, and other documents. OCR, or optical character recognition, turns text in an image into editable computer text.

In plain words
What is it for?
Use it to extract text from PDFs, convert PDFs to Markdown, read scanned pages, recognize Chinese or English text in images, and save extracted content to a file.
Why use it?
Documents may contain either machine-readable text or pictures of text, and each type needs a different extraction method. This provides approaches for both cases and can preserve document structure in Markdown.

Skill for Claude CodeCodex

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

Good fit Use it to extract text from PDFs, convert PDFs to Markdown, read scanned pages, recognize Chinese or English text in images, and save extracted content to a file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fuyuxiang/echo-agent/ocr-document
About the project

Echo Agent is a self-hosted, long-running AI agent that connects language models, tools, memory, permissions, and messaging channels in one system. Individuals and teams use it for private automation that retains context across sessions, develops skills, schedules tasks, and requires approval for high-risk actions.

fuyuxiang/echo-agent · 1,058 stars · on GitHub · ojlab.com

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 fuyuxiang/echo-agent --skill ocr-document
Clone the repo
git clone --depth 1 https://github.com/fuyuxiang/echo-agent

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-document

README.md
[![agentmods](https://agentmods.dev/badge/skills/fuyuxiang/echo-agent/ocr-document/github.svg)](https://agentmods.dev/skills/fuyuxiang/echo-agent/ocr-document)
Your own site
<a href="https://agentmods.dev/skills/fuyuxiang/echo-agent/ocr-document"><img src="https://agentmods.dev/badge/skills/fuyuxiang/echo-agent/ocr-document/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-document

Your own site · 80×15
<a href="https://agentmods.dev/skills/fuyuxiang/echo-agent/ocr-document"><img src="https://agentmods.dev/badge/skills/fuyuxiang/echo-agent/ocr-document.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 483 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.00027 $0.00483
Opus 5.5 $0.00011 $0.00193
Sonnet 5.5 $0.00005 $0.00097
Haiku 4.5 $0.00003 $0.00048

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

Security

Grade A, and why

ocr-document 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/extract_document.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.

skills/productivity/ocr-document/SKILL.md · 87 lines

What it actually says

OCR & Document Processing

Extract text from PDFs, scanned images, and documents.

PDF Text Extraction (PyMuPDF)

Best choice for text-based PDFs:

pip install pymupdf
import pymupdf

doc = pymupdf.open("file.pdf")
for page in doc:
    text = page.get_text()
    print(text)

# All pages at once
full_text = "\n".join(page.get_text() for page in doc)

PDF → Markdown (marker-pdf)

High-quality conversion preserving structure:

pip install marker-pdf
marker_single file.pdf output_dir/ --output_format markdown

Image OCR

Surya OCR (Modern ML-based, best for Chinese)

pip install surya-ocr
surya_ocr image.png --langs zh,en

Pytesseract (Traditional, widely available)

# Install Tesseract engine first
brew install tesseract tesseract-lang  # macOS
apt install tesseract-ocr tesseract-ocr-chi-sim  # Linux
pip install pytesseract Pillow
import pytesseract
from PIL import Image

text = pytesseract.image_to_string(
    Image.open("scan.png"),
    lang="chi_sim+eng"
)

Script

python3 scripts/extract_document.py document.pdf
python3 scripts/extract_document.py scan.png
python3 scripts/extract_document.py report.pdf --output extracted.txt

Auto-detects format by extension: PDF → pymupdf, DOCX → python-docx, Image → pytesseract. OCR language is controlled by system Tesseract config (e.g., chi_sim+eng default).

Tips

  • For scanned PDFs, extract images first then OCR each page
  • Preprocessing (deskew, contrast) improves OCR accuracy
  • Chinese OCR: surya-ocr > pytesseract for accuracy
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. 1mo ago First seen · 87 lines · 27 tokens per session scan A d241da684ed9

Subscribe to this mod's changes

ocr-document is a skill published in the GitHub repository fuyuxiang/echo-agent (1,058 stars, last pushed yesterday), licensed MIT. It adds 27 tokens to every session and 483 once invoked, about $0.0001 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

pdf

Use when tasks involve reading, creating, or reviewing PDF files where rendering and layout matter; prefer visual checks by rendering pages (Poppler) and use Python tools such as reportlab, pdfplumber, and pypdf for generation and extraction.

MemTensor/memmy-agent · 56 tokens

slm-media

Save pictures and PDFs in SuperLocalMemory and find them again by describing them. Covers when to save a picture or document, remembermedia, rememberdocument, getmedia, mediastatus and mediauploadlink, how recall returns pictures and PDF pages, the limits, what stays private, turning the feature on with slm media (16…

qualixar/superlocalmemory · 101 tokens

ingest

Ingest a file or URL into the memory graph. Handles local files (text, PDF, DOCX, XLSX, images, etc.) and URLs (web pages, YouTube, Wikipedia, RSS). Use when the user wants to add any document or web content to their knowledge graph.

stevepridemore/graph-memory · 62 tokens

agent-state-bar

A design guide for an agent status bar: a short, automatically updated summary of progress, remaining tasks, tool counts, errors, and system state placed near the latest model input.

bojieli/ai-agent-book · 105 tokens

pdf

A set of instructions for working with PDF files, which are documents designed to preserve their layout across devices.

agentscope-ai/QwenPaw · 95 tokens

pptx

A guide for turning a paper, outline, or structured text into a PowerPoint presentation. It covers an 8–12-slide structure, concise slide points, and generation of a .pptx file.

bojieli/ai-agent-book · 84 tokens